user

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const DefaultRole utils.Role = "user"

Variables

View Source
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
)

Columns holds all SQL columns for user fields.

Functions

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.User

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.User

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.User

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.User

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.User

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.User

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.User

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.User

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.User

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func ID

func ID(id uuid.UUID) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Oauth added in v1.0.8

func Oauth(v bool) predicate.User

Oauth applies equality check predicate on the "oauth" field. It's identical to OauthEQ.

func OauthEQ added in v1.0.8

func OauthEQ(v bool) predicate.User

OauthEQ applies the EQ predicate on the "oauth" field.

func OauthNEQ added in v1.0.8

func OauthNEQ(v bool) predicate.User

OauthNEQ applies the NEQ predicate on the "oauth" field.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func Password

func Password(v string) predicate.User

Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.

func PasswordContains

func PasswordContains(v string) predicate.User

PasswordContains applies the Contains predicate on the "password" field.

func PasswordContainsFold

func PasswordContainsFold(v string) predicate.User

PasswordContainsFold applies the ContainsFold predicate on the "password" field.

func PasswordEQ

func PasswordEQ(v string) predicate.User

PasswordEQ applies the EQ predicate on the "password" field.

func PasswordEqualFold

func PasswordEqualFold(v string) predicate.User

PasswordEqualFold applies the EqualFold predicate on the "password" field.

func PasswordGT

func PasswordGT(v string) predicate.User

PasswordGT applies the GT predicate on the "password" field.

func PasswordGTE

func PasswordGTE(v string) predicate.User

PasswordGTE applies the GTE predicate on the "password" field.

func PasswordHasPrefix

func PasswordHasPrefix(v string) predicate.User

PasswordHasPrefix applies the HasPrefix predicate on the "password" field.

func PasswordHasSuffix

func PasswordHasSuffix(v string) predicate.User

PasswordHasSuffix applies the HasSuffix predicate on the "password" field.

func PasswordIn

func PasswordIn(vs ...string) predicate.User

PasswordIn applies the In predicate on the "password" field.

func PasswordIsNil added in v1.0.8

func PasswordIsNil() predicate.User

PasswordIsNil applies the IsNil predicate on the "password" field.

func PasswordLT

func PasswordLT(v string) predicate.User

PasswordLT applies the LT predicate on the "password" field.

func PasswordLTE

func PasswordLTE(v string) predicate.User

PasswordLTE applies the LTE predicate on the "password" field.

func PasswordNEQ

func PasswordNEQ(v string) predicate.User

PasswordNEQ applies the NEQ predicate on the "password" field.

func PasswordNotIn

func PasswordNotIn(vs ...string) predicate.User

PasswordNotIn applies the NotIn predicate on the "password" field.

func PasswordNotNil added in v1.0.8

func PasswordNotNil() predicate.User

PasswordNotNil applies the NotNil predicate on the "password" field.

func RoleEQ

func RoleEQ(v utils.Role) predicate.User

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...utils.Role) predicate.User

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v utils.Role) predicate.User

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...utils.Role) predicate.User

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r utils.Role) error

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

func Sub(v string) predicate.User

Sub applies equality check predicate on the "sub" field. It's identical to SubEQ.

func SubContains added in v1.0.8

func SubContains(v string) predicate.User

SubContains applies the Contains predicate on the "sub" field.

func SubContainsFold added in v1.0.8

func SubContainsFold(v string) predicate.User

SubContainsFold applies the ContainsFold predicate on the "sub" field.

func SubEQ added in v1.0.8

func SubEQ(v string) predicate.User

SubEQ applies the EQ predicate on the "sub" field.

func SubEqualFold added in v1.0.8

func SubEqualFold(v string) predicate.User

SubEqualFold applies the EqualFold predicate on the "sub" field.

func SubGT added in v1.0.8

func SubGT(v string) predicate.User

SubGT applies the GT predicate on the "sub" field.

func SubGTE added in v1.0.8

func SubGTE(v string) predicate.User

SubGTE applies the GTE predicate on the "sub" field.

