user

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: AGPL-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"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldLocale holds the string denoting the locale field in the database.
	FieldLocale = "locale"
	// 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"
	// FieldPicture holds the string denoting the picture field in the database.
	FieldPicture = "picture"
	// FieldPasswordHash holds the string denoting the password_hash field in the database.
	FieldPasswordHash = "password_hash"
	// FieldAdmin holds the string denoting the admin field in the database.
	FieldAdmin = "admin"
	// FieldAnonymous holds the string denoting the anonymous field in the database.
	FieldAnonymous = "anonymous"
	// FieldUseDarkTheme holds the string denoting the use_dark_theme field in the database.
	FieldUseDarkTheme = "use_dark_theme"
	// FieldMeta holds the string denoting the meta field in the database.
	FieldMeta = "meta"
	// EdgeSessions holds the string denoting the sessions edge name in mutations.
	EdgeSessions = "sessions"
	// EdgeTakes holds the string denoting the takes edge name in mutations.
	EdgeTakes = "takes"
	// EdgeParent holds the string denoting the parent edge name in mutations.
	EdgeParent = "parent"
	// EdgeAliases holds the string denoting the aliases edge name in mutations.
	EdgeAliases = "aliases"
	// Table holds the table name of the user in the database.
	Table = "users"
	// SessionsTable is the table that holds the sessions relation/edge.
	SessionsTable = "user_sessions"
	// SessionsInverseTable is the table name for the UserSession entity.
	// It exists in this package in order to avoid circular dependency with the "usersession" package.
	SessionsInverseTable = "user_sessions"
	// SessionsColumn is the table column denoting the sessions relation/edge.
	SessionsColumn = "user_sessions"
	// TakesTable is the table that holds the takes relation/edge.
	TakesTable = "takes"
	// TakesInverseTable is the table name for the Take entity.
	// It exists in this package in order to avoid circular dependency with the "take" package.
	TakesInverseTable = "takes"
	// TakesColumn is the table column denoting the takes relation/edge.
	TakesColumn = "user_takes"
	// ParentTable is the table that holds the parent relation/edge.
	ParentTable = "users"
	// ParentColumn is the table column denoting the parent relation/edge.
	ParentColumn = "user_aliases"
	// AliasesTable is the table that holds the aliases relation/edge.
	AliasesTable = "users"
	// AliasesColumn is the table column denoting the aliases relation/edge.
	AliasesColumn = "user_aliases"
)

Variables

View Source
var (
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime 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
	// DefaultPicture holds the default value on creation for the "picture" field.
	DefaultPicture string
	// DefaultAdmin holds the default value on creation for the "admin" field.
	DefaultAdmin bool
	// DefaultAnonymous holds the default value on creation for the "anonymous" field.
	DefaultAnonymous bool
	// DefaultUseDarkTheme holds the default value on creation for the "use_dark_theme" field.
	DefaultUseDarkTheme bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for user fields.

View Source
var ForeignKeys = []string{
	"user_aliases",
}

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 Admin

func Admin(v bool) predicate.User

Admin applies equality check predicate on the "admin" field. It's identical to AdminEQ.

func AdminEQ

func AdminEQ(v bool) predicate.User

AdminEQ applies the EQ predicate on the "admin" field.

func AdminNEQ

func AdminNEQ(v bool) predicate.User

AdminNEQ applies the NEQ predicate on the "admin" field.

func And

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

And groups predicates with the AND operator between them.

func Anonymous

func Anonymous(v bool) predicate.User

Anonymous applies equality check predicate on the "anonymous" field. It's identical to AnonymousEQ.

func AnonymousEQ

func AnonymousEQ(v bool) predicate.User

AnonymousEQ applies the EQ predicate on the "anonymous" field.

func AnonymousNEQ

func AnonymousNEQ(v bool) predicate.User

AnonymousNEQ applies the NEQ predicate on the "anonymous" field.

func CreateTime

func CreateTime(v time.Time) predicate.User

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.User

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.User

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.User

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

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

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.User

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.User

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.User

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

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

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

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

EmailIn applies the In predicate on the "email" field.

func EmailIsNil

func EmailIsNil() predicate.User

EmailIsNil applies the IsNil predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

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

EmailNotIn applies the NotIn predicate on the "email" field.

func EmailNotNil

func EmailNotNil() predicate.User

EmailNotNil applies the NotNil predicate on the "email" field.

func HasAliases

func HasAliases() predicate.User

HasAliases applies the HasEdge predicate on the "aliases" edge.

func HasAliasesWith

func HasAliasesWith(preds ...predicate.User) predicate.User

HasAliasesWith applies the HasEdge predicate on the "aliases" edge with a given conditions (other predicates).

func HasParent

func HasParent() predicate.User

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.User) predicate.User

HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).

func HasSessions

func HasSessions() predicate.User

HasSessions applies the HasEdge predicate on the "sessions" edge.

func HasSessionsWith

func HasSessionsWith(preds ...predicate.UserSession) predicate.User

HasSessionsWith applies the HasEdge predicate on the "sessions" edge with a given conditions (other predicates).

func HasTakes

func HasTakes() predicate.User

HasTakes applies the HasEdge predicate on the "takes" edge.

func HasTakesWith

func HasTakesWith(preds ...predicate.Take) predicate.User

HasTakesWith applies the HasEdge predicate on the "takes" edge with a given conditions (other predicates).

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 LocaleEQ

func LocaleEQ(v Locale) predicate.User

LocaleEQ applies the EQ predicate on the "locale" field.

func LocaleIn

func LocaleIn(vs ...Locale) predicate.User

LocaleIn applies the In predicate on the "locale" field.

func LocaleNEQ

