user

package
v0.0.0-...-1cc1a95 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldAccount holds the string denoting the account field in the database.
	FieldAccount = "account"
	// FieldPasswd holds the string denoting the passwd field in the database.
	FieldPasswd = "passwd"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldAvatar holds the string denoting the avatar field in the database.
	FieldAvatar = "avatar"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// EdgeRole holds the string denoting the role edge name in mutations.
	EdgeRole = "role"
	// EdgeResource holds the string denoting the resource edge name in mutations.
	EdgeResource = "resource"
	// EdgeStudent holds the string denoting the student edge name in mutations.
	EdgeStudent = "student"
	// Table holds the table name of the user in the database.
	Table = "users"
	// RoleTable is the table that holds the role relation/edge. The primary key declared below.
	RoleTable = "user_role"
	// RoleInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RoleInverseTable = "roles"
	// ResourceTable is the table that holds the resource relation/edge. The primary key declared below.
	ResourceTable = "user_resource"
	// ResourceInverseTable is the table name for the Resource entity.
	// It exists in this package in order to avoid circular dependency with the "resource" package.
	ResourceInverseTable = "resources"
	// StudentTable is the table that holds the student relation/edge.
	StudentTable = "users"
	// StudentInverseTable is the table name for the Student entity.
	// It exists in this package in order to avoid circular dependency with the "student" package.
	StudentInverseTable = "students"
	// StudentColumn is the table column denoting the student relation/edge.
	StudentColumn = "student_user"
)

Variables

View Source
var (
	// RolePrimaryKey and RoleColumn2 are the table columns denoting the
	// primary key for the role relation (M2M).
	RolePrimaryKey = []string{"user_id", "role_id"}
	// ResourcePrimaryKey and ResourceColumn2 are the table columns denoting the
	// primary key for the resource relation (M2M).
	ResourcePrimaryKey = []string{"user_id", "resource_id"}
)
View Source
var (
	// AccountValidator is a validator for the "account" field. It is called by the builders before save.
	AccountValidator func(string) error
	// PasswdValidator is a validator for the "passwd" field. It is called by the builders before save.
	PasswdValidator func(string) error
	// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	UsernameValidator func(string) error
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator func(string) error
)

Columns holds all SQL columns for user fields.

