Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func Balance(v int64) predicate.User
- func BalanceEQ(v int64) predicate.User
- func BalanceGT(v int64) predicate.User
- func BalanceGTE(v int64) predicate.User
- func BalanceIn(vs ...int64) predicate.User
- func BalanceLT(v int64) predicate.User
- func BalanceLTE(v int64) predicate.User
- func BalanceNEQ(v int64) predicate.User
- func BalanceNotIn(vs ...int64) predicate.User
- func BalanceWarningThreshold(v int64) predicate.User
- func BalanceWarningThresholdEQ(v int64) predicate.User
- func BalanceWarningThresholdGT(v int64) predicate.User
- func BalanceWarningThresholdGTE(v int64) predicate.User
- func BalanceWarningThresholdIn(vs ...int64) predicate.User
- func BalanceWarningThresholdLT(v int64) predicate.User
- func BalanceWarningThresholdLTE(v int64) predicate.User
- func BalanceWarningThresholdNEQ(v int64) predicate.User
- func BalanceWarningThresholdNotIn(vs ...int64) 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 HasGroupAssignments() predicate.User
- func HasGroupAssignmentsWith(preds ...predicate.GroupAssignment) predicate.User
- func HasKeys() predicate.User
- func HasKeysWith(preds ...predicate.Key) predicate.User
- func HasManagementKeys() predicate.User
- func HasManagementKeysWith(preds ...predicate.ManagementKey) predicate.User
- func HasTempBalances() predicate.User
- func HasTempBalancesWith(preds ...predicate.TempBalance) predicate.User
- func ID(id int64) predicate.User
- func IDEQ(id int64) predicate.User
- func IDGT(id int64) predicate.User
- func IDGTE(id int64) predicate.User
- func IDIn(ids ...int64) predicate.User
- func IDLT(id int64) predicate.User
- func IDLTE(id int64) predicate.User
- func IDNEQ(id int64) predicate.User
- func IDNotIn(ids ...int64) predicate.User
- func MaxConcurrency(v int) predicate.User
- func MaxConcurrencyEQ(v int) predicate.User
- func MaxConcurrencyGT(v int) predicate.User
- func MaxConcurrencyGTE(v int) predicate.User
- func MaxConcurrencyIn(vs ...int) predicate.User
- func MaxConcurrencyLT(v int) predicate.User
- func MaxConcurrencyLTE(v int) predicate.User
- func MaxConcurrencyNEQ(v int) predicate.User
- func MaxConcurrencyNotIn(vs ...int) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func PasswordHash(v string) predicate.User
- func PasswordHashContains(v string) predicate.User
- func PasswordHashContainsFold(v string) predicate.User
- func PasswordHashEQ(v string) predicate.User
- func PasswordHashEqualFold(v string) predicate.User
- func PasswordHashGT(v string) predicate.User
- func PasswordHashGTE(v string) predicate.User
- func PasswordHashHasPrefix(v string) predicate.User
- func PasswordHashHasSuffix(v string) predicate.User
- func PasswordHashIn(vs ...string) predicate.User
- func PasswordHashLT(v string) predicate.User
- func PasswordHashLTE(v string) predicate.User
- func PasswordHashNEQ(v string) predicate.User
- func PasswordHashNotIn(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 StatusEQ(v Status) predicate.User
- func StatusIn(vs ...Status) predicate.User
- func StatusNEQ(v Status) predicate.User
- func StatusNotIn(vs ...Status) predicate.User
- func StatusValidator(s Status) error
- func TokenVersion(v int64) predicate.User
- func TokenVersionEQ(v int64) predicate.User
- func TokenVersionGT(v int64) predicate.User
- func TokenVersionGTE(v int64) predicate.User
- func TokenVersionIn(vs ...int64) predicate.User
- func TokenVersionLT(v int64) predicate.User
- func TokenVersionLTE(v int64) predicate.User
- func TokenVersionNEQ(v int64) predicate.User
- func TokenVersionNotIn(vs ...int64) 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 ByBalance(opts ...sql.OrderTermOption) OrderOption
- func ByBalanceWarningThreshold(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByGroupAssignments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByGroupAssignmentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKeys(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByKeysCount(opts ...sql.OrderTermOption) OrderOption
- func ByManagementKeys(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByManagementKeysCount(opts ...sql.OrderTermOption) OrderOption
- func ByMaxConcurrency(opts ...sql.OrderTermOption) OrderOption
- func ByPasswordHash(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByTempBalances(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTempBalancesCount(opts ...sql.OrderTermOption) OrderOption
- func ByTokenVersion(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Role
- type Status
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" // FieldPasswordHash holds the string denoting the password_hash field in the database. FieldPasswordHash = "password_hash" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldMaxConcurrency holds the string denoting the max_concurrency field in the database. FieldMaxConcurrency = "max_concurrency" // FieldBalance holds the string denoting the balance field in the database. FieldBalance = "balance" // FieldBalanceWarningThreshold holds the string denoting the balance_warning_threshold field in the database. FieldBalanceWarningThreshold = "balance_warning_threshold" // FieldTokenVersion holds the string denoting the token_version field in the database. FieldTokenVersion = "token_version" // 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" // EdgeKeys holds the string denoting the keys edge name in mutations. EdgeKeys = "keys" // EdgeManagementKeys holds the string denoting the management_keys edge name in mutations. EdgeManagementKeys = "management_keys" // EdgeTempBalances holds the string denoting the temp_balances edge name in mutations. EdgeTempBalances = "temp_balances" // EdgeGroupAssignments holds the string denoting the group_assignments edge name in mutations. EdgeGroupAssignments = "group_assignments" // Table holds the table name of the user in the database. Table = "users" // KeysTable is the table that holds the keys relation/edge. KeysTable = "keys" // KeysInverseTable is the table name for the Key entity. // It exists in this package in order to avoid circular dependency with the "key" package. KeysInverseTable = "keys" // KeysColumn is the table column denoting the keys relation/edge. KeysColumn = "user_id" // ManagementKeysTable is the table that holds the management_keys relation/edge. ManagementKeysTable = "management_keys" // ManagementKeysInverseTable is the table name for the ManagementKey entity. // It exists in this package in order to avoid circular dependency with the "managementkey" package. ManagementKeysInverseTable = "management_keys" // ManagementKeysColumn is the table column denoting the management_keys relation/edge. ManagementKeysColumn = "user_id" // TempBalancesTable is the table that holds the temp_balances relation/edge. TempBalancesTable = "temp_balances" // TempBalancesInverseTable is the table name for the TempBalance entity. // It exists in this package in order to avoid circular dependency with the "tempbalance" package. TempBalancesInverseTable = "temp_balances" // TempBalancesColumn is the table column denoting the temp_balances relation/edge. TempBalancesColumn = "user_id" // GroupAssignmentsTable is the table that holds the group_assignments relation/edge. GroupAssignmentsTable = "group_assignments" // GroupAssignmentsInverseTable is the table name for the GroupAssignment entity. // It exists in this package in order to avoid circular dependency with the "groupassignment" package. GroupAssignmentsInverseTable = "group_assignments" // GroupAssignmentsColumn is the table column denoting the group_assignments relation/edge. GroupAssignmentsColumn = "user_id" )
const DefaultRole = RoleUser
RoleUser is the default value of the Role enum.
const DefaultStatus = StatusActive
StatusActive is the default value of the Status enum.
Variables ¶
var ( // DefaultMaxConcurrency holds the default value on creation for the "max_concurrency" field. DefaultMaxConcurrency int // DefaultBalance holds the default value on creation for the "balance" field. DefaultBalance int64 // DefaultBalanceWarningThreshold holds the default value on creation for the "balance_warning_threshold" field. DefaultBalanceWarningThreshold int64 // DefaultTokenVersion holds the default value on creation for the "token_version" field. DefaultTokenVersion int64 // 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 )
var Columns = []string{ FieldID, FieldEmail, FieldPasswordHash, FieldRole, FieldStatus, FieldMaxConcurrency, FieldBalance, FieldBalanceWarningThreshold, FieldTokenVersion, FieldCreatedAt, FieldUpdatedAt, }
Columns holds all SQL columns for user fields.
Functions ¶
func Balance ¶
Balance applies equality check predicate on the "balance" field. It's identical to BalanceEQ.
func BalanceGTE ¶
BalanceGTE applies the GTE predicate on the "balance" field.
func BalanceLTE ¶
BalanceLTE applies the LTE predicate on the "balance" field.
func BalanceNEQ ¶
BalanceNEQ applies the NEQ predicate on the "balance" field.
func BalanceNotIn ¶
BalanceNotIn applies the NotIn predicate on the "balance" field.
func BalanceWarningThreshold ¶
BalanceWarningThreshold applies equality check predicate on the "balance_warning_threshold" field. It's identical to BalanceWarningThresholdEQ.
func BalanceWarningThresholdEQ ¶
BalanceWarningThresholdEQ applies the EQ predicate on the "balance_warning_threshold" field.
func BalanceWarningThresholdGT ¶
BalanceWarningThresholdGT applies the GT predicate on the "balance_warning_threshold" field.
func BalanceWarningThresholdGTE ¶
BalanceWarningThresholdGTE applies the GTE predicate on the "balance_warning_threshold" field.
func BalanceWarningThresholdIn ¶
BalanceWarningThresholdIn applies the In predicate on the "balance_warning_threshold" field.
func BalanceWarningThresholdLT ¶
BalanceWarningThresholdLT applies the LT predicate on the "balance_warning_threshold" field.
func BalanceWarningThresholdLTE ¶
BalanceWarningThresholdLTE applies the LTE predicate on the "balance_warning_threshold" field.
func BalanceWarningThresholdNEQ ¶
BalanceWarningThresholdNEQ applies the NEQ predicate on the "balance_warning_threshold" field.
func BalanceWarningThresholdNotIn ¶
BalanceWarningThresholdNotIn applies the NotIn predicate on the "balance_warning_threshold" 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 HasGroupAssignments ¶
HasGroupAssignments applies the HasEdge predicate on the "group_assignments" edge.
func HasGroupAssignmentsWith ¶
func HasGroupAssignmentsWith(preds ...predicate.GroupAssignment) predicate.User
HasGroupAssignmentsWith applies the HasEdge predicate on the "group_assignments" edge with a given conditions (other predicates).
func HasKeysWith ¶
HasKeysWith applies the HasEdge predicate on the "keys" edge with a given conditions (other predicates).
func HasManagementKeys ¶
HasManagementKeys applies the HasEdge predicate on the "management_keys" edge.
func HasManagementKeysWith ¶
func HasManagementKeysWith(preds ...predicate.ManagementKey) predicate.User
HasManagementKeysWith applies the HasEdge predicate on the "management_keys" edge with a given conditions (other predicates).
func HasTempBalances ¶
HasTempBalances applies the HasEdge predicate on the "temp_balances" edge.
func HasTempBalancesWith ¶
func HasTempBalancesWith(preds ...predicate.TempBalance) predicate.User
HasTempBalancesWith applies the HasEdge predicate on the "temp_balances" edge with a given conditions (other predicates).
func MaxConcurrency ¶
MaxConcurrency applies equality check predicate on the "max_concurrency" field. It's identical to MaxConcurrencyEQ.
func MaxConcurrencyEQ ¶
MaxConcurrencyEQ applies the EQ predicate on the "max_concurrency" field.
func MaxConcurrencyGT ¶
MaxConcurrencyGT applies the GT predicate on the "max_concurrency" field.
func MaxConcurrencyGTE ¶
MaxConcurrencyGTE applies the GTE predicate on the "max_concurrency" field.
func MaxConcurrencyIn ¶
MaxConcurrencyIn applies the In predicate on the "max_concurrency" field.
func MaxConcurrencyLT ¶
MaxConcurrencyLT applies the LT predicate on the "max_concurrency" field.
func MaxConcurrencyLTE ¶
MaxConcurrencyLTE applies the LTE predicate on the "max_concurrency" field.
func MaxConcurrencyNEQ ¶
MaxConcurrencyNEQ applies the NEQ predicate on the "max_concurrency" field.
func MaxConcurrencyNotIn ¶
MaxConcurrencyNotIn applies the NotIn predicate on the "max_concurrency" field.
func PasswordHash ¶
PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.
func PasswordHashContains ¶
PasswordHashContains applies the Contains predicate on the "password_hash" field.
func PasswordHashContainsFold ¶
PasswordHashContainsFold applies the ContainsFold predicate on the "password_hash" field.
func PasswordHashEQ ¶
PasswordHashEQ applies the EQ predicate on the "password_hash" field.
func PasswordHashEqualFold ¶
PasswordHashEqualFold applies the EqualFold predicate on the "password_hash" field.
func PasswordHashGT ¶
PasswordHashGT applies the GT predicate on the "password_hash" field.
func PasswordHashGTE ¶
PasswordHashGTE applies the GTE predicate on the "password_hash" field.
func PasswordHashHasPrefix ¶
PasswordHashHasPrefix applies the HasPrefix predicate on the "password_hash" field.
func PasswordHashHasSuffix ¶
PasswordHashHasSuffix applies the HasSuffix predicate on the "password_hash" field.
func PasswordHashIn ¶
PasswordHashIn applies the In predicate on the "password_hash" field.
func PasswordHashLT ¶
PasswordHashLT applies the LT predicate on the "password_hash" field.
func PasswordHashLTE ¶
PasswordHashLTE applies the LTE predicate on the "password_hash" field.
func PasswordHashNEQ ¶
PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.
func PasswordHashNotIn ¶
PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.
func RoleValidator ¶
RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func TokenVersion ¶
TokenVersion applies equality check predicate on the "token_version" field. It's identical to TokenVersionEQ.
func TokenVersionEQ ¶
TokenVersionEQ applies the EQ predicate on the "token_version" field.
func TokenVersionGT ¶
TokenVersionGT applies the GT predicate on the "token_version" field.
func TokenVersionGTE ¶
TokenVersionGTE applies the GTE predicate on the "token_version" field.
func TokenVersionIn ¶
TokenVersionIn applies the In predicate on the "token_version" field.
func TokenVersionLT ¶
TokenVersionLT applies the LT predicate on the "token_version" field.
func TokenVersionLTE ¶
TokenVersionLTE applies the LTE predicate on the "token_version" field.
func TokenVersionNEQ ¶
TokenVersionNEQ applies the NEQ predicate on the "token_version" field.
func TokenVersionNotIn ¶
TokenVersionNotIn applies the NotIn predicate on the "token_version" 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 ByBalance ¶
func ByBalance(opts ...sql.OrderTermOption) OrderOption
ByBalance orders the results by the balance field.
func ByBalanceWarningThreshold ¶
func ByBalanceWarningThreshold(opts ...sql.OrderTermOption) OrderOption
ByBalanceWarningThreshold orders the results by the balance_warning_threshold field.
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 ByGroupAssignments ¶
func ByGroupAssignments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByGroupAssignments orders the results by group_assignments terms.
func ByGroupAssignmentsCount ¶
func ByGroupAssignmentsCount(opts ...sql.OrderTermOption) OrderOption
ByGroupAssignmentsCount orders the results by group_assignments count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByKeys ¶
func ByKeys(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByKeys orders the results by keys terms.
func ByKeysCount ¶
func ByKeysCount(opts ...sql.OrderTermOption) OrderOption
ByKeysCount orders the results by keys count.
func ByManagementKeys ¶
func ByManagementKeys(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByManagementKeys orders the results by management_keys terms.
func ByManagementKeysCount ¶
func ByManagementKeysCount(opts ...sql.OrderTermOption) OrderOption
ByManagementKeysCount orders the results by management_keys count.
func ByMaxConcurrency ¶
func ByMaxConcurrency(opts ...sql.OrderTermOption) OrderOption
ByMaxConcurrency orders the results by the max_concurrency field.
func ByPasswordHash ¶
func ByPasswordHash(opts ...sql.OrderTermOption) OrderOption
ByPasswordHash orders the results by the password_hash field.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func ByStatus ¶
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByTempBalances ¶
func ByTempBalances(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTempBalances orders the results by temp_balances terms.
func ByTempBalancesCount ¶
func ByTempBalancesCount(opts ...sql.OrderTermOption) OrderOption
ByTempBalancesCount orders the results by temp_balances count.
func ByTokenVersion ¶
func ByTokenVersion(opts ...sql.OrderTermOption) OrderOption
ByTokenVersion orders the results by the token_version field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.