func LocaleNEQ(v Locale) predicate.User

LocaleNEQ applies the NEQ predicate on the "locale" field.

func LocaleNotIn

func LocaleNotIn(vs ...Locale) predicate.User

LocaleNotIn applies the NotIn predicate on the "locale" field.

func LocaleValidator

func LocaleValidator(l Locale) error

LocaleValidator is a validator for the "locale" field enum values. It is called by the builders before save.

func MetaIsNil

func MetaIsNil() predicate.User

MetaIsNil applies the IsNil predicate on the "meta" field.

func MetaNotNil

func MetaNotNil() predicate.User

MetaNotNil applies the NotNil predicate on the "meta" field.

func Name

func Name(v string) predicate.User

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.User

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.User

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.User

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.User

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.User

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.User

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.User

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.User

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

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

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.User

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.User

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.User

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

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

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

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

Or groups predicates with the OR operator between them.

func PasswordHash

func PasswordHash(v string) predicate.User

PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.

func PasswordHashContains

func PasswordHashContains(v string) predicate.User

PasswordHashContains applies the Contains predicate on the "password_hash" field.

func PasswordHashContainsFold

func PasswordHashContainsFold(v string) predicate.User

PasswordHashContainsFold applies the ContainsFold predicate on the "password_hash" field.

func PasswordHashEQ

func PasswordHashEQ(v string) predicate.User

PasswordHashEQ applies the EQ predicate on the "password_hash" field.

func PasswordHashEqualFold

func PasswordHashEqualFold(v string) predicate.User

PasswordHashEqualFold applies the EqualFold predicate on the "password_hash" field.

func PasswordHashGT

func PasswordHashGT(v string) predicate.User

PasswordHashGT applies the GT predicate on the "password_hash" field.

func PasswordHashGTE

func PasswordHashGTE(v string) predicate.User

PasswordHashGTE applies the GTE predicate on the "password_hash" field.

func PasswordHashHasPrefix

func PasswordHashHasPrefix(v string) predicate.User

PasswordHashHasPrefix applies the HasPrefix predicate on the "password_hash" field.

func PasswordHashHasSuffix

func PasswordHashHasSuffix(v string) predicate.User

PasswordHashHasSuffix applies the HasSuffix predicate on the "password_hash" field.

func PasswordHashIn

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

PasswordHashIn applies the In predicate on the "password_hash" field.

func PasswordHashLT

func PasswordHashLT(v string) predicate.User

PasswordHashLT applies the LT predicate on the "password_hash" field.

func PasswordHashLTE

func PasswordHashLTE(v string) predicate.User

PasswordHashLTE applies the LTE predicate on the "password_hash" field.

func PasswordHashNEQ

func PasswordHashNEQ(v string) predicate.User

PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.

func PasswordHashNotIn

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

PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.

func Picture

func Picture(v string) predicate.User

Picture applies equality check predicate on the "picture" field. It's identical to PictureEQ.

func PictureContains

func PictureContains(v string) predicate.User

PictureContains applies the Contains predicate on the "picture" field.

func PictureContainsFold

func PictureContainsFold(v string) predicate.User

PictureContainsFold applies the ContainsFold predicate on the "picture" field.

func PictureEQ

func PictureEQ(v string) predicate.User

PictureEQ applies the EQ predicate on the "picture" field.

func PictureEqualFold

func PictureEqualFold(v string) predicate.User

PictureEqualFold applies the EqualFold predicate on the "picture" field.

func PictureGT

func PictureGT(v string) predicate.User

PictureGT applies the GT predicate on the "picture" field.

func PictureGTE

func PictureGTE(v string) predicate.User

PictureGTE applies the GTE predicate on the "picture" field.

func PictureHasPrefix

func PictureHasPrefix(v string) predicate.User

PictureHasPrefix applies the HasPrefix predicate on the "picture" field.

func PictureHasSuffix

func PictureHasSuffix(v string) predicate.User

PictureHasSuffix applies the HasSuffix predicate on the "picture" field.

func PictureIn

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

PictureIn applies the In predicate on the "picture" field.

func PictureIsNil

func PictureIsNil() predicate.User

PictureIsNil applies the IsNil predicate on the "picture" field.

func PictureLT

func PictureLT(v string) predicate.User

PictureLT applies the LT predicate on the "picture" field.

func PictureLTE

func PictureLTE(v string) predicate.User

PictureLTE applies the LTE predicate on the "picture" field.

func PictureNEQ

func PictureNEQ(v string) predicate.User

PictureNEQ applies the NEQ predicate on the "picture" field.

func PictureNotIn

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

PictureNotIn applies the NotIn predicate on the "picture" field.

func PictureNotNil

func PictureNotNil() predicate.User

PictureNotNil applies the NotNil predicate on the "picture" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.User

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.User

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.User

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.User

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

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

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.User

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.User

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.User

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

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

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func UseDarkTheme

func UseDarkTheme(v bool) predicate.User

UseDarkTheme applies equality check predicate on the "use_dark_theme" field. It's identical to UseDarkThemeEQ.

func UseDarkThemeEQ

func UseDarkThemeEQ(v bool) predicate.User

UseDarkThemeEQ applies the EQ predicate on the "use_dark_theme" field.

func UseDarkThemeNEQ

func UseDarkThemeNEQ(v bool) predicate.User

UseDarkThemeNEQ applies the NEQ predicate on the "use_dark_theme" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Locale

type Locale string

Locale defines the type for the "locale" enum field.

const (
	LocaleEn Locale = "en"
	LocaleRu Locale = "ru"
)

Locale values.

func (Locale) String

func (l Locale) String() string

Jump to

Keyboard shortcuts

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