user

package
v0.0.0-...-60828a5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 5 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"
	// EdgeTeams holds the string denoting the teams edge name in mutations.
	EdgeTeams = "teams"
	// EdgeCreatedEnvs holds the string denoting the created_envs edge name in mutations.
	EdgeCreatedEnvs = "created_envs"
	// EdgeAccessTokens holds the string denoting the access_tokens edge name in mutations.
	EdgeAccessTokens = "access_tokens"
	// EdgeCreatedAPIKeys holds the string denoting the created_api_keys edge name in mutations.
	EdgeCreatedAPIKeys = "created_api_keys"
	// EdgeUsersTeams holds the string denoting the users_teams edge name in mutations.
	EdgeUsersTeams = "users_teams"
	// AccessTokenFieldID holds the string denoting the ID field of the AccessToken.
	AccessTokenFieldID = "access_token"
	// Table holds the table name of the user in the database.
	Table = "users"
	// TeamsTable is the table that holds the teams relation/edge. The primary key declared below.
	TeamsTable = "users_teams"
	// TeamsInverseTable is the table name for the Team entity.
	// It exists in this package in order to avoid circular dependency with the "team" package.
	TeamsInverseTable = "teams"
	// CreatedEnvsTable is the table that holds the created_envs relation/edge.
	CreatedEnvsTable = "envs"
	// CreatedEnvsInverseTable is the table name for the Env entity.
	// It exists in this package in order to avoid circular dependency with the "env" package.
	CreatedEnvsInverseTable = "envs"
	// CreatedEnvsColumn is the table column denoting the created_envs relation/edge.
	CreatedEnvsColumn = "created_by"
	// AccessTokensTable is the table that holds the access_tokens relation/edge.
	AccessTokensTable = "access_tokens"
	// AccessTokensInverseTable is the table name for the AccessToken entity.
	// It exists in this package in order to avoid circular dependency with the "accesstoken" package.
	AccessTokensInverseTable = "access_tokens"
	// AccessTokensColumn is the table column denoting the access_tokens relation/edge.
	AccessTokensColumn = "user_id"
	// CreatedAPIKeysTable is the table that holds the created_api_keys relation/edge.
	CreatedAPIKeysTable = "team_api_keys"
	// CreatedAPIKeysInverseTable is the table name for the TeamAPIKey entity.
	// It exists in this package in order to avoid circular dependency with the "teamapikey" package.
	CreatedAPIKeysInverseTable = "team_api_keys"
	// CreatedAPIKeysColumn is the table column denoting the created_api_keys relation/edge.
	CreatedAPIKeysColumn = "created_by"
	// UsersTeamsTable is the table that holds the users_teams relation/edge.
	UsersTeamsTable = "users_teams"
	// UsersTeamsInverseTable is the table name for the UsersTeams entity.
	// It exists in this package in order to avoid circular dependency with the "usersteams" package.
	UsersTeamsInverseTable = "users_teams"
	// UsersTeamsColumn is the table column denoting the users_teams relation/edge.
	UsersTeamsColumn = "user_id"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldEmail,
}

Columns holds all SQL columns for user fields.

View Source
var (
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator func(string) error
)
View Source
var (
	// TeamsPrimaryKey and TeamsColumn2 are the table columns denoting the
	// primary key for the teams relation (M2M).
	TeamsPrimaryKey = []string{"team_id", "user_id"}
)

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 HasAccessTokens

func HasAccessTokens() predicate.User

HasAccessTokens applies the HasEdge predicate on the "access_tokens" edge.

func HasAccessTokensWith

func HasAccessTokensWith(preds ...predicate.AccessToken) predicate.User

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

func HasCreatedAPIKeys

func HasCreatedAPIKeys() predicate.User

HasCreatedAPIKeys applies the HasEdge predicate on the "created_api_keys" edge.

func HasCreatedAPIKeysWith

func HasCreatedAPIKeysWith(preds ...predicate.TeamAPIKey) predicate.User

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

func HasCreatedEnvs

func HasCreatedEnvs() predicate.User

HasCreatedEnvs applies the HasEdge predicate on the "created_envs" edge.

func HasCreatedEnvsWith

func HasCreatedEnvsWith(preds ...predicate.Env) predicate.User

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

func HasTeams

func HasTeams() predicate.User

HasTeams applies the HasEdge predicate on the "teams" edge.

func HasTeamsWith

func HasTeamsWith(preds ...predicate.Team) predicate.User

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

func HasUsersTeams

func HasUsersTeams() predicate.User

HasUsersTeams applies the HasEdge predicate on the "users_teams" edge.

func HasUsersTeamsWith

func HasUsersTeamsWith(preds ...predicate.UsersTeams) predicate.User

HasUsersTeamsWith applies the HasEdge predicate on the "users_teams" 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 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 ByAccessTokens

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

ByAccessTokens orders the results by access_tokens terms.

func ByAccessTokensCount

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

ByAccessTokensCount orders the results by access_tokens count.

func ByCreatedAPIKeys

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

ByCreatedAPIKeys orders the results by created_api_keys terms.

func ByCreatedAPIKeysCount

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

ByCreatedAPIKeysCount orders the results by created_api_keys count.

func ByCreatedEnvs

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

ByCreatedEnvs orders the results by created_envs terms.

func ByCreatedEnvsCount

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

ByCreatedEnvsCount orders the results by created_envs count.

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 ByTeams

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

ByTeams orders the results by teams terms.

func ByTeamsCount

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

ByTeamsCount orders the results by teams count.

func ByUsersTeams

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

ByUsersTeams orders the results by users_teams terms.

func ByUsersTeamsCount

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

ByUsersTeamsCount orders the results by users_teams count.

Jump to

Keyboard shortcuts

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