user

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-3.0 Imports: 2 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldOauthID holds the string denoting the oauth_id field in the database.
	FieldOauthID = "oauth_id"
	// FieldPhotoURL holds the string denoting the photo_url field in the database.
	FieldPhotoURL = "photo_url"
	// FieldSessionToken holds the string denoting the session_token field in the database.
	FieldSessionToken = "session_token"
	// FieldIsActivated holds the string denoting the is_activated field in the database.
	FieldIsActivated = "is_activated"
	// FieldIsAdmin holds the string denoting the is_admin field in the database.
	FieldIsAdmin = "is_admin"
	// Table holds the table name of the user in the database.
	Table = "users"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultSessionToken holds the default value on creation for the "session_token" field.
	DefaultSessionToken func() string
	// SessionTokenValidator is a validator for the "session_token" field. It is called by the builders before save.
	SessionTokenValidator func(string) error
	// DefaultIsActivated holds the default value on creation for the "is_activated" field.
	DefaultIsActivated bool
	// DefaultIsAdmin holds the default value on creation for the "is_admin" field.
	DefaultIsAdmin bool
)

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 ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsActivated

func IsActivated(v bool) predicate.User

IsActivated applies equality check predicate on the "is_activated" field. It's identical to IsActivatedEQ.

func IsActivatedEQ

func IsActivatedEQ(v bool) predicate.User

IsActivatedEQ applies the EQ predicate on the "is_activated" field.

func IsActivatedNEQ

func IsActivatedNEQ(v bool) predicate.User

IsActivatedNEQ applies the NEQ predicate on the "is_activated" field.

func IsAdmin

func IsAdmin(v bool) predicate.User

IsAdmin applies equality check predicate on the "is_admin" field. It's identical to IsAdminEQ.

func IsAdminEQ

func IsAdminEQ(v bool) predicate.User

IsAdminEQ applies the EQ predicate on the "is_admin" field.

func IsAdminNEQ

func IsAdminNEQ(v bool) predicate.User

IsAdminNEQ applies the NEQ predicate on the "is_admin" 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 OauthID

func OauthID(v string) predicate.User

OauthID applies equality check predicate on the "oauth_id" field. It's identical to OauthIDEQ.

func OauthIDContains

func OauthIDContains(v string) predicate.User

OauthIDContains applies the Contains predicate on the "oauth_id" field.

func OauthIDContainsFold

func OauthIDContainsFold(v string) predicate.User

OauthIDContainsFold applies the ContainsFold predicate on the "oauth_id" field.

func OauthIDEQ

func OauthIDEQ(v string) predicate.User

OauthIDEQ applies the EQ predicate on the "oauth_id" field.

func OauthIDEqualFold

func OauthIDEqualFold(v string) predicate.User

OauthIDEqualFold applies the EqualFold predicate on the "oauth_id" field.

func OauthIDGT

func OauthIDGT(v string) predicate.User

OauthIDGT applies the GT predicate on the "oauth_id" field.

func OauthIDGTE

func OauthIDGTE(v string) predicate.User

OauthIDGTE applies the GTE predicate on the "oauth_id" field.

func OauthIDHasPrefix

func OauthIDHasPrefix(v string) predicate.User

OauthIDHasPrefix applies the HasPrefix predicate on the "oauth_id" field.

func OauthIDHasSuffix

func OauthIDHasSuffix(v string) predicate.User

OauthIDHasSuffix applies the HasSuffix predicate on the "oauth_id" field.

func OauthIDIn

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

OauthIDIn applies the In predicate on the "oauth_id" field.

func OauthIDLT

func OauthIDLT(v string) predicate.User

OauthIDLT applies the LT predicate on the "oauth_id" field.

func OauthIDLTE

func OauthIDLTE(v string) predicate.User

OauthIDLTE applies the LTE predicate on the "oauth_id" field.

func OauthIDNEQ

func OauthIDNEQ(v string) predicate.User

OauthIDNEQ applies the NEQ predicate on the "oauth_id" field.

func OauthIDNotIn

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

OauthIDNotIn applies the NotIn predicate on the "oauth_id" field.

func Or

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

Or groups predicates with the OR operator between them.

func PhotoURL

func PhotoURL(v string) predicate.User

PhotoURL applies equality check predicate on the "photo_url" field. It's identical to PhotoURLEQ.

func PhotoURLContains

func PhotoURLContains(v string) predicate.User

PhotoURLContains applies the Contains predicate on the "photo_url" field.

