authorization

package
v0.0.0-...-1ac7f0e Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the authorization type in the database.
	Label = "authorization"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldPersonID holds the string denoting the person_id field in the database.
	FieldPersonID = "person_id"
	// FieldToken holds the string denoting the token field in the database.
	FieldToken = "token"
	// FieldKind holds the string denoting the kind field in the database.
	FieldKind = "kind"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgePerson holds the string denoting the person edge name in mutations.
	EdgePerson = "person"
	// Table holds the table name of the authorization in the database.
	Table = "authorizations"
	// PersonTable is the table that holds the person relation/edge.
	PersonTable = "authorizations"
	// PersonInverseTable is the table name for the Person entity.
	// It exists in this package in order to avoid circular dependency with the "person" package.
	PersonInverseTable = "persons"
	// PersonColumn is the table column denoting the person relation/edge.
	PersonColumn = "person_id"
)

Variables

View Source
var (
	Hooks  [2]ent.Hook
	Policy ent.Policy
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/avptp/brain/internal/generated/data/runtime"

Columns holds all SQL columns for authorization fields.

Functions

func And

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Authorization

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Authorization

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Authorization

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Authorization

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Authorization

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Authorization

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Authorization

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Authorization

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Authorization

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasPerson

func HasPerson() predicate.Authorization

HasPerson applies the HasEdge predicate on the "person" edge.

func HasPersonWith

func HasPersonWith(preds ...predicate.Person) predicate.Authorization

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

func ID

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Authorization

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Authorization

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Authorization

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func KindEQ

func KindEQ(v Kind) predicate.Authorization

KindEQ applies the EQ predicate on the "kind" field.

func KindIn

func KindIn(vs ...Kind) predicate.Authorization

KindIn applies the In predicate on the "kind" field.

func KindNEQ

func KindNEQ(v Kind) predicate.Authorization

KindNEQ applies the NEQ predicate on the "kind" field.

func KindNotIn

func KindNotIn(vs ...Kind) predicate.Authorization

KindNotIn applies the NotIn predicate on the "kind" field.

func KindValidator

func KindValidator(k Kind) error

KindValidator is a validator for the "kind" field enum values. It is called by the builders before save.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func PersonID

func PersonID(v uuid.UUID) predicate.Authorization

PersonID applies equality check predicate on the "person_id" field. It's identical to PersonIDEQ.

func PersonIDEQ

func PersonIDEQ(v uuid.UUID) predicate.Authorization

PersonIDEQ applies the EQ predicate on the "person_id" field.

func PersonIDIn

func PersonIDIn(vs ...uuid.UUID) predicate.Authorization

PersonIDIn applies the In predicate on the "person_id" field.

func PersonIDNEQ

func PersonIDNEQ(v uuid.UUID) predicate.Authorization

PersonIDNEQ applies the NEQ predicate on the "person_id" field.

func PersonIDNotIn

func PersonIDNotIn(vs ...uuid.UUID) predicate.Authorization

PersonIDNotIn applies the NotIn predicate on the "person_id" field.

func Token

func Token(v []byte) predicate.Authorization

Token applies equality check predicate on the "token" field. It's identical to TokenEQ.

func TokenEQ

func TokenEQ(v []byte) predicate.Authorization

TokenEQ applies the EQ predicate on the "token" field.

func TokenGT

func TokenGT(v []byte) predicate.Authorization

TokenGT applies the GT predicate on the "token" field.

func TokenGTE

func TokenGTE(v []byte) predicate.Authorization

TokenGTE applies the GTE predicate on the "token" field.

func TokenIn

func TokenIn(vs ...[]byte) predicate.Authorization

TokenIn applies the In predicate on the "token" field.

func TokenLT

func TokenLT(v []byte) predicate.Authorization

TokenLT applies the LT predicate on the "token" field.

func TokenLTE

func TokenLTE(v []byte) predicate.Authorization

TokenLTE applies the LTE predicate on the "token" field.

func TokenNEQ

func TokenNEQ(v []byte) predicate.Authorization

TokenNEQ applies the NEQ predicate on the "token" field.

func TokenNotIn

func TokenNotIn(vs ...[]byte) predicate.Authorization

TokenNotIn applies the NotIn predicate on the "token" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Kind

type Kind string

Kind defines the type for the "kind" enum field.

const (
	KindEmail    Kind = "email"
	KindPassword Kind = "password"
)

Kind values.

func (Kind) MarshalGQL

func (e Kind) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Kind) String

func (k Kind) String() string

func (*Kind) UnmarshalGQL

func (e *Kind) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Authorization queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByKind

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

ByKind orders the results by the kind field.

func ByPersonField

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

ByPersonField orders the results by person field.

func ByPersonID

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

ByPersonID orders the results by the person_id field.

Jump to

Keyboard shortcuts

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