authentication

package
v0.0.0-...-52c27b0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the authentication type in the database.
	Label = "authentication"
	// 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"
	// FieldCreatedIP holds the string denoting the created_ip field in the database.
	FieldCreatedIP = "created_ip"
	// FieldLastUsedIP holds the string denoting the last_used_ip field in the database.
	FieldLastUsedIP = "last_used_ip"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldLastUsedAt holds the string denoting the last_used_at field in the database.
	FieldLastUsedAt = "last_used_at"
	// FieldLastPasswordChallengeAt holds the string denoting the last_password_challenge_at field in the database.
	FieldLastPasswordChallengeAt = "last_password_challenge_at"
	// FieldLastCaptchaChallengeAt holds the string denoting the last_captcha_challenge_at field in the database.
	FieldLastCaptchaChallengeAt = "last_captcha_challenge_at"
	// EdgePerson holds the string denoting the person edge name in mutations.
	EdgePerson = "person"
	// Table holds the table name of the authentication in the database.
	Table = "authentications"
	// PersonTable is the table that holds the person relation/edge.
	PersonTable = "authentications"
	// 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
	// DefaultLastUsedAt holds the default value on creation for the "last_used_at" field.
	DefaultLastUsedAt func() time.Time
	// UpdateDefaultLastUsedAt holds the default value on update for the "last_used_at" field.
	UpdateDefaultLastUsedAt 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 authentication fields.

Functions

func And

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Authentication

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Authentication

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Authentication

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Authentication

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Authentication

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Authentication

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Authentication

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

func CreatedAtNotIn

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

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

func CreatedIP

func CreatedIP(v string) predicate.Authentication

CreatedIP applies equality check predicate on the "created_ip" field. It's identical to CreatedIPEQ.

func CreatedIPContains

func CreatedIPContains(v string) predicate.Authentication

CreatedIPContains applies the Contains predicate on the "created_ip" field.

func CreatedIPContainsFold

func CreatedIPContainsFold(v string) predicate.Authentication

CreatedIPContainsFold applies the ContainsFold predicate on the "created_ip" field.

func CreatedIPEQ

func CreatedIPEQ(v string) predicate.Authentication

CreatedIPEQ applies the EQ predicate on the "created_ip" field.

func CreatedIPEqualFold

func CreatedIPEqualFold(v string) predicate.Authentication

CreatedIPEqualFold applies the EqualFold predicate on the "created_ip" field.

func CreatedIPGT

func CreatedIPGT(v string) predicate.Authentication

CreatedIPGT applies the GT predicate on the "created_ip" field.

func CreatedIPGTE

func CreatedIPGTE(v string) predicate.Authentication

CreatedIPGTE applies the GTE predicate on the "created_ip" field.

func CreatedIPHasPrefix

func CreatedIPHasPrefix(v string) predicate.Authentication

CreatedIPHasPrefix applies the HasPrefix predicate on the "created_ip" field.

func CreatedIPHasSuffix

func CreatedIPHasSuffix(v string) predicate.Authentication

CreatedIPHasSuffix applies the HasSuffix predicate on the "created_ip" field.

func CreatedIPIn

func CreatedIPIn(vs ...string) predicate.Authentication

CreatedIPIn applies the In predicate on the "created_ip" field.

func CreatedIPLT

func CreatedIPLT(v string) predicate.Authentication

CreatedIPLT applies the LT predicate on the "created_ip" field.

func CreatedIPLTE

func CreatedIPLTE(v string) predicate.Authentication

CreatedIPLTE applies the LTE predicate on the "created_ip" field.

func CreatedIPNEQ

func CreatedIPNEQ(v string) predicate.Authentication

CreatedIPNEQ applies the NEQ predicate on the "created_ip" field.

func CreatedIPNotIn

func CreatedIPNotIn(vs ...string) predicate.Authentication

CreatedIPNotIn applies the NotIn predicate on the "created_ip" field.

func HasPerson

func HasPerson() predicate.Authentication

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

func HasPersonWith

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

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 types.ID) predicate.Authentication

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...types.ID) predicate.Authentication

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 types.ID) predicate.Authentication

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id types.ID) predicate.Authentication

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...types.ID) predicate.Authentication

IDNotIn applies the NotIn predicate on the ID field.

func LastCaptchaChallengeAt

func LastCaptchaChallengeAt(v time.Time) predicate.Authentication

LastCaptchaChallengeAt applies equality check predicate on the "last_captcha_challenge_at" field. It's identical to LastCaptchaChallengeAtEQ.

func LastCaptchaChallengeAtEQ

func LastCaptchaChallengeAtEQ(v time.Time) predicate.Authentication

