Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func Email(v string) predicate.User
- func EmailContains(v string) predicate.User
- func EmailContainsFold(v string) predicate.User
- func EmailEQ(v string) predicate.User
- func EmailEqualFold(v string) predicate.User
- func EmailGT(v string) predicate.User
- func EmailGTE(v string) predicate.User
- func EmailHasPrefix(v string) predicate.User
- func EmailHasSuffix(v string) predicate.User
- func EmailIn(vs ...string) predicate.User
- func EmailLT(v string) predicate.User
- func EmailLTE(v string) predicate.User
- func EmailNEQ(v string) predicate.User
- func EmailNotIn(vs ...string) predicate.User
- func HasAdminCreatedBy() predicate.User
- func HasAdminCreatedByWith(preds ...predicate.AdminUser) predicate.User
- func HasAdminUpdatedBy() predicate.User
- func HasAdminUpdatedByWith(preds ...predicate.AdminUser) predicate.User
- func HasCreatedBy() predicate.User
- func HasCreatedByWith(preds ...predicate.User) predicate.User
- func HasDefaultRole() predicate.User
- func HasDefaultRoleWith(preds ...predicate.Role) predicate.User
- func HasRefCreatedBy() predicate.User
- func HasRefCreatedByWith(preds ...predicate.User) predicate.User
- func HasRefUpdatedBy() predicate.User
- func HasRefUpdatedByWith(preds ...predicate.User) predicate.User
- func HasRoles() predicate.User
- func HasRolesWith(preds ...predicate.Role) predicate.User
- func HasUpdatedBy() predicate.User
- func HasUpdatedByWith(preds ...predicate.User) predicate.User
- func ID(id string) predicate.User
- func IDContainsFold(id string) predicate.User
- func IDEQ(id string) predicate.User
- func IDEqualFold(id string) predicate.User
- func IDGT(id string) predicate.User
- func IDGTE(id string) predicate.User
- func IDIn(ids ...string) predicate.User
- func IDLT(id string) predicate.User
- func IDLTE(id string) predicate.User
- func IDNEQ(id string) predicate.User
- func IDNotIn(ids ...string) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func Password(v string) predicate.User
- func PasswordContains(v string) predicate.User
- func PasswordContainsFold(v string) predicate.User
- func PasswordEQ(v string) predicate.User
- func PasswordEqualFold(v string) predicate.User
- func PasswordGT(v string) predicate.User
- func PasswordGTE(v string) predicate.User
- func PasswordHasPrefix(v string) predicate.User
- func PasswordHasSuffix(v string) predicate.User
- func PasswordIn(vs ...string) predicate.User
- func PasswordLT(v string) predicate.User
- func PasswordLTE(v string) predicate.User
- func PasswordNEQ(v string) predicate.User
- func PasswordNotIn(vs ...string) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByAdminCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByAdminUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByDefaultRoleField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByRefCreatedBy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRefCreatedByCount(opts ...sql.OrderTermOption) OrderOption
- func ByRefUpdatedBy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRefUpdatedByCount(opts ...sql.OrderTermOption) OrderOption
- func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRolesCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
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" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // EdgeRefCreatedBy holds the string denoting the ref_created_by edge name in mutations. EdgeRefCreatedBy = "ref_created_by" // EdgeCreatedBy holds the string denoting the created_by edge name in mutations. EdgeCreatedBy = "created_by" // EdgeRefUpdatedBy holds the string denoting the ref_updated_by edge name in mutations. EdgeRefUpdatedBy = "ref_updated_by" // EdgeUpdatedBy holds the string denoting the updated_by edge name in mutations. EdgeUpdatedBy = "updated_by" // EdgeAdminCreatedBy holds the string denoting the admin_created_by edge name in mutations. EdgeAdminCreatedBy = "admin_created_by" // EdgeAdminUpdatedBy holds the string denoting the admin_updated_by edge name in mutations. EdgeAdminUpdatedBy = "admin_updated_by" // EdgeRoles holds the string denoting the roles edge name in mutations. EdgeRoles = "roles" // EdgeDefaultRole holds the string denoting the default_role edge name in mutations. EdgeDefaultRole = "default_role" // Table holds the table name of the user in the database. Table = "users" // RefCreatedByTable is the table that holds the ref_created_by relation/edge. RefCreatedByTable = "users" // RefCreatedByColumn is the table column denoting the ref_created_by relation/edge. RefCreatedByColumn = "user_created_by" // CreatedByTable is the table that holds the created_by relation/edge. CreatedByTable = "users" // CreatedByColumn is the table column denoting the created_by relation/edge. CreatedByColumn = "user_created_by" // RefUpdatedByTable is the table that holds the ref_updated_by relation/edge. RefUpdatedByTable = "users" // RefUpdatedByColumn is the table column denoting the ref_updated_by relation/edge. RefUpdatedByColumn = "user_updated_by" // UpdatedByTable is the table that holds the updated_by relation/edge. UpdatedByTable = "users" // UpdatedByColumn is the table column denoting the updated_by relation/edge. UpdatedByColumn = "user_updated_by" // AdminCreatedByTable is the table that holds the admin_created_by relation/edge. AdminCreatedByTable = "users" // AdminCreatedByInverseTable is the table name for the AdminUser entity. // It exists in this package in order to avoid circular dependency with the "adminuser" package. AdminCreatedByInverseTable = "admin_users" // AdminCreatedByColumn is the table column denoting the admin_created_by relation/edge. AdminCreatedByColumn = "user_admin_created_by" // AdminUpdatedByTable is the table that holds the admin_updated_by relation/edge. AdminUpdatedByTable = "users" // AdminUpdatedByInverseTable is the table name for the AdminUser entity. // It exists in this package in order to avoid circular dependency with the "adminuser" package. AdminUpdatedByInverseTable = "admin_users" // AdminUpdatedByColumn is the table column denoting the admin_updated_by relation/edge. AdminUpdatedByColumn = "user_admin_updated_by" // RolesTable is the table that holds the roles relation/edge. The primary key declared below. RolesTable = "user_roles" // RolesInverseTable is the table name for the Role entity. // It exists in this package in order to avoid circular dependency with the "role" package. RolesInverseTable = "roles" // DefaultRoleTable is the table that holds the default_role relation/edge. DefaultRoleTable = "users" // DefaultRoleInverseTable is the table name for the Role entity. // It exists in this package in order to avoid circular dependency with the "role" package. DefaultRoleInverseTable = "roles" // DefaultRoleColumn is the table column denoting the default_role relation/edge. DefaultRoleColumn = "user_default_role" )
Variables ¶
var ( // EmailValidator is a validator for the "email" field. It is called by the builders before save. EmailValidator func(string) error // PasswordValidator is a validator for the "password" field. It is called by the builders before save. PasswordValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() string )
var Columns = []string{ FieldID, FieldEmail, FieldPassword, }
Columns holds all SQL columns for user fields.
var ForeignKeys = []string{
"user_created_by",
"user_updated_by",
"user_admin_created_by",
"user_admin_updated_by",
"user_default_role",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "users" table and are not defined as standalone fields in the schema.
var ( // RolesPrimaryKey and RolesColumn2 are the table columns denoting the // primary key for the roles relation (M2M). RolesPrimaryKey = []string{"user_id", "role_id"} )
Functions ¶
func Email ¶
Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
func EmailContains ¶
EmailContains applies the Contains predicate on the "email" field.
func EmailContainsFold ¶
EmailContainsFold applies the ContainsFold predicate on the "email" field.
func EmailEqualFold ¶
EmailEqualFold applies the EqualFold predicate on the "email" field.
func EmailHasPrefix ¶
EmailHasPrefix applies the HasPrefix predicate on the "email" field.
func EmailHasSuffix ¶
EmailHasSuffix applies the HasSuffix predicate on the "email" field.
func EmailNotIn ¶
EmailNotIn applies the NotIn predicate on the "email" field.
func HasAdminCreatedBy ¶
HasAdminCreatedBy applies the HasEdge predicate on the "admin_created_by" edge.
func HasAdminCreatedByWith ¶
HasAdminCreatedByWith applies the HasEdge predicate on the "admin_created_by" edge with a given conditions (other predicates).
func HasAdminUpdatedBy ¶
HasAdminUpdatedBy applies the HasEdge predicate on the "admin_updated_by" edge.
func HasAdminUpdatedByWith ¶
HasAdminUpdatedByWith applies the HasEdge predicate on the "admin_updated_by" edge with a given conditions (other predicates).
func HasCreatedBy ¶
HasCreatedBy applies the HasEdge predicate on the "created_by" edge.
func HasCreatedByWith ¶
HasCreatedByWith applies the HasEdge predicate on the "created_by" edge with a given conditions (other predicates).
func HasDefaultRole ¶
HasDefaultRole applies the HasEdge predicate on the "default_role" edge.
func HasDefaultRoleWith ¶
HasDefaultRoleWith applies the HasEdge predicate on the "default_role" edge with a given conditions (other predicates).
func HasRefCreatedBy ¶
HasRefCreatedBy applies the HasEdge predicate on the "ref_created_by" edge.
func HasRefCreatedByWith ¶
HasRefCreatedByWith applies the HasEdge predicate on the "ref_created_by" edge with a given conditions (other predicates).
func HasRefUpdatedBy ¶
HasRefUpdatedBy applies the HasEdge predicate on the "ref_updated_by" edge.
func HasRefUpdatedByWith ¶
HasRefUpdatedByWith applies the HasEdge predicate on the "ref_updated_by" edge with a given conditions (other predicates).
func HasRolesWith ¶
HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).
func HasUpdatedBy ¶
HasUpdatedBy applies the HasEdge predicate on the "updated_by" edge.
func HasUpdatedByWith ¶
HasUpdatedByWith applies the HasEdge predicate on the "updated_by" edge with a given conditions (other predicates).
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID field.
func Password ¶
Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func PasswordContains ¶
PasswordContains applies the Contains predicate on the "password" field.
func PasswordContainsFold ¶
PasswordContainsFold applies the ContainsFold predicate on the "password" field.
func PasswordEQ ¶
PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEqualFold ¶
PasswordEqualFold applies the EqualFold predicate on the "password" field.
func PasswordGT ¶
PasswordGT applies the GT predicate on the "password" field.
func PasswordGTE ¶
PasswordGTE applies the GTE predicate on the "password" field.
func PasswordHasPrefix ¶
PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
func PasswordHasSuffix ¶
PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
func PasswordIn ¶
PasswordIn applies the In predicate on the "password" field.
func PasswordLT ¶
PasswordLT applies the LT predicate on the "password" field.
func PasswordLTE ¶
PasswordLTE applies the LTE predicate on the "password" field.
func PasswordNEQ ¶
PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNotIn ¶
PasswordNotIn applies the NotIn predicate on the "password" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the User queries.
func ByAdminCreatedByField ¶
func ByAdminCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByAdminCreatedByField orders the results by admin_created_by field.
func ByAdminUpdatedByField ¶
func ByAdminUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByAdminUpdatedByField orders the results by admin_updated_by field.
func ByCreatedByField ¶
func ByCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByCreatedByField orders the results by created_by field.
func ByDefaultRoleField ¶
func ByDefaultRoleField(field string, opts ...sql.OrderTermOption) OrderOption
ByDefaultRoleField orders the results by default_role field.
func ByEmail ¶
func ByEmail(opts ...sql.OrderTermOption) OrderOption
ByEmail orders the results by the email field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByPassword ¶
func ByPassword(opts ...sql.OrderTermOption) OrderOption
ByPassword orders the results by the password field.
func ByRefCreatedBy ¶
func ByRefCreatedBy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRefCreatedBy orders the results by ref_created_by terms.
func ByRefCreatedByCount ¶
func ByRefCreatedByCount(opts ...sql.OrderTermOption) OrderOption
ByRefCreatedByCount orders the results by ref_created_by count.
func ByRefUpdatedBy ¶
func ByRefUpdatedBy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRefUpdatedBy orders the results by ref_updated_by terms.
func ByRefUpdatedByCount ¶
func ByRefUpdatedByCount(opts ...sql.OrderTermOption) OrderOption
ByRefUpdatedByCount orders the results by ref_updated_by count.
func ByRoles ¶
func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRoles orders the results by roles terms.
func ByRolesCount ¶
func ByRolesCount(opts ...sql.OrderTermOption) OrderOption
ByRolesCount orders the results by roles count.
func ByUpdatedByField ¶
func ByUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByUpdatedByField orders the results by updated_by field.