View Source
var ForeignKeys = []string{
	"student_user",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "users" table and are not defined as standalone fields in the schema.

Functions

func Account

func Account(v string) predicate.User

Account applies equality check predicate on the "account" field. It's identical to AccountEQ.

func AccountContains

func AccountContains(v string) predicate.User

AccountContains applies the Contains predicate on the "account" field.

func AccountContainsFold

func AccountContainsFold(v string) predicate.User

AccountContainsFold applies the ContainsFold predicate on the "account" field.

func AccountEQ

func AccountEQ(v string) predicate.User

AccountEQ applies the EQ predicate on the "account" field.

func AccountEqualFold

func AccountEqualFold(v string) predicate.User

AccountEqualFold applies the EqualFold predicate on the "account" field.

func AccountGT

func AccountGT(v string) predicate.User

AccountGT applies the GT predicate on the "account" field.

func AccountGTE

func AccountGTE(v string) predicate.User

AccountGTE applies the GTE predicate on the "account" field.

func AccountHasPrefix

func AccountHasPrefix(v string) predicate.User

AccountHasPrefix applies the HasPrefix predicate on the "account" field.

func AccountHasSuffix

func AccountHasSuffix(v string) predicate.User

AccountHasSuffix applies the HasSuffix predicate on the "account" field.

func AccountIn

func AccountIn(vs ...string) predicate.User

AccountIn applies the In predicate on the "account" field.

func AccountLT

func AccountLT(v string) predicate.User

AccountLT applies the LT predicate on the "account" field.

func AccountLTE

func AccountLTE(v string) predicate.User

AccountLTE applies the LTE predicate on the "account" field.

func AccountNEQ

func AccountNEQ(v string) predicate.User

AccountNEQ applies the NEQ predicate on the "account" field.

func AccountNotIn

func AccountNotIn(vs ...string) predicate.User

AccountNotIn applies the NotIn predicate on the "account" field.

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func Avatar

func Avatar(v []byte) predicate.User

Avatar applies equality check predicate on the "avatar" field. It's identical to AvatarEQ.

func AvatarEQ

func AvatarEQ(v []byte) predicate.User

AvatarEQ applies the EQ predicate on the "avatar" field.

func AvatarGT

func AvatarGT(v []byte) predicate.User

AvatarGT applies the GT predicate on the "avatar" field.

func AvatarGTE

func AvatarGTE(v []byte) predicate.User

AvatarGTE applies the GTE predicate on the "avatar" field.

func AvatarIn

func AvatarIn(vs ...[]byte) predicate.User

AvatarIn applies the In predicate on the "avatar" field.

func AvatarLT

func AvatarLT(v []byte) predicate.User

AvatarLT applies the LT predicate on the "avatar" field.

func AvatarLTE

func AvatarLTE(v []byte) predicate.User

AvatarLTE applies the LTE predicate on the "avatar" field.

func AvatarNEQ

func AvatarNEQ(v []byte) predicate.User

AvatarNEQ applies the NEQ predicate on the "avatar" field.

func AvatarNotIn

func AvatarNotIn(vs ...[]byte) predicate.User

AvatarNotIn applies the NotIn predicate on the "avatar" field.

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

func EmailIn(vs ...string) predicate.User

EmailIn applies the In predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

func EmailNotIn(vs ...string) predicate.User

EmailNotIn applies the NotIn predicate on the "email" field.

func HasResource

func HasResource() predicate.User

HasResource applies the HasEdge predicate on the "resource" edge.

func HasResourceWith

func HasResourceWith(preds ...predicate.Resource) predicate.User

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

func HasRole

func HasRole() predicate.User

HasRole applies the HasEdge predicate on the "role" edge.

func HasRoleWith

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

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

func HasStudent

func HasStudent() predicate.User

HasStudent applies the HasEdge predicate on the "student" edge.

func HasStudentWith

func HasStudentWith(preds ...predicate.Student) predicate.User

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

func ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func Passwd

func Passwd(v string) predicate.User

Passwd applies equality check predicate on the "passwd" field. It's identical to PasswdEQ.

func PasswdContains

func PasswdContains(v string) predicate.User

PasswdContains applies the Contains predicate on the "passwd" field.

func PasswdContainsFold

func PasswdContainsFold(v string) predicate.User

PasswdContainsFold applies the ContainsFold predicate on the "passwd" field.

func PasswdEQ

func PasswdEQ(v string) predicate.User

PasswdEQ applies the EQ predicate on the "passwd" field.

func PasswdEqualFold

func PasswdEqualFold(v string) predicate.User

PasswdEqualFold applies the EqualFold predicate on the "passwd" field.

func PasswdGT

func PasswdGT(v string) predicate.User

PasswdGT applies the GT predicate on the "passwd" field.

func PasswdGTE

func PasswdGTE(v string) predicate.User

PasswdGTE applies the GTE predicate on the "passwd" field.

func PasswdHasPrefix

func PasswdHasPrefix(v string) predicate.User

PasswdHasPrefix applies the HasPrefix predicate on the "passwd" field.

func PasswdHasSuffix

func PasswdHasSuffix(v string) predicate.User

PasswdHasSuffix applies the HasSuffix predicate on the "passwd" field.

func PasswdIn

func PasswdIn(vs ...string) predicate.User

PasswdIn applies the In predicate on the "passwd" field.

func PasswdLT

func PasswdLT(v string) predicate.User

PasswdLT applies the LT predicate on the "passwd" field.

func PasswdLTE

func PasswdLTE(v string) predicate.User

PasswdLTE applies the LTE predicate on the "passwd" field.

func PasswdNEQ

func PasswdNEQ(v string) predicate.User

PasswdNEQ applies the NEQ predicate on the "passwd" field.

func PasswdNotIn

func PasswdNotIn(vs ...string) predicate.User

PasswdNotIn applies the NotIn predicate on the "passwd" field.

func Username

func Username(v string) predicate.User

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.User

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.User

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.User

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.User

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.User

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.User

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.User

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.User

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

func UsernameIn(vs ...string) predicate.User

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.User

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.User

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.User

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

func UsernameNotIn(vs ...string) predicate.User

UsernameNotIn applies the NotIn predicate on the "username" 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