role

package
v0.0.0-...-c6aefec Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the role type in the database.
	Label = "role"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldKey holds the string denoting the key field in the database.
	FieldKey = "key"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldComment holds the string denoting the comment field in the database.
	FieldComment = "comment"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeMenu holds the string denoting the menu edge name in mutations.
	EdgeMenu = "menu"
	// Table holds the table name of the role in the database.
	Table = "role"
	// UserTable is the table that holds the user relation/edge. The primary key declared below.
	UserTable = "user_role"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "user"
	// MenuTable is the table that holds the menu relation/edge.
	MenuTable = "menu"
	// MenuInverseTable is the table name for the Menu entity.
	// It exists in this package in order to avoid circular dependency with the "menu" package.
	MenuInverseTable = "menu"
	// MenuColumn is the table column denoting the menu relation/edge.
	MenuColumn = "role_menu"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// UpdateDefaultDeletedAt holds the default value on update for the "deleted_at" field.
	UpdateDefaultDeletedAt func() time.Time
	// KeyValidator is a validator for the "key" field. It is called by the builders before save.
	KeyValidator func(string) error
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(int64) error
)

Columns holds all SQL columns for role fields.

View Source
var (
	// UserPrimaryKey and UserColumn2 are the table columns denoting the
	// primary key for the user relation (M2M).
	UserPrimaryKey = []string{"user_id", "role_id"}
)

Functions

func And

func And(predicates ...predicate.Role) predicate.Role

And groups predicates with the AND operator between them.

func Comment

func Comment(v string) predicate.Role

Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.

func CommentContains

func CommentContains(v string) predicate.Role

CommentContains applies the Contains predicate on the "comment" field.

func CommentContainsFold

func CommentContainsFold(v string) predicate.Role

CommentContainsFold applies the ContainsFold predicate on the "comment" field.

func CommentEQ

func CommentEQ(v string) predicate.Role

CommentEQ applies the EQ predicate on the "comment" field.

func CommentEqualFold

func CommentEqualFold(v string) predicate.Role

CommentEqualFold applies the EqualFold predicate on the "comment" field.

func CommentGT

func CommentGT(v string) predicate.Role

CommentGT applies the GT predicate on the "comment" field.

func CommentGTE

func CommentGTE(v string) predicate.Role

CommentGTE applies the GTE predicate on the "comment" field.

func CommentHasPrefix

func CommentHasPrefix(v string) predicate.Role

CommentHasPrefix applies the HasPrefix predicate on the "comment" field.

func CommentHasSuffix

func CommentHasSuffix(v string) predicate.Role

CommentHasSuffix applies the HasSuffix predicate on the "comment" field.

func CommentIn

func CommentIn(vs ...string) predicate.Role

CommentIn applies the In predicate on the "comment" field.

func CommentIsNil

func CommentIsNil() predicate.Role

CommentIsNil applies the IsNil predicate on the "comment" field.

func CommentLT

func CommentLT(v string) predicate.Role

CommentLT applies the LT predicate on the "comment" field.

func CommentLTE

func CommentLTE(v string) predicate.Role

CommentLTE applies the LTE predicate on the "comment" field.

func CommentNEQ

func CommentNEQ(v string) predicate.Role

CommentNEQ applies the NEQ predicate on the "comment" field.

func CommentNotIn

func CommentNotIn(vs ...string) predicate.Role

CommentNotIn applies the NotIn predicate on the "comment" field.

func CommentNotNil

func CommentNotNil() predicate.Role

CommentNotNil applies the NotNil predicate on the "comment" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Role

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Role

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Role

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Role

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Role

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Role

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Role

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Role

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Role

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Role

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Role

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Role

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Role

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Role

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Role

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Role

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Role

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Role

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func HasMenu

func HasMenu() predicate.Role

HasMenu applies the HasEdge predicate on the "menu" edge.

func HasMenuWith

func HasMenuWith(preds ...predicate.Menu) predicate.Role

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

func HasUser

func HasUser() predicate.Role

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Role

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

func ID

func ID(id int64) predicate.Role

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Role

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Role

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Role

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Role

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Role

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Role

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Role

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Role

IDNotIn applies the NotIn predicate on the ID field.

func Key

func Key(v string) predicate.Role

Key applies equality check predicate on the "key" field. It's identical to KeyEQ.

func KeyContains

func KeyContains(v string) predicate.Role

KeyContains applies the Contains predicate on the "key" field.

func KeyContainsFold

func KeyContainsFold(v string) predicate.Role

KeyContainsFold applies the ContainsFold predicate on the "key" field.

func KeyEQ

func KeyEQ(v string) predicate.Role

KeyEQ applies the EQ predicate on the "key" field.

func KeyEqualFold

func KeyEqualFold(v string) predicate.Role

KeyEqualFold applies the EqualFold predicate on the "key" field.

func KeyGT

func KeyGT(v string) predicate.Role

KeyGT applies the GT predicate on the "key" field.

func KeyGTE

func KeyGTE(v string) predicate.Role

KeyGTE applies the GTE predicate on the "key" field.

func KeyHasPrefix

func KeyHasPrefix(v string) predicate.Role

KeyHasPrefix applies the HasPrefix predicate on the "key" field.

func KeyHasSuffix

func KeyHasSuffix(v string) predicate.Role

KeyHasSuffix applies the HasSuffix predicate on the "key" field.

func KeyIn

func KeyIn(vs ...string) predicate.Role

KeyIn applies the In predicate on the "key" field.

func KeyLT

func KeyLT(v string) predicate.Role

KeyLT applies the LT predicate on the "key" field.

func KeyLTE

func KeyLTE(v string) predicate.Role

KeyLTE applies the LTE predicate on the "key" field.

func KeyNEQ

func KeyNEQ(v string) predicate.Role

KeyNEQ applies the NEQ predicate on the "key" field.

func KeyNotIn

func KeyNotIn(vs ...string) predicate.Role

KeyNotIn applies the NotIn predicate on the "key" field.

func Name

func Name(v string) predicate.Role

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

func NameContains

func NameContains(v string) predicate.Role

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

func NameContainsFold

func NameContainsFold(v string) predicate.Role

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

func NameEQ

func NameEQ(v string) predicate.Role

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

func NameEqualFold

func NameEqualFold(v string) predicate.Role

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

func NameGT

func NameGT(v string) predicate.Role

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

func NameGTE

func NameGTE(v string) predicate.Role

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Role

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Role

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Role

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

func NameLTE

func NameLTE(v string) predicate.Role

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

func NameNEQ

func NameNEQ(v string) predicate.Role

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

func NameNotIn

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

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.Role) predicate.Role

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Role

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Role

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Role

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Role

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Role

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Role

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Role

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Role

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Role

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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