func SubHasPrefix added in v1.0.8

func SubHasPrefix(v string) predicate.User

SubHasPrefix applies the HasPrefix predicate on the "sub" field.

func SubHasSuffix added in v1.0.8

func SubHasSuffix(v string) predicate.User

SubHasSuffix applies the HasSuffix predicate on the "sub" field.

func SubIn added in v1.0.8

func SubIn(vs ...string) predicate.User

SubIn applies the In predicate on the "sub" field.

func SubIsNil added in v1.0.8

func SubIsNil() predicate.User

SubIsNil applies the IsNil predicate on the "sub" field.

func SubLT added in v1.0.8

func SubLT(v string) predicate.User

SubLT applies the LT predicate on the "sub" field.

func SubLTE added in v1.0.8

func SubLTE(v string) predicate.User

SubLTE applies the LTE predicate on the "sub" field.

func SubNEQ added in v1.0.8

func SubNEQ(v string) predicate.User

SubNEQ applies the NEQ predicate on the "sub" field.

func SubNotIn added in v1.0.8

func SubNotIn(vs ...string) predicate.User

SubNotIn applies the NotIn predicate on the "sub" field.

func SubNotNil added in v1.0.8

func SubNotNil() predicate.User

SubNotNil applies the NotNil predicate on the "sub" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.User

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.User

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.User

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.User

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.User

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.User

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.User

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.User

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.User

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func Username

func Username(v string) predicate.User

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.User

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.User

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.User

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.User

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.User

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.User

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.User

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.User

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

func UsernameIn(vs ...string) predicate.User

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.User

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.User

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.User

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

func UsernameNotIn(vs ...string) predicate.User

UsernameNotIn applies the NotIn predicate on the "username" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Webhook

func Webhook(v string) predicate.User

Webhook applies equality check predicate on the "webhook" field. It's identical to WebhookEQ.

func WebhookContains

func WebhookContains(v string) predicate.User

WebhookContains applies the Contains predicate on the "webhook" field.

func WebhookContainsFold

func WebhookContainsFold(v string) predicate.User

WebhookContainsFold applies the ContainsFold predicate on the "webhook" field.

func WebhookEQ

func WebhookEQ(v string) predicate.User

WebhookEQ applies the EQ predicate on the "webhook" field.

func WebhookEqualFold

func WebhookEqualFold(v string) predicate.User

WebhookEqualFold applies the EqualFold predicate on the "webhook" field.

func WebhookGT

func WebhookGT(v string) predicate.User

WebhookGT applies the GT predicate on the "webhook" field.

func WebhookGTE

func WebhookGTE(v string) predicate.User

WebhookGTE applies the GTE predicate on the "webhook" field.

func WebhookHasPrefix

func WebhookHasPrefix(v string) predicate.User

WebhookHasPrefix applies the HasPrefix predicate on the "webhook" field.

func WebhookHasSuffix

func WebhookHasSuffix(v string) predicate.User

WebhookHasSuffix applies the HasSuffix predicate on the "webhook" field.

func WebhookIn

func WebhookIn(vs ...string) predicate.User

WebhookIn applies the In predicate on the "webhook" field.

func WebhookIsNil

func WebhookIsNil() predicate.User

WebhookIsNil applies the IsNil predicate on the "webhook" field.

func WebhookLT

func WebhookLT(v string) predicate.User

WebhookLT applies the LT predicate on the "webhook" field.

func WebhookLTE

func WebhookLTE(v string) predicate.User

WebhookLTE applies the LTE predicate on the "webhook" field.

func WebhookNEQ

func WebhookNEQ(v string) predicate.User

WebhookNEQ applies the NEQ predicate on the "webhook" field.

func WebhookNotIn

func WebhookNotIn(vs ...string) predicate.User

WebhookNotIn applies the NotIn predicate on the "webhook" field.

func WebhookNotNil

func WebhookNotNil() predicate.User

WebhookNotNil applies the NotNil predicate on the "webhook" field.

Types

type OrderOption added in v1.2.12

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL