Documentation ¶
Index ¶
- Constants
- Variables
- func ActivatedOn(v time.Time) predicate.User
- func ActivatedOnEQ(v time.Time) predicate.User
- func ActivatedOnGT(v time.Time) predicate.User
- func ActivatedOnGTE(v time.Time) predicate.User
- func ActivatedOnIn(vs ...time.Time) predicate.User
- func ActivatedOnIsNil() predicate.User
- func ActivatedOnLT(v time.Time) predicate.User
- func ActivatedOnLTE(v time.Time) predicate.User
- func ActivatedOnNEQ(v time.Time) predicate.User
- func ActivatedOnNotIn(vs ...time.Time) predicate.User
- func ActivatedOnNotNil() predicate.User
- func And(predicates ...predicate.User) predicate.User
- func CreatedAt(v time.Time) predicate.User
- func CreatedAtEQ(v time.Time) predicate.User
- func CreatedAtGT(v time.Time) predicate.User
- func CreatedAtGTE(v time.Time) predicate.User
- func CreatedAtIn(vs ...time.Time) predicate.User
- func CreatedAtLT(v time.Time) predicate.User
- func CreatedAtLTE(v time.Time) predicate.User
- func CreatedAtNEQ(v time.Time) predicate.User
- func CreatedAtNotIn(vs ...time.Time) 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 HasAuthTokens() predicate.User
- func HasAuthTokensWith(preds ...predicate.AuthTokens) predicate.User
- func HasGroup() predicate.User
- func HasGroupWith(preds ...predicate.Group) predicate.User
- func HasNotifiers() predicate.User
- func HasNotifiersWith(preds ...predicate.Notifier) predicate.User
- func ID(id uuid.UUID) predicate.User
- func IDEQ(id uuid.UUID) predicate.User
- func IDGT(id uuid.UUID) predicate.User
- func IDGTE(id uuid.UUID) predicate.User
- func IDIn(ids ...uuid.UUID) predicate.User
- func IDLT(id uuid.UUID) predicate.User
- func IDLTE(id uuid.UUID) predicate.User
- func IDNEQ(id uuid.UUID) predicate.User
- func IDNotIn(ids ...uuid.UUID) predicate.User
- func IsSuperuser(v bool) predicate.User
- func IsSuperuserEQ(v bool) predicate.User
- func IsSuperuserNEQ(v bool) predicate.User
- func Name(v string) predicate.User
- func NameContains(v string) predicate.User
- func NameContainsFold(v string) predicate.User
- func NameEQ(v string) predicate.User
- func NameEqualFold(v string) predicate.User
- func NameGT(v string) predicate.User
- func NameGTE(v string) predicate.User
- func NameHasPrefix(v string) predicate.User
- func NameHasSuffix(v string) predicate.User
- func NameIn(vs ...string) predicate.User
- func NameLT(v string) predicate.User
- func NameLTE(v string) predicate.User
- func NameNEQ(v string) predicate.User
- func NameNotIn(vs ...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 RoleEQ(v Role) predicate.User
- func RoleIn(vs ...Role) predicate.User
- func RoleNEQ(v Role) predicate.User
- func RoleNotIn(vs ...Role) predicate.User
- func RoleValidator(r Role) error
- func Superuser(v bool) predicate.User
- func SuperuserEQ(v bool) predicate.User
- func SuperuserNEQ(v bool) predicate.User
- func UpdatedAt(v time.Time) predicate.User
- func UpdatedAtEQ(v time.Time) predicate.User
- func UpdatedAtGT(v time.Time) predicate.User
- func UpdatedAtGTE(v time.Time) predicate.User
- func UpdatedAtIn(vs ...time.Time) predicate.User
- func UpdatedAtLT(v time.Time) predicate.User
- func UpdatedAtLTE(v time.Time) predicate.User
- func UpdatedAtNEQ(v time.Time) predicate.User
- func UpdatedAtNotIn(vs ...time.Time) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByActivatedOn(opts ...sql.OrderTermOption) OrderOption
- func ByAuthTokens(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAuthTokensCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsSuperuser(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByNotifiers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNotifiersCount(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func BySuperuser(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Role
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" // 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" // FieldName holds the string denoting the name field in the database. FieldName = "name" // 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" // FieldIsSuperuser holds the string denoting the is_superuser field in the database. FieldIsSuperuser = "is_superuser" // FieldSuperuser holds the string denoting the superuser field in the database. FieldSuperuser = "superuser" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // FieldActivatedOn holds the string denoting the activated_on field in the database. FieldActivatedOn = "activated_on" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // EdgeAuthTokens holds the string denoting the auth_tokens edge name in mutations. EdgeAuthTokens = "auth_tokens" // EdgeNotifiers holds the string denoting the notifiers edge name in mutations. EdgeNotifiers = "notifiers" // Table holds the table name of the user in the database. Table = "users" // GroupTable is the table that holds the group relation/edge. GroupTable = "users" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupInverseTable = "groups" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "group_users" // AuthTokensTable is the table that holds the auth_tokens relation/edge. AuthTokensTable = "auth_tokens" // AuthTokensInverseTable is the table name for the AuthTokens entity. // It exists in this package in order to avoid circular dependency with the "authtokens" package. AuthTokensInverseTable = "auth_tokens" // AuthTokensColumn is the table column denoting the auth_tokens relation/edge. AuthTokensColumn = "user_auth_tokens" // NotifiersTable is the table that holds the notifiers relation/edge. NotifiersTable = "notifiers" // NotifiersInverseTable is the table name for the Notifier entity. // It exists in this package in order to avoid circular dependency with the "notifier" package. NotifiersInverseTable = "notifiers" // NotifiersColumn is the table column denoting the notifiers relation/edge. NotifiersColumn = "user_id" )
const DefaultRole = RoleUser
RoleUser is the default value of the Role enum.
Variables ¶
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 // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // 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 // DefaultIsSuperuser holds the default value on creation for the "is_superuser" field. DefaultIsSuperuser bool // DefaultSuperuser holds the default value on creation for the "superuser" field. DefaultSuperuser bool // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldName, FieldEmail, FieldPassword, FieldIsSuperuser, FieldSuperuser, FieldRole, FieldActivatedOn, }
Columns holds all SQL columns for user fields.
var ForeignKeys = []string{
"group_users",
}
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 ActivatedOn ¶
ActivatedOn applies equality check predicate on the "activated_on" field. It's identical to ActivatedOnEQ.
func ActivatedOnEQ ¶
ActivatedOnEQ applies the EQ predicate on the "activated_on" field.
func ActivatedOnGT ¶
ActivatedOnGT applies the GT predicate on the "activated_on" field.
func ActivatedOnGTE ¶
ActivatedOnGTE applies the GTE predicate on the "activated_on" field.
func ActivatedOnIn ¶
ActivatedOnIn applies the In predicate on the "activated_on" field.
func ActivatedOnIsNil ¶
ActivatedOnIsNil applies the IsNil predicate on the "activated_on" field.
func ActivatedOnLT ¶
ActivatedOnLT applies the LT predicate on the "activated_on" field.
func ActivatedOnLTE ¶
ActivatedOnLTE applies the LTE predicate on the "activated_on" field.
func ActivatedOnNEQ ¶
ActivatedOnNEQ applies the NEQ predicate on the "activated_on" field.
func ActivatedOnNotIn ¶
ActivatedOnNotIn applies the NotIn predicate on the "activated_on" field.
func ActivatedOnNotNil ¶
ActivatedOnNotNil applies the NotNil predicate on the "activated_on" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
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 HasAuthTokens ¶
HasAuthTokens applies the HasEdge predicate on the "auth_tokens" edge.
func HasAuthTokensWith ¶
func HasAuthTokensWith(preds ...predicate.AuthTokens) predicate.User
HasAuthTokensWith applies the HasEdge predicate on the "auth_tokens" edge with a given conditions (other predicates).
func HasGroupWith ¶
HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func HasNotifiers ¶
HasNotifiers applies the HasEdge predicate on the "notifiers" edge.
func HasNotifiersWith ¶
HasNotifiersWith applies the HasEdge predicate on the "notifiers" edge with a given conditions (other predicates).
func IsSuperuser ¶
IsSuperuser applies equality check predicate on the "is_superuser" field. It's identical to IsSuperuserEQ.
func IsSuperuserEQ ¶
IsSuperuserEQ applies the EQ predicate on the "is_superuser" field.
func IsSuperuserNEQ ¶
IsSuperuserNEQ applies the NEQ predicate on the "is_superuser" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" 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 RoleValidator ¶
RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.
func Superuser ¶
Superuser applies equality check predicate on the "superuser" field. It's identical to SuperuserEQ.
func SuperuserEQ ¶
SuperuserEQ applies the EQ predicate on the "superuser" field.
func SuperuserNEQ ¶
SuperuserNEQ applies the NEQ predicate on the "superuser" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 ByActivatedOn ¶
func ByActivatedOn(opts ...sql.OrderTermOption) OrderOption
ByActivatedOn orders the results by the activated_on field.
func ByAuthTokens ¶
func ByAuthTokens(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAuthTokens orders the results by auth_tokens terms.
func ByAuthTokensCount ¶
func ByAuthTokensCount(opts ...sql.OrderTermOption) OrderOption
ByAuthTokensCount orders the results by auth_tokens count.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByEmail ¶
func ByEmail(opts ...sql.OrderTermOption) OrderOption
ByEmail orders the results by the email field.
func ByGroupField ¶
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
ByGroupField orders the results by group field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIsSuperuser ¶
func ByIsSuperuser(opts ...sql.OrderTermOption) OrderOption
ByIsSuperuser orders the results by the is_superuser field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByNotifiers ¶
func ByNotifiers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByNotifiers orders the results by notifiers terms.
func ByNotifiersCount ¶
func ByNotifiersCount(opts ...sql.OrderTermOption) OrderOption
ByNotifiersCount orders the results by notifiers count.
func ByPassword ¶
func ByPassword(opts ...sql.OrderTermOption) OrderOption
ByPassword orders the results by the password field.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func BySuperuser ¶
func BySuperuser(opts ...sql.OrderTermOption) OrderOption
BySuperuser orders the results by the superuser field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.