func PhotoURLContainsFold

func PhotoURLContainsFold(v string) predicate.User

PhotoURLContainsFold applies the ContainsFold predicate on the "photo_url" field.

func PhotoURLEQ

func PhotoURLEQ(v string) predicate.User

PhotoURLEQ applies the EQ predicate on the "photo_url" field.

func PhotoURLEqualFold

func PhotoURLEqualFold(v string) predicate.User

PhotoURLEqualFold applies the EqualFold predicate on the "photo_url" field.

func PhotoURLGT

func PhotoURLGT(v string) predicate.User

PhotoURLGT applies the GT predicate on the "photo_url" field.

func PhotoURLGTE

func PhotoURLGTE(v string) predicate.User

PhotoURLGTE applies the GTE predicate on the "photo_url" field.

func PhotoURLHasPrefix

func PhotoURLHasPrefix(v string) predicate.User

PhotoURLHasPrefix applies the HasPrefix predicate on the "photo_url" field.

func PhotoURLHasSuffix

func PhotoURLHasSuffix(v string) predicate.User

PhotoURLHasSuffix applies the HasSuffix predicate on the "photo_url" field.

func PhotoURLIn

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

PhotoURLIn applies the In predicate on the "photo_url" field.

func PhotoURLLT

func PhotoURLLT(v string) predicate.User

PhotoURLLT applies the LT predicate on the "photo_url" field.

func PhotoURLLTE

func PhotoURLLTE(v string) predicate.User

PhotoURLLTE applies the LTE predicate on the "photo_url" field.

func PhotoURLNEQ

func PhotoURLNEQ(v string) predicate.User

PhotoURLNEQ applies the NEQ predicate on the "photo_url" field.

func PhotoURLNotIn

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

PhotoURLNotIn applies the NotIn predicate on the "photo_url" field.

func SessionToken

func SessionToken(v string) predicate.User

SessionToken applies equality check predicate on the "session_token" field. It's identical to SessionTokenEQ.

func SessionTokenContains

func SessionTokenContains(v string) predicate.User

SessionTokenContains applies the Contains predicate on the "session_token" field.

func SessionTokenContainsFold

func SessionTokenContainsFold(v string) predicate.User

SessionTokenContainsFold applies the ContainsFold predicate on the "session_token" field.

func SessionTokenEQ

func SessionTokenEQ(v string) predicate.User

SessionTokenEQ applies the EQ predicate on the "session_token" field.

func SessionTokenEqualFold

func SessionTokenEqualFold(v string) predicate.User

SessionTokenEqualFold applies the EqualFold predicate on the "session_token" field.

func SessionTokenGT

func SessionTokenGT(v string) predicate.User

SessionTokenGT applies the GT predicate on the "session_token" field.

func SessionTokenGTE

func SessionTokenGTE(v string) predicate.User

SessionTokenGTE applies the GTE predicate on the "session_token" field.

func SessionTokenHasPrefix

func SessionTokenHasPrefix(v string) predicate.User

SessionTokenHasPrefix applies the HasPrefix predicate on the "session_token" field.

func SessionTokenHasSuffix

func SessionTokenHasSuffix(v string) predicate.User

SessionTokenHasSuffix applies the HasSuffix predicate on the "session_token" field.

func SessionTokenIn

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

SessionTokenIn applies the In predicate on the "session_token" field.

func SessionTokenLT

func SessionTokenLT(v string) predicate.User

SessionTokenLT applies the LT predicate on the "session_token" field.

func SessionTokenLTE

func SessionTokenLTE(v string) predicate.User

SessionTokenLTE applies the LTE predicate on the "session_token" field.

func SessionTokenNEQ

func SessionTokenNEQ(v string) predicate.User

SessionTokenNEQ applies the NEQ predicate on the "session_token" field.

func SessionTokenNotIn

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

SessionTokenNotIn applies the NotIn predicate on the "session_token" field.

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 ByID

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

ByID orders the results by the id field.

func ByIsActivated

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

ByIsActivated orders the results by the is_activated field.

func ByIsAdmin

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

ByIsAdmin orders the results by the is_admin field.

func ByName

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

ByName orders the results by the name field.

func ByOauthID

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

ByOauthID orders the results by the oauth_id field.

func ByPhotoURL

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

ByPhotoURL orders the results by the photo_url field.

func BySessionToken

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

BySessionToken orders the results by the session_token field.

Jump to

Keyboard shortcuts

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