Documentation ¶
Index ¶
- Constants
- Variables
- func APIKey(v string) predicate.User
- func APIKeyContains(v string) predicate.User
- func APIKeyContainsFold(v string) predicate.User
- func APIKeyEQ(v string) predicate.User
- func APIKeyEqualFold(v string) predicate.User
- func APIKeyGT(v string) predicate.User
- func APIKeyGTE(v string) predicate.User
- func APIKeyHasPrefix(v string) predicate.User
- func APIKeyHasSuffix(v string) predicate.User
- func APIKeyIn(vs ...string) predicate.User
- func APIKeyLT(v string) predicate.User
- func APIKeyLTE(v string) predicate.User
- func APIKeyNEQ(v string) predicate.User
- func APIKeyNotIn(vs ...string) 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 HashedPassword(v string) predicate.User
- func HashedPasswordContains(v string) predicate.User
- func HashedPasswordContainsFold(v string) predicate.User
- func HashedPasswordEQ(v string) predicate.User
- func HashedPasswordEqualFold(v string) predicate.User
- func HashedPasswordGT(v string) predicate.User
- func HashedPasswordGTE(v string) predicate.User
- func HashedPasswordHasPrefix(v string) predicate.User
- func HashedPasswordHasSuffix(v string) predicate.User
- func HashedPasswordIn(vs ...string) predicate.User
- func HashedPasswordLT(v string) predicate.User
- func HashedPasswordLTE(v string) predicate.User
- func HashedPasswordNEQ(v string) predicate.User
- func HashedPasswordNotIn(vs ...string) 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 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 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 ByAPIKey(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByHashedPassword(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByRole(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" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" // FieldHashedPassword holds the string denoting the hashed_password field in the database. FieldHashedPassword = "hashed_password" // FieldAPIKey holds the string denoting the api_key field in the database. FieldAPIKey = "api_key" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // Table holds the table name of the user in the database. Table = "users" )
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldEmail, FieldHashedPassword, FieldAPIKey, FieldRole, }
Columns holds all SQL columns for user fields.
Functions ¶
func APIKey ¶
APIKey applies equality check predicate on the "api_key" field. It's identical to APIKeyEQ.
func APIKeyContains ¶
APIKeyContains applies the Contains predicate on the "api_key" field.
func APIKeyContainsFold ¶
APIKeyContainsFold applies the ContainsFold predicate on the "api_key" field.
func APIKeyEqualFold ¶
APIKeyEqualFold applies the EqualFold predicate on the "api_key" field.
func APIKeyHasPrefix ¶
APIKeyHasPrefix applies the HasPrefix predicate on the "api_key" field.
func APIKeyHasSuffix ¶
APIKeyHasSuffix applies the HasSuffix predicate on the "api_key" field.
func APIKeyNotIn ¶
APIKeyNotIn applies the NotIn predicate on the "api_key" 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 HashedPassword ¶
HashedPassword applies equality check predicate on the "hashed_password" field. It's identical to HashedPasswordEQ.
func HashedPasswordContains ¶
HashedPasswordContains applies the Contains predicate on the "hashed_password" field.
func HashedPasswordContainsFold ¶
HashedPasswordContainsFold applies the ContainsFold predicate on the "hashed_password" field.
func HashedPasswordEQ ¶
HashedPasswordEQ applies the EQ predicate on the "hashed_password" field.
func HashedPasswordEqualFold ¶
HashedPasswordEqualFold applies the EqualFold predicate on the "hashed_password" field.
func HashedPasswordGT ¶
HashedPasswordGT applies the GT predicate on the "hashed_password" field.
func HashedPasswordGTE ¶
HashedPasswordGTE applies the GTE predicate on the "hashed_password" field.
func HashedPasswordHasPrefix ¶
HashedPasswordHasPrefix applies the HasPrefix predicate on the "hashed_password" field.
func HashedPasswordHasSuffix ¶
HashedPasswordHasSuffix applies the HasSuffix predicate on the "hashed_password" field.
func HashedPasswordIn ¶
HashedPasswordIn applies the In predicate on the "hashed_password" field.
func HashedPasswordLT ¶
HashedPasswordLT applies the LT predicate on the "hashed_password" field.
func HashedPasswordLTE ¶
HashedPasswordLTE applies the LTE predicate on the "hashed_password" field.
func HashedPasswordNEQ ¶
HashedPasswordNEQ applies the NEQ predicate on the "hashed_password" field.
func HashedPasswordNotIn ¶
HashedPasswordNotIn applies the NotIn predicate on the "hashed_password" field.
func RoleValidator ¶
RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.
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 ByAPIKey ¶
func ByAPIKey(opts ...sql.OrderTermOption) OrderOption
ByAPIKey orders the results by the api_key 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 ByHashedPassword ¶
func ByHashedPassword(opts ...sql.OrderTermOption) OrderOption
ByHashedPassword orders the results by the hashed_password field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.