code

package
v0.0.0-...-6b37c95 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the code type in the database.
	Label = "code"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCode holds the string denoting the code field in the database.
	FieldCode = "code"
	// FieldClientID holds the string denoting the client_id field in the database.
	FieldClientID = "client_id"
	// FieldScope holds the string denoting the scope field in the database.
	FieldScope = "scope"
	// FieldRedirectURI holds the string denoting the redirect_uri field in the database.
	FieldRedirectURI = "redirect_uri"
	// FieldCodeChallenge holds the string denoting the code_challenge field in the database.
	FieldCodeChallenge = "code_challenge"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeGroups holds the string denoting the groups edge name in mutations.
	EdgeGroups = "groups"
	// Table holds the table name of the code in the database.
	Table = "codes"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "codes"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_codes"
	// GroupsTable is the table that holds the groups relation/edge. The primary key declared below.
	GroupsTable = "group_codes"
	// GroupsInverseTable is the table name for the Group entity.
	// It exists in this package in order to avoid circular dependency with the "group" package.
	GroupsInverseTable = "groups"
)

Variables

View Source
var (
	// DefaultClientID holds the default value on creation for the "client_id" field.
	DefaultClientID string
	// DefaultScope holds the default value on creation for the "scope" field.
	DefaultScope string
	// DefaultRedirectURI holds the default value on creation for the "redirect_uri" field.
	DefaultRedirectURI string
	// DefaultCodeChallenge holds the default value on creation for the "code_challenge" field.
	DefaultCodeChallenge string
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for code fields.

View Source
var ForeignKeys = []string{
	"user_codes",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "codes" table and are not defined as standalone fields in the schema.

View Source
var (
	// GroupsPrimaryKey and GroupsColumn2 are the table columns denoting the
	// primary key for the groups relation (M2M).
	GroupsPrimaryKey = []string{"group_id", "code_id"}
)

Functions

func And

func And(predicates ...predicate.Code) predicate.Code

And groups predicates with the AND operator between them.

func ClientID

func ClientID(v string) predicate.Code

ClientID applies equality check predicate on the "client_id" field. It's identical to ClientIDEQ.

func ClientIDContains

func ClientIDContains(v string) predicate.Code

ClientIDContains applies the Contains predicate on the "client_id" field.

func ClientIDContainsFold

func ClientIDContainsFold(v string) predicate.Code

ClientIDContainsFold applies the ContainsFold predicate on the "client_id" field.

func ClientIDEQ

func ClientIDEQ(v string) predicate.Code

ClientIDEQ applies the EQ predicate on the "client_id" field.

func ClientIDEqualFold

func ClientIDEqualFold(v string) predicate.Code

ClientIDEqualFold applies the EqualFold predicate on the "client_id" field.

func ClientIDGT

func ClientIDGT(v string) predicate.Code

ClientIDGT applies the GT predicate on the "client_id" field.

func ClientIDGTE

func ClientIDGTE(v string) predicate.Code

ClientIDGTE applies the GTE predicate on the "client_id" field.

func ClientIDHasPrefix

func ClientIDHasPrefix(v string) predicate.Code

ClientIDHasPrefix applies the HasPrefix predicate on the "client_id" field.

func ClientIDHasSuffix

func ClientIDHasSuffix(v string) predicate.Code

ClientIDHasSuffix applies the HasSuffix predicate on the "client_id" field.

func ClientIDIn

func ClientIDIn(vs ...string) predicate.Code

ClientIDIn applies the In predicate on the "client_id" field.

func ClientIDLT

func ClientIDLT(v string) predicate.Code

ClientIDLT applies the LT predicate on the "client_id" field.

func ClientIDLTE

func ClientIDLTE(v string) predicate.Code

ClientIDLTE applies the LTE predicate on the "client_id" field.

func ClientIDNEQ

func ClientIDNEQ(v string) predicate.Code

ClientIDNEQ applies the NEQ predicate on the "client_id" field.

func ClientIDNotIn

func ClientIDNotIn(vs ...string) predicate.Code

ClientIDNotIn applies the NotIn predicate on the "client_id" field.

func Code

func Code(v string) predicate.Code

Code applies equality check predicate on the "code" field. It's identical to CodeEQ.

func CodeChallenge

func CodeChallenge(v string) predicate.Code

CodeChallenge applies equality check predicate on the "code_challenge" field. It's identical to CodeChallengeEQ.

func CodeChallengeContains

func CodeChallengeContains(v string) predicate.Code

CodeChallengeContains applies the Contains predicate on the "code_challenge" field.

func CodeChallengeContainsFold

func CodeChallengeContainsFold(v string) predicate.Code

CodeChallengeContainsFold applies the ContainsFold predicate on the "code_challenge" field.

func CodeChallengeEQ

func CodeChallengeEQ(v string) predicate.Code

CodeChallengeEQ applies the EQ predicate on the "code_challenge" field.

func CodeChallengeEqualFold

func CodeChallengeEqualFold(v string) predicate.Code

CodeChallengeEqualFold applies the EqualFold predicate on the "code_challenge" field.

func CodeChallengeGT

func CodeChallengeGT(v string) predicate.Code

CodeChallengeGT applies the GT predicate on the "code_challenge" field.

func CodeChallengeGTE

func CodeChallengeGTE(v string) predicate.Code

CodeChallengeGTE applies the GTE predicate on the "code_challenge" field.

func CodeChallengeHasPrefix

func CodeChallengeHasPrefix(v string) predicate.Code

CodeChallengeHasPrefix applies the HasPrefix predicate on the "code_challenge" field.

func CodeChallengeHasSuffix

func CodeChallengeHasSuffix(v string) predicate.Code

CodeChallengeHasSuffix applies the HasSuffix predicate on the "code_challenge" field.

func CodeChallengeIn

func CodeChallengeIn(vs ...string) predicate.Code

CodeChallengeIn applies the In predicate on the "code_challenge" field.

func CodeChallengeLT

func CodeChallengeLT(v string) predicate.Code

CodeChallengeLT applies the LT predicate on the "code_challenge" field.

func CodeChallengeLTE

func CodeChallengeLTE(v string) predicate.Code

CodeChallengeLTE applies the LTE predicate on the "code_challenge" field.

func CodeChallengeNEQ

func CodeChallengeNEQ(v string) predicate.Code

CodeChallengeNEQ applies the NEQ predicate on the "code_challenge" field.

func CodeChallengeNotIn

func CodeChallengeNotIn(vs ...string) predicate.Code

CodeChallengeNotIn applies the NotIn predicate on the "code_challenge" field.

func CodeContains

func CodeContains(v string) predicate.Code

CodeContains applies the Contains predicate on the "code" field.

func CodeContainsFold

func CodeContainsFold(v string) predicate.Code

CodeContainsFold applies the ContainsFold predicate on the "code" field.

func CodeEQ

func CodeEQ(v string) predicate.Code

CodeEQ applies the EQ predicate on the "code" field.

func CodeEqualFold

func CodeEqualFold(v string) predicate.Code

CodeEqualFold applies the EqualFold predicate on the "code" field.

func CodeGT

func CodeGT(v string) predicate.Code

CodeGT applies the GT predicate on the "code" field.

func CodeGTE

func CodeGTE(v string) predicate.Code

CodeGTE applies the GTE predicate on the "code" field.

func CodeHasPrefix

func CodeHasPrefix(v string) predicate.Code

CodeHasPrefix applies the HasPrefix predicate on the "code" field.

func CodeHasSuffix

func CodeHasSuffix(v string) predicate.Code

CodeHasSuffix applies the HasSuffix predicate on the "code" field.

func CodeIn

func CodeIn(vs ...string) predicate.Code

CodeIn applies the In predicate on the "code" field.

func CodeLT

func CodeLT(v string) predicate.Code

CodeLT applies the LT predicate on the "code" field.

func CodeLTE

func CodeLTE(v string) predicate.Code

CodeLTE applies the LTE predicate on the "code" field.

func CodeNEQ

func CodeNEQ(v string) predicate.Code

CodeNEQ applies the NEQ predicate on the "code" field.

func CodeNotIn

func CodeNotIn(vs ...string) predicate.Code

CodeNotIn applies the NotIn predicate on the "code" field.

func ExpiresAt

func ExpiresAt(v time.Time) predicate.Code

ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.

func ExpiresAtEQ

func ExpiresAtEQ(v time.Time) predicate.Code

ExpiresAtEQ applies the EQ predicate on the "expires_at" field.

func ExpiresAtGT

func ExpiresAtGT(v time.Time) predicate.Code

ExpiresAtGT applies the GT predicate on the "expires_at" field.

func ExpiresAtGTE

func ExpiresAtGTE(v time.Time) predicate.Code

ExpiresAtGTE applies the GTE predicate on the "expires_at" field.

func ExpiresAtIn

func ExpiresAtIn(vs ...time.Time) predicate.Code

ExpiresAtIn applies the In predicate on the "expires_at" field.

func ExpiresAtLT

func ExpiresAtLT(v time.Time) predicate.Code

ExpiresAtLT applies the LT predicate on the "expires_at" field.

func ExpiresAtLTE

func ExpiresAtLTE(v time.Time) predicate.Code

ExpiresAtLTE applies the LTE predicate on the "expires_at" field.

func ExpiresAtNEQ

func ExpiresAtNEQ(v time.Time) predicate.Code

ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.

func ExpiresAtNotIn

func ExpiresAtNotIn(vs ...time.Time) predicate.Code

ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.

func HasGroups

func HasGroups() predicate.Code

HasGroups applies the HasEdge predicate on the "groups" edge.

func HasGroupsWith

func HasGroupsWith(preds ...predicate.Group) predicate.Code

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

func HasUser

func HasUser() predicate.Code

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Code

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

func ID

func ID(id uuid.UUID) predicate.Code

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Code

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Code

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Code

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Code

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Code

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Code

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Code

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Code

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.Code) predicate.Code

Or groups predicates with the OR operator between them.

func RedirectURI

func RedirectURI(v string) predicate.Code

RedirectURI applies equality check predicate on the "redirect_uri" field. It's identical to RedirectURIEQ.

func RedirectURIContains

func RedirectURIContains(v string) predicate.Code

RedirectURIContains applies the Contains predicate on the "redirect_uri" field.

func RedirectURIContainsFold

func RedirectURIContainsFold(v string) predicate.Code

RedirectURIContainsFold applies the ContainsFold predicate on the "redirect_uri" field.

func RedirectURIEQ

func RedirectURIEQ(v string) predicate.Code

RedirectURIEQ applies the EQ predicate on the "redirect_uri" field.

func RedirectURIEqualFold

func RedirectURIEqualFold(v string) predicate.Code

RedirectURIEqualFold applies the EqualFold predicate on the "redirect_uri" field.

func RedirectURIGT

func RedirectURIGT(v string) predicate.Code

RedirectURIGT applies the GT predicate on the "redirect_uri" field.

func RedirectURIGTE

func RedirectURIGTE(v string) predicate.Code

RedirectURIGTE applies the GTE predicate on the "redirect_uri" field.

func RedirectURIHasPrefix

func RedirectURIHasPrefix(v string) predicate.Code

RedirectURIHasPrefix applies the HasPrefix predicate on the "redirect_uri" field.

func RedirectURIHasSuffix

func RedirectURIHasSuffix(v string) predicate.Code

RedirectURIHasSuffix applies the HasSuffix predicate on the "redirect_uri" field.

func RedirectURIIn

func RedirectURIIn(vs ...string) predicate.Code

RedirectURIIn applies the In predicate on the "redirect_uri" field.

func RedirectURILT

func RedirectURILT(v string) predicate.Code

RedirectURILT applies the LT predicate on the "redirect_uri" field.

func RedirectURILTE

func RedirectURILTE(v string) predicate.Code

RedirectURILTE applies the LTE predicate on the "redirect_uri" field.

func RedirectURINEQ

func RedirectURINEQ(v string) predicate.Code

RedirectURINEQ applies the NEQ predicate on the "redirect_uri" field.

func RedirectURINotIn

func RedirectURINotIn(vs ...string) predicate.Code

RedirectURINotIn applies the NotIn predicate on the "redirect_uri" field.

func Scope

func Scope(v string) predicate.Code

Scope applies equality check predicate on the "scope" field. It's identical to ScopeEQ.

func ScopeContains

func ScopeContains(v string) predicate.Code

ScopeContains applies the Contains predicate on the "scope" field.

func ScopeContainsFold

func ScopeContainsFold(v string) predicate.Code

ScopeContainsFold applies the ContainsFold predicate on the "scope" field.

func ScopeEQ

func ScopeEQ(v string) predicate.Code

ScopeEQ applies the EQ predicate on the "scope" field.

func ScopeEqualFold

func ScopeEqualFold(v string) predicate.Code

ScopeEqualFold applies the EqualFold predicate on the "scope" field.

func ScopeGT

func ScopeGT(v string) predicate.Code

ScopeGT applies the GT predicate on the "scope" field.

func ScopeGTE

func ScopeGTE(v string) predicate.Code

ScopeGTE applies the GTE predicate on the "scope" field.

func ScopeHasPrefix

func ScopeHasPrefix(v string) predicate.Code

ScopeHasPrefix applies the HasPrefix predicate on the "scope" field.

func ScopeHasSuffix

func ScopeHasSuffix(v string) predicate.Code

ScopeHasSuffix applies the HasSuffix predicate on the "scope" field.

func ScopeIn

func ScopeIn(vs ...string) predicate.Code

ScopeIn applies the In predicate on the "scope" field.

func ScopeLT

func ScopeLT(v string) predicate.Code

ScopeLT applies the LT predicate on the "scope" field.

func ScopeLTE

func ScopeLTE(v string) predicate.Code

ScopeLTE applies the LTE predicate on the "scope" field.

func ScopeNEQ

func ScopeNEQ(v string) predicate.Code

ScopeNEQ applies the NEQ predicate on the "scope" field.

func ScopeNotIn

func ScopeNotIn(vs ...string) predicate.Code

ScopeNotIn applies the NotIn predicate on the "scope" 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 Code queries.

func ByClientID

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

ByClientID orders the results by the client_id field.

func ByCode

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

ByCode orders the results by the code field.

func ByCodeChallenge

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

ByCodeChallenge orders the results by the code_challenge field.

func ByExpiresAt

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

ByExpiresAt orders the results by the expires_at field.

func ByGroups

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

ByGroups orders the results by groups terms.

func ByGroupsCount

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

ByGroupsCount orders the results by groups count.

func ByID

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

ByID orders the results by the id field.

func ByRedirectURI

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

ByRedirectURI orders the results by the redirect_uri field.

func ByScope

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

ByScope orders the results by the scope field.

func ByUserField

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

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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