Documentation
¶
Index ¶
- Constants
- Variables
- 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 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 Not(p predicate.User) predicate.User
- func Oauth(v bool) predicate.User
- func OauthEQ(v bool) predicate.User
- func OauthNEQ(v bool) 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 PasswordIsNil() 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 PasswordNotNil() predicate.User
- func RoleEQ(v utils.Role) predicate.User
- func RoleIn(vs ...utils.Role) predicate.User
- func RoleNEQ(v utils.Role) predicate.User
- func RoleNotIn(vs ...utils.Role) predicate.User
- func RoleValidator(r utils.Role) error
- func Sub(v string) predicate.User
- func SubContains(v string) predicate.User
- func SubContainsFold(v string) predicate.User
- func SubEQ(v string) predicate.User
- func SubEqualFold(v string) predicate.User
- func SubGT(v string) predicate.User
- func SubGTE(v string) predicate.User
- func SubHasPrefix(v string) predicate.User
- func SubHasSuffix(v string) predicate.User
- func SubIn(vs ...string) predicate.User
- func SubIsNil() predicate.User
- func SubLT(v string) predicate.User
- func SubLTE(v string) predicate.User
- func SubNEQ(v string) predicate.User
- func SubNotIn(vs ...string) predicate.User
- func SubNotNil() 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 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
- func Webhook(v string) predicate.User
- func WebhookContains(v string) predicate.User
- func WebhookContainsFold(v string) predicate.User
- func WebhookEQ(v string) predicate.User
- func WebhookEqualFold(v string) predicate.User
- func WebhookGT(v string) predicate.User
- func WebhookGTE(v string) predicate.User
- func WebhookHasPrefix(v string) predicate.User
- func WebhookHasSuffix(v string) predicate.User
- func WebhookIn(vs ...string) predicate.User
- func WebhookIsNil() predicate.User
- func WebhookLT(v string) predicate.User
- func WebhookLTE(v string) predicate.User
- func WebhookNEQ(v string) predicate.User
- func WebhookNotIn(vs ...string) predicate.User
- func WebhookNotNil() predicate.User
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByOauth(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func BySub(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUsername(opts ...sql.OrderTermOption) OrderOption
- func ByWebhook(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" // FieldSub holds the string denoting the sub field in the database. FieldSub = "sub" // FieldUsername holds the string denoting the username field in the database. FieldUsername = "username" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // FieldOauth holds the string denoting the oauth field in the database. FieldOauth = "oauth" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // FieldWebhook holds the string denoting the webhook field in the database. FieldWebhook = "webhook" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // Table holds the table name of the user in the database. Table = "users" )
const DefaultRole utils.Role = "user"
Variables ¶
var ( // DefaultOauth holds the default value on creation for the "oauth" field. DefaultOauth bool // 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 // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldSub, FieldUsername, FieldPassword, FieldOauth, FieldRole, FieldWebhook, FieldUpdatedAt, FieldCreatedAt, }
Columns holds all SQL columns for user fields.
Functions ¶
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 Oauth ¶ added in v1.0.8
Oauth applies equality check predicate on the "oauth" field. It's identical to OauthEQ.
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 PasswordIsNil ¶ added in v1.0.8
PasswordIsNil applies the IsNil 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 PasswordNotNil ¶ added in v1.0.8
PasswordNotNil applies the NotNil 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 Sub ¶ added in v1.0.8
Sub applies equality check predicate on the "sub" field. It's identical to SubEQ.
func SubContains ¶ added in v1.0.8
SubContains applies the Contains predicate on the "sub" field.
func SubContainsFold ¶ added in v1.0.8
SubContainsFold applies the ContainsFold predicate on the "sub" field.
func SubEqualFold ¶ added in v1.0.8
SubEqualFold applies the EqualFold predicate on the "sub" field.
func SubHasPrefix ¶ added in v1.0.8
SubHasPrefix applies the HasPrefix predicate on the "sub" field.
func SubHasSuffix ¶ added in v1.0.8
SubHasSuffix applies the HasSuffix predicate on the "sub" 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 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).
func Webhook ¶
Webhook applies equality check predicate on the "webhook" field. It's identical to WebhookEQ.
func WebhookContains ¶
WebhookContains applies the Contains predicate on the "webhook" field.
func WebhookContainsFold ¶
WebhookContainsFold applies the ContainsFold predicate on the "webhook" field.
func WebhookEqualFold ¶
WebhookEqualFold applies the EqualFold predicate on the "webhook" field.
func WebhookGTE ¶
WebhookGTE applies the GTE predicate on the "webhook" field.
func WebhookHasPrefix ¶
WebhookHasPrefix applies the HasPrefix predicate on the "webhook" field.
func WebhookHasSuffix ¶
WebhookHasSuffix applies the HasSuffix predicate on the "webhook" field.
func WebhookIsNil ¶
WebhookIsNil applies the IsNil predicate on the "webhook" field.
func WebhookLTE ¶
WebhookLTE applies the LTE predicate on the "webhook" field.
func WebhookNEQ ¶
WebhookNEQ applies the NEQ predicate on the "webhook" field.
func WebhookNotIn ¶
WebhookNotIn applies the NotIn predicate on the "webhook" field.
func WebhookNotNil ¶
WebhookNotNil applies the NotNil predicate on the "webhook" field.
Types ¶
type OrderOption ¶ added in v1.2.12
OrderOption defines the ordering options for the User queries.
func ByCreatedAt ¶ added in v1.2.12
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByID ¶ added in v1.2.12
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByOauth ¶ added in v1.2.12
func ByOauth(opts ...sql.OrderTermOption) OrderOption
ByOauth orders the results by the oauth field.
func ByPassword ¶ added in v1.2.12
func ByPassword(opts ...sql.OrderTermOption) OrderOption
ByPassword orders the results by the password field.
func ByRole ¶ added in v1.2.12
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func BySub ¶ added in v1.2.12
func BySub(opts ...sql.OrderTermOption) OrderOption
BySub orders the results by the sub field.
func ByUpdatedAt ¶ added in v1.2.12
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUsername ¶ added in v1.2.12
func ByUsername(opts ...sql.OrderTermOption) OrderOption
ByUsername orders the results by the username field.
func ByWebhook ¶ added in v1.2.12
func ByWebhook(opts ...sql.OrderTermOption) OrderOption
ByWebhook orders the results by the webhook field.