user

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT 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 = "user_id"
	// 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"
	// FieldCredential holds the string denoting the credential field in the database.
	FieldCredential = "credential"
	// FieldAttributes holds the string denoting the attributes field in the database.
	FieldAttributes = "attributes"
	// EdgeEvents holds the string denoting the events edge name in mutations.
	EdgeEvents = "events"
	// EventFieldID holds the string denoting the ID field of the Event.
	EventFieldID = "event_id"
	// Table holds the table name of the user in the database.
	Table = "users"
	// EventsTable is the table that holds the events relation/edge.
	EventsTable = "events"
	// EventsInverseTable is the table name for the Event entity.
	// It exists in this package in order to avoid circular dependency with the "event" package.
	EventsInverseTable = "events"
	// EventsColumn is the table column denoting the events relation/edge.
	EventsColumn = "user_id"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// CredentialValidator is a validator for the "credential" field. It is called by the builders before save.
	CredentialValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() string
)

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 AttributesIsNil

func AttributesIsNil() predicate.User

AttributesIsNil applies the IsNil predicate on the "attributes" field.

func AttributesNotNil

func AttributesNotNil() predicate.User

AttributesNotNil applies the NotNil predicate on the "attributes" field.

func Credential

func Credential(v string) predicate.User

Credential applies equality check predicate on the "credential" field. It's identical to CredentialEQ.

func CredentialContains

func CredentialContains(v string) predicate.User

CredentialContains applies the Contains predicate on the "credential" field.

func CredentialContainsFold

func CredentialContainsFold(v string) predicate.User

CredentialContainsFold applies the ContainsFold predicate on the "credential" field.

func CredentialEQ

func CredentialEQ(v string) predicate.User

CredentialEQ applies the EQ predicate on the "credential" field.

func CredentialEqualFold

func CredentialEqualFold(v string) predicate.User

CredentialEqualFold applies the EqualFold predicate on the "credential" field.

func CredentialGT

func CredentialGT(v string) predicate.User

CredentialGT applies the GT predicate on the "credential" field.

func CredentialGTE

func CredentialGTE(v string) predicate.User

CredentialGTE applies the GTE predicate on the "credential" field.

func CredentialHasPrefix

func CredentialHasPrefix(v string) predicate.User

CredentialHasPrefix applies the HasPrefix predicate on the "credential" field.

func CredentialHasSuffix

func CredentialHasSuffix(v string) predicate.User

CredentialHasSuffix applies the HasSuffix predicate on the "credential" field.

func CredentialIn

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

CredentialIn applies the In predicate on the "credential" field.

func CredentialLT

func CredentialLT(v string) predicate.User

CredentialLT applies the LT predicate on the "credential" field.

func CredentialLTE

func CredentialLTE(v string) predicate.User

CredentialLTE applies the LTE predicate on the "credential" field.

func CredentialNEQ

func CredentialNEQ(v string) predicate.User

CredentialNEQ applies the NEQ predicate on the "credential" field.

func CredentialNotIn

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

CredentialNotIn applies the NotIn predicate on the "credential" 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 HasEvents

func HasEvents() predicate.User

HasEvents applies the HasEdge predicate on the "events" edge.

func HasEventsWith

func HasEventsWith(preds ...predicate.Event) predicate.User

HasEventsWith applies the HasEdge predicate on the "events" 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 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 ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the User queries.

func ByCredential

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

ByCredential orders the results by the credential field.

func ByEmail

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

ByEmail orders the results by the email field.

func ByEvents

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

ByEvents orders the results by events terms.

func ByEventsCount

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

ByEventsCount orders the results by events count.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

Jump to

Keyboard shortcuts

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