user

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 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"
	// 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"
	// FieldAdmin holds the string denoting the admin field in the database.
	FieldAdmin = "admin"
	// FieldPasswordHash holds the string denoting the password_hash field in the database.
	FieldPasswordHash = "password_hash"
	// FieldLocale holds the string denoting the locale field in the database.
	FieldLocale = "locale"
	// FieldMeta holds the string denoting the meta field in the database.
	FieldMeta = "meta"
	// EdgePredictions holds the string denoting the predictions edge name in mutations.
	EdgePredictions = "predictions"
	// EdgeSessions holds the string denoting the sessions edge name in mutations.
	EdgeSessions = "sessions"
	// EdgeBadges holds the string denoting the badges edge name in mutations.
	EdgeBadges = "badges"
	// EdgeChallenges holds the string denoting the challenges edge name in mutations.
	EdgeChallenges = "challenges"
	// Table holds the table name of the user in the database.
	Table = "users"
	// PredictionsTable is the table that holds the predictions relation/edge.
	PredictionsTable = "predictions"
	// PredictionsInverseTable is the table name for the Prediction entity.
	// It exists in this package in order to avoid circular dependency with the "prediction" package.
	PredictionsInverseTable = "predictions"
	// PredictionsColumn is the table column denoting the predictions relation/edge.
	PredictionsColumn = "user_predictions"
	// 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"
	// BadgesTable is the table that holds the badges relation/edge. The primary key declared below.
	BadgesTable = "user_badges"
	// BadgesInverseTable is the table name for the Badge entity.
	// It exists in this package in order to avoid circular dependency with the "badge" package.
	BadgesInverseTable = "badges"
	// ChallengesTable is the table that holds the challenges relation/edge.
	ChallengesTable = "challenges"
	// ChallengesInverseTable is the table name for the Challenge entity.
	// It exists in this package in order to avoid circular dependency with the "challenge" package.
	ChallengesInverseTable = "challenges"
	// ChallengesColumn is the table column denoting the challenges relation/edge.
	ChallengesColumn = "user_challenges"
)
View Source
const DefaultLocale = LocaleRu

LocaleRu is the default value of the Locale enum.

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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var (
	// BadgesPrimaryKey and BadgesColumn2 are the table columns denoting the
	// primary key for the badges relation (M2M).
	BadgesPrimaryKey = []string{"user_id", "badge_id"}
)

Columns holds all SQL columns for user fields.

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 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 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 HasBadges

func HasBadges() predicate.User

HasBadges applies the HasEdge predicate on the "badges" edge.

func HasBadgesWith

func HasBadgesWith(preds ...predicate.Badge) predicate.User

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

func HasChallenges

func HasChallenges() predicate.User

HasChallenges applies the HasEdge predicate on the "challenges" edge.

func HasChallengesWith

func HasChallengesWith(preds ...predicate.Challenge) predicate.User

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

func HasPredictions

func HasPredictions() predicate.User

HasPredictions applies the HasEdge predicate on the "predictions" edge.

func HasPredictionsWith

func HasPredictionsWith(preds ...predicate.Prediction) predicate.User

HasPredictionsWith applies the HasEdge predicate on the "predictions" 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 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 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