LastCaptchaChallengeAtEQ applies the EQ predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtGT

func LastCaptchaChallengeAtGT(v time.Time) predicate.Authentication

LastCaptchaChallengeAtGT applies the GT predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtGTE

func LastCaptchaChallengeAtGTE(v time.Time) predicate.Authentication

LastCaptchaChallengeAtGTE applies the GTE predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtIn

func LastCaptchaChallengeAtIn(vs ...time.Time) predicate.Authentication

LastCaptchaChallengeAtIn applies the In predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtIsNil

func LastCaptchaChallengeAtIsNil() predicate.Authentication

LastCaptchaChallengeAtIsNil applies the IsNil predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtLT

func LastCaptchaChallengeAtLT(v time.Time) predicate.Authentication

LastCaptchaChallengeAtLT applies the LT predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtLTE

func LastCaptchaChallengeAtLTE(v time.Time) predicate.Authentication

LastCaptchaChallengeAtLTE applies the LTE predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtNEQ

func LastCaptchaChallengeAtNEQ(v time.Time) predicate.Authentication

LastCaptchaChallengeAtNEQ applies the NEQ predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtNotIn

func LastCaptchaChallengeAtNotIn(vs ...time.Time) predicate.Authentication

LastCaptchaChallengeAtNotIn applies the NotIn predicate on the "last_captcha_challenge_at" field.

func LastCaptchaChallengeAtNotNil

func LastCaptchaChallengeAtNotNil() predicate.Authentication

LastCaptchaChallengeAtNotNil applies the NotNil predicate on the "last_captcha_challenge_at" field.

func LastPasswordChallengeAt

func LastPasswordChallengeAt(v time.Time) predicate.Authentication

LastPasswordChallengeAt applies equality check predicate on the "last_password_challenge_at" field. It's identical to LastPasswordChallengeAtEQ.

func LastPasswordChallengeAtEQ

func LastPasswordChallengeAtEQ(v time.Time) predicate.Authentication

LastPasswordChallengeAtEQ applies the EQ predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtGT

func LastPasswordChallengeAtGT(v time.Time) predicate.Authentication

LastPasswordChallengeAtGT applies the GT predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtGTE

func LastPasswordChallengeAtGTE(v time.Time) predicate.Authentication

LastPasswordChallengeAtGTE applies the GTE predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtIn

func LastPasswordChallengeAtIn(vs ...time.Time) predicate.Authentication

LastPasswordChallengeAtIn applies the In predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtIsNil

func LastPasswordChallengeAtIsNil() predicate.Authentication

LastPasswordChallengeAtIsNil applies the IsNil predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtLT

func LastPasswordChallengeAtLT(v time.Time) predicate.Authentication

LastPasswordChallengeAtLT applies the LT predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtLTE

func LastPasswordChallengeAtLTE(v time.Time) predicate.Authentication

LastPasswordChallengeAtLTE applies the LTE predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtNEQ

func LastPasswordChallengeAtNEQ(v time.Time) predicate.Authentication

LastPasswordChallengeAtNEQ applies the NEQ predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtNotIn

func LastPasswordChallengeAtNotIn(vs ...time.Time) predicate.Authentication

LastPasswordChallengeAtNotIn applies the NotIn predicate on the "last_password_challenge_at" field.

func LastPasswordChallengeAtNotNil

func LastPasswordChallengeAtNotNil() predicate.Authentication

LastPasswordChallengeAtNotNil applies the NotNil predicate on the "last_password_challenge_at" field.

func LastUsedAt

func LastUsedAt(v time.Time) predicate.Authentication

LastUsedAt applies equality check predicate on the "last_used_at" field. It's identical to LastUsedAtEQ.

func LastUsedAtEQ

func LastUsedAtEQ(v time.Time) predicate.Authentication

LastUsedAtEQ applies the EQ predicate on the "last_used_at" field.

func LastUsedAtGT

func LastUsedAtGT(v time.Time) predicate.Authentication

LastUsedAtGT applies the GT predicate on the "last_used_at" field.

func LastUsedAtGTE

func LastUsedAtGTE(v time.Time) predicate.Authentication

LastUsedAtGTE applies the GTE predicate on the "last_used_at" field.

func LastUsedAtIn

func LastUsedAtIn(vs ...time.Time) predicate.Authentication

LastUsedAtIn applies the In predicate on the "last_used_at" field.

func LastUsedAtLT

func LastUsedAtLT(v time.Time) predicate.Authentication

LastUsedAtLT applies the LT predicate on the "last_used_at" field.

func LastUsedAtLTE

