roles

package
v0.0.0-...-ed7a308 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the roles type in the database.
	Label = "roles"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeUsers holds the string denoting the users edge name in mutations.
	EdgeUsers = "users"
	// EdgePermissions holds the string denoting the permissions edge name in mutations.
	EdgePermissions = "permissions"
	// Table holds the table name of the roles in the database.
	Table = "roles"
	// UsersTable is the table that holds the users relation/edge. The primary key declared below.
	UsersTable = "users_roles"
	// UsersInverseTable is the table name for the Users entity.
	// It exists in this package in order to avoid circular dependency with the "users" package.
	UsersInverseTable = "users"
	// PermissionsTable is the table that holds the permissions relation/edge. The primary key declared below.
	PermissionsTable = "roles_permissions"
	// PermissionsInverseTable is the table name for the Permissions entity.
	// It exists in this package in order to avoid circular dependency with the "permissions" package.
	PermissionsInverseTable = "permissions"
)

Variables

View Source
var (
	// UsersPrimaryKey and UsersColumn2 are the table columns denoting the
	// primary key for the users relation (M2M).
	UsersPrimaryKey = []string{"users_id", "roles_id"}
	// PermissionsPrimaryKey and PermissionsColumn2 are the table columns denoting the
	// primary key for the permissions relation (M2M).
	PermissionsPrimaryKey = []string{"roles_id", "permissions_id"}
)

Columns holds all SQL columns for roles fields.

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Functions

func And

func And(predicates ...predicate.Roles) predicate.Roles

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Roles

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Roles

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Roles

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Roles

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Roles

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Roles

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Roles

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Roles

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Roles

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func Description

func Description(v string) predicate.Roles

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Roles

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Roles

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Roles

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Roles

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Roles

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Roles

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Roles

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Roles

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Roles

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Roles

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Roles

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Roles

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Roles

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Roles

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Roles

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasPermissions

func HasPermissions() predicate.Roles

HasPermissions applies the HasEdge predicate on the "permissions" edge.

func HasPermissionsWith

func HasPermissionsWith(preds ...predicate.Permissions) predicate.Roles

HasPermissionsWith applies the HasEdge predicate on the "permissions" edge with a given conditions (other predicates).

func HasUsers

func HasUsers() predicate.Roles

HasUsers applies the HasEdge predicate on the "users" edge.

func HasUsersWith

func HasUsersWith(preds ...predicate.Users) predicate.Roles

HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Roles

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Roles

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Roles

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Roles

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Roles

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Roles

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Roles

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Roles

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Roles

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Roles

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Roles

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Roles

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Roles

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Roles

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Roles

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Roles

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Roles

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Roles

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Roles

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Roles

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Roles

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Roles

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Roles

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Roles) predicate.Roles

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Roles queries.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByDescription

func ByDescription(opts ...sql.OrderTermOption) OrderOption

ByDescription orders the results by the description field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByPermissions

func ByPermissions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByPermissions orders the results by permissions terms.

func ByPermissionsCount

func ByPermissionsCount(opts ...sql.OrderTermOption) OrderOption

ByPermissionsCount orders the results by permissions count.

func ByUsers

func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByUsers orders the results by users terms.

func ByUsersCount

func ByUsersCount(opts ...sql.OrderTermOption) OrderOption

ByUsersCount orders the results by users count.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL