Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func Enable(v bool) predicate.User
- func EnableEQ(v bool) predicate.User
- func EnableNEQ(v bool) predicate.User
- func HasRoles() predicate.User
- func HasRolesWith(preds ...predicate.Role) predicate.User
- func ID(id int) predicate.User
- func IDEQ(id int) predicate.User
- func IDGT(id int) predicate.User
- func IDGTE(id int) predicate.User
- func IDIn(ids ...int) predicate.User
- func IDLT(id int) predicate.User
- func IDLTE(id int) predicate.User
- func IDNEQ(id int) predicate.User
- func IDNotIn(ids ...int) 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 Salt(v string) predicate.User
- func SaltContains(v string) predicate.User
- func SaltContainsFold(v string) predicate.User
- func SaltEQ(v string) predicate.User
- func SaltEqualFold(v string) predicate.User
- func SaltGT(v string) predicate.User
- func SaltGTE(v string) predicate.User
- func SaltHasPrefix(v string) predicate.User
- func SaltHasSuffix(v string) predicate.User
- func SaltIn(vs ...string) predicate.User
- func SaltLT(v string) predicate.User
- func SaltLTE(v string) predicate.User
- func SaltNEQ(v string) predicate.User
- func SaltNotIn(vs ...string) predicate.User
- func Username(v string) predicate.User
- func UsernameContains(v string) predicate.User
- func UsernameContainsFold(v string) predicate.User
- func UsernameEQ(v string) predicate.User
- func UsernameEqualFold(v string) predicate.User
- func UsernameGT(v string) predicate.User
- func UsernameGTE(v string) predicate.User
- func UsernameHasPrefix(v string) predicate.User
- func UsernameHasSuffix(v string) predicate.User
- func UsernameIn(vs ...string) predicate.User
- func UsernameLT(v string) predicate.User
- func UsernameLTE(v string) predicate.User
- func UsernameNEQ(v string) predicate.User
- func UsernameNotIn(vs ...string) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByEnable(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRolesCount(opts ...sql.OrderTermOption) OrderOption
- func BySalt(opts ...sql.OrderTermOption) OrderOption
- func ByUsername(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" // FieldUsername holds the string denoting the username field in the database. FieldUsername = "username" // FieldSalt holds the string denoting the salt field in the database. FieldSalt = "salt" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // FieldEnable holds the string denoting the enable field in the database. FieldEnable = "enable" // EdgeRoles holds the string denoting the roles edge name in mutations. EdgeRoles = "roles" // Table holds the table name of the user in the database. Table = "users" // RolesTable is the table that holds the roles relation/edge. RolesTable = "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" // RolesColumn is the table column denoting the roles relation/edge. RolesColumn = "user_roles" )
Variables ¶
var ( // UsernameValidator is a validator for the "username" field. It is called by the builders before save. UsernameValidator func(string) error // PasswordValidator is a validator for the "password" field. It is called by the builders before save. PasswordValidator func(string) error // DefaultEnable holds the default value on creation for the "enable" field. DefaultEnable bool )
var Columns = []string{ FieldID, FieldUsername, FieldSalt, FieldPassword, FieldEnable, }
Columns holds all SQL columns for user fields.
Functions ¶
func Enable ¶
Enable applies equality check predicate on the "enable" field. It's identical to EnableEQ.
func HasRolesWith ¶
HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).
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 SaltContains ¶
SaltContains applies the Contains predicate on the "salt" field.
func SaltContainsFold ¶
SaltContainsFold applies the ContainsFold predicate on the "salt" field.
func SaltEqualFold ¶
SaltEqualFold applies the EqualFold predicate on the "salt" field.
func SaltHasPrefix ¶
SaltHasPrefix applies the HasPrefix predicate on the "salt" field.
func SaltHasSuffix ¶
SaltHasSuffix applies the HasSuffix predicate on the "salt" field.
func Username ¶
Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
func UsernameContains ¶
UsernameContains applies the Contains predicate on the "username" field.
func UsernameContainsFold ¶
UsernameContainsFold applies the ContainsFold predicate on the "username" field.
func UsernameEQ ¶
UsernameEQ applies the EQ predicate on the "username" field.
func UsernameEqualFold ¶
UsernameEqualFold applies the EqualFold predicate on the "username" field.
func UsernameGT ¶
UsernameGT applies the GT predicate on the "username" field.
func UsernameGTE ¶
UsernameGTE applies the GTE predicate on the "username" field.
func UsernameHasPrefix ¶
UsernameHasPrefix applies the HasPrefix predicate on the "username" field.
func UsernameHasSuffix ¶
UsernameHasSuffix applies the HasSuffix predicate on the "username" field.
func UsernameIn ¶
UsernameIn applies the In predicate on the "username" field.
func UsernameLT ¶
UsernameLT applies the LT predicate on the "username" field.
func UsernameLTE ¶
UsernameLTE applies the LTE predicate on the "username" field.
func UsernameNEQ ¶
UsernameNEQ applies the NEQ predicate on the "username" field.
func UsernameNotIn ¶
UsernameNotIn applies the NotIn predicate on the "username" 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 ByEnable ¶
func ByEnable(opts ...sql.OrderTermOption) OrderOption
ByEnable orders the results by the enable 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 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 BySalt ¶
func BySalt(opts ...sql.OrderTermOption) OrderOption
BySalt orders the results by the salt field.
func ByUsername ¶
func ByUsername(opts ...sql.OrderTermOption) OrderOption
ByUsername orders the results by the username field.