func LastUsedAtLTE(v time.Time) predicate.Authentication

LastUsedAtLTE applies the LTE predicate on the "last_used_at" field.

func LastUsedAtNEQ

func LastUsedAtNEQ(v time.Time) predicate.Authentication

LastUsedAtNEQ applies the NEQ predicate on the "last_used_at" field.

func LastUsedAtNotIn

func LastUsedAtNotIn(vs ...time.Time) predicate.Authentication

LastUsedAtNotIn applies the NotIn predicate on the "last_used_at" field.

func LastUsedIP

func LastUsedIP(v string) predicate.Authentication

LastUsedIP applies equality check predicate on the "last_used_ip" field. It's identical to LastUsedIPEQ.

func LastUsedIPContains

func LastUsedIPContains(v string) predicate.Authentication

LastUsedIPContains applies the Contains predicate on the "last_used_ip" field.

func LastUsedIPContainsFold

func LastUsedIPContainsFold(v string) predicate.Authentication

LastUsedIPContainsFold applies the ContainsFold predicate on the "last_used_ip" field.

func LastUsedIPEQ

func LastUsedIPEQ(v string) predicate.Authentication

LastUsedIPEQ applies the EQ predicate on the "last_used_ip" field.

func LastUsedIPEqualFold

func LastUsedIPEqualFold(v string) predicate.Authentication

LastUsedIPEqualFold applies the EqualFold predicate on the "last_used_ip" field.

func LastUsedIPGT

func LastUsedIPGT(v string) predicate.Authentication

LastUsedIPGT applies the GT predicate on the "last_used_ip" field.

func LastUsedIPGTE

func LastUsedIPGTE(v string) predicate.Authentication

LastUsedIPGTE applies the GTE predicate on the "last_used_ip" field.

func LastUsedIPHasPrefix

func LastUsedIPHasPrefix(v string) predicate.Authentication

LastUsedIPHasPrefix applies the HasPrefix predicate on the "last_used_ip" field.

func LastUsedIPHasSuffix

func LastUsedIPHasSuffix(v string) predicate.Authentication

LastUsedIPHasSuffix applies the HasSuffix predicate on the "last_used_ip" field.

func LastUsedIPIn

func LastUsedIPIn(vs ...string) predicate.Authentication

LastUsedIPIn applies the In predicate on the "last_used_ip" field.

func LastUsedIPLT

func LastUsedIPLT(v string) predicate.Authentication

LastUsedIPLT applies the LT predicate on the "last_used_ip" field.

func LastUsedIPLTE

func LastUsedIPLTE(v string) predicate.Authentication

LastUsedIPLTE applies the LTE predicate on the "last_used_ip" field.

func LastUsedIPNEQ

func LastUsedIPNEQ(v string) predicate.Authentication

LastUsedIPNEQ applies the NEQ predicate on the "last_used_ip" field.

func LastUsedIPNotIn

func LastUsedIPNotIn(vs ...string) predicate.Authentication

LastUsedIPNotIn applies the NotIn predicate on the "last_used_ip" field.

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 types.ID) predicate.Authentication

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

func PersonIDEQ

func PersonIDEQ(v types.ID) predicate.Authentication

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

func PersonIDIn

func PersonIDIn(vs ...types.ID) predicate.Authentication

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

func PersonIDNEQ

func PersonIDNEQ(v types.ID) predicate.Authentication

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

func PersonIDNotIn

func PersonIDNotIn(vs ...types.ID) predicate.Authentication

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

func Token

func Token(v []byte) predicate.Authentication

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

func TokenEQ

func TokenEQ(v []byte) predicate.Authentication

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

func TokenGT

func TokenGT(v []byte) predicate.Authentication

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

func TokenGTE

func TokenGTE(v []byte) predicate.Authentication

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

func TokenIn

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

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

func TokenLT

func TokenLT(v []byte) predicate.Authentication

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

func TokenLTE

func TokenLTE(v []byte) predicate.Authentication

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

func TokenNEQ

func TokenNEQ(v []byte) predicate.Authentication

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

func TokenNotIn

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

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 OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Authentication queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedIP

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

ByCreatedIP orders the results by the created_ip field.

func ByID

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

ByID orders the results by the id field.

func ByLastCaptchaChallengeAt

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

ByLastCaptchaChallengeAt orders the results by the last_captcha_challenge_at field.

func ByLastPasswordChallengeAt

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

ByLastPasswordChallengeAt orders the results by the last_password_challenge_at field.

func ByLastUsedAt

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

ByLastUsedAt orders the results by the last_used_at field.

func ByLastUsedIP

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

ByLastUsedIP orders the results by the last_used_ip 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