user

package
v0.0.0-...-9f24b57 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 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"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldVerificationAttempts holds the string denoting the verification_attempts field in the database.
	FieldVerificationAttempts = "verification_attempts"
	// FieldVerified holds the string denoting the verified field in the database.
	FieldVerified = "verified"
	// EdgeSignins holds the string denoting the signins edge name in mutations.
	EdgeSignins = "signins"
	// EdgeVotes holds the string denoting the votes edge name in mutations.
	EdgeVotes = "votes"
	// EdgeShitposts holds the string denoting the shitposts edge name in mutations.
	EdgeShitposts = "shitposts"
	// EdgeBirthday holds the string denoting the birthday edge name in mutations.
	EdgeBirthday = "birthday"
	// Table holds the table name of the user in the database.
	Table = "users"
	// SigninsTable is the table that holds the signins relation/edge.
	SigninsTable = "signins"
	// SigninsInverseTable is the table name for the Signin entity.
	// It exists in this package in order to avoid circular dependency with the "signin" package.
	SigninsInverseTable = "signins"
	// SigninsColumn is the table column denoting the signins relation/edge.
	SigninsColumn = "user_signins"
	// VotesTable is the table that holds the votes relation/edge.
	VotesTable = "votes"
	// VotesInverseTable is the table name for the Vote entity.
	// It exists in this package in order to avoid circular dependency with the "vote" package.
	VotesInverseTable = "votes"
	// VotesColumn is the table column denoting the votes relation/edge.
	VotesColumn = "user_votes"
	// ShitpostsTable is the table that holds the shitposts relation/edge.
	ShitpostsTable = "shitposts"
	// ShitpostsInverseTable is the table name for the Shitpost entity.
	// It exists in this package in order to avoid circular dependency with the "shitpost" package.
	ShitpostsInverseTable = "shitposts"
	// ShitpostsColumn is the table column denoting the shitposts relation/edge.
	ShitpostsColumn = "user_shitposts"
	// BirthdayTable is the table that holds the birthday relation/edge.
	BirthdayTable = "birthdays"
	// BirthdayInverseTable is the table name for the Birthday entity.
	// It exists in this package in order to avoid circular dependency with the "birthday" package.
	BirthdayInverseTable = "birthdays"
	// BirthdayColumn is the table column denoting the birthday relation/edge.
	BirthdayColumn = "user_birthday"
)

Variables

View Source
var (
	// DefaultEmail holds the default value on creation for the "email" field.
	DefaultEmail string
	// DefaultVerificationAttempts holds the default value on creation for the "verification_attempts" field.
	DefaultVerificationAttempts int8
	// VerificationAttemptsValidator is a validator for the "verification_attempts" field. It is called by the builders before save.
	VerificationAttemptsValidator func(int8) error
	// DefaultVerified holds the default value on creation for the "verified" field.
	DefaultVerified bool
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

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

func HasBirthday() predicate.User

HasBirthday applies the HasEdge predicate on the "birthday" edge.

func HasBirthdayWith

func HasBirthdayWith(preds ...predicate.Birthday) predicate.User

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

func HasShitposts

func HasShitposts() predicate.User

HasShitposts applies the HasEdge predicate on the "shitposts" edge.

func HasShitpostsWith

func HasShitpostsWith(preds ...predicate.Shitpost) predicate.User

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

func HasSignins

func HasSignins() predicate.User

HasSignins applies the HasEdge predicate on the "signins" edge.

func HasSigninsWith

func HasSigninsWith(preds ...predicate.Signin) predicate.User

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

func HasVotes

func HasVotes() predicate.User

HasVotes applies the HasEdge predicate on the "votes" edge.

func HasVotesWith

func HasVotesWith(preds ...predicate.Vote) predicate.User

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

func ID

func ID(id string) predicate.User

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.User

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.User

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.User

IDNotIn applies the NotIn predicate on the ID 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 ValidColumn

func ValidColumn(column string) bool

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

func VerificationAttempts

func VerificationAttempts(v int8) predicate.User

VerificationAttempts applies equality check predicate on the "verification_attempts" field. It's identical to VerificationAttemptsEQ.

func VerificationAttemptsEQ

func VerificationAttemptsEQ(v int8) predicate.User

VerificationAttemptsEQ applies the EQ predicate on the "verification_attempts" field.

func VerificationAttemptsGT

func VerificationAttemptsGT(v int8) predicate.User

VerificationAttemptsGT applies the GT predicate on the "verification_attempts" field.

func VerificationAttemptsGTE

func VerificationAttemptsGTE(v int8) predicate.User

VerificationAttemptsGTE applies the GTE predicate on the "verification_attempts" field.

func VerificationAttemptsIn

func VerificationAttemptsIn(vs ...int8) predicate.User

VerificationAttemptsIn applies the In predicate on the "verification_attempts" field.

func VerificationAttemptsLT

func VerificationAttemptsLT(v int8) predicate.User

VerificationAttemptsLT applies the LT predicate on the "verification_attempts" field.

func VerificationAttemptsLTE

func VerificationAttemptsLTE(v int8) predicate.User

VerificationAttemptsLTE applies the LTE predicate on the "verification_attempts" field.

func VerificationAttemptsNEQ

func VerificationAttemptsNEQ(v int8) predicate.User

VerificationAttemptsNEQ applies the NEQ predicate on the "verification_attempts" field.

func VerificationAttemptsNotIn

func VerificationAttemptsNotIn(vs ...int8) predicate.User

VerificationAttemptsNotIn applies the NotIn predicate on the "verification_attempts" field.

func Verified

func Verified(v bool) predicate.User

Verified applies equality check predicate on the "verified" field. It's identical to VerifiedEQ.

func VerifiedEQ

func VerifiedEQ(v bool) predicate.User

VerifiedEQ applies the EQ predicate on the "verified" field.

func VerifiedNEQ

func VerifiedNEQ(v bool) predicate.User

VerifiedNEQ applies the NEQ predicate on the "verified" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the User queries.

func ByBirthdayField

func ByBirthdayField(field string, opts ...sql.OrderTermOption) OrderOption

ByBirthdayField orders the results by birthday field.

func ByEmail

func ByEmail(opts ...sql.OrderTermOption) OrderOption

ByEmail orders the results by the email field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByShitposts

func ByShitposts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByShitposts orders the results by shitposts terms.

func ByShitpostsCount

func ByShitpostsCount(opts ...sql.OrderTermOption) OrderOption

ByShitpostsCount orders the results by shitposts count.

func BySignins

func BySignins(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySignins orders the results by signins terms.

func BySigninsCount

func BySigninsCount(opts ...sql.OrderTermOption) OrderOption

BySigninsCount orders the results by signins count.

func ByVerificationAttempts

func ByVerificationAttempts(opts ...sql.OrderTermOption) OrderOption

ByVerificationAttempts orders the results by the verification_attempts field.

func ByVerified

func ByVerified(opts ...sql.OrderTermOption) OrderOption

ByVerified orders the results by the verified field.

func ByVotes

func ByVotes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByVotes orders the results by votes terms.

func ByVotesCount

func ByVotesCount(opts ...sql.OrderTermOption) OrderOption

ByVotesCount orders the results by votes count.

Jump to

Keyboard shortcuts

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