token

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the token type in the database.
	Label = "token"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldKeyID holds the string denoting the key_id field in the database.
	FieldKeyID = "key_id"
	// FieldHash holds the string denoting the hash field in the database.
	FieldHash = "hash"
	// FieldUser holds the string denoting the user field in the database.
	FieldUser = "user"
	// FieldLabel holds the string denoting the label field in the database.
	FieldLabel = "label"
	// FieldPath holds the string denoting the path field in the database.
	FieldPath = "path"
	// FieldHost holds the string denoting the host field in the database.
	FieldHost = "host"
	// FieldHeaders holds the string denoting the headers field in the database.
	FieldHeaders = "headers"
	// FieldRequests holds the string denoting the requests field in the database.
	FieldRequests = "requests"
	// FieldLastAccessAt holds the string denoting the last_access_at field in the database.
	FieldLastAccessAt = "last_access_at"
	// Table holds the table name of the token in the database.
	Table = "token"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// HashValidator is a validator for the "hash" field. It is called by the builders before save.
	HashValidator func([]byte) error
	// DefaultLabel holds the default value on creation for the "label" field.
	DefaultLabel string
	// DefaultPath holds the default value on creation for the "path" field.
	DefaultPath string
	// DefaultHost holds the default value on creation for the "host" field.
	DefaultHost string
	// DefaultRequests holds the default value on creation for the "requests" field.
	DefaultRequests int64
	// DefaultLastAccessAt holds the default value on creation for the "last_access_at" field.
	DefaultLastAccessAt func() time.Time
	// ValueScanner of all Token fields.
	ValueScanner struct {
		KeyID field.TypeValueScanner[*types.KeyID]
	}
)

Columns holds all SQL columns for token fields.

Functions

func And

func And(predicates ...predicate.Token) predicate.Token

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Token

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Token

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Token

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Token

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Token

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Token

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Token

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

func CreatedAtNotIn

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

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

func Hash

func Hash(v []byte) predicate.Token

Hash applies equality check predicate on the "hash" field. It's identical to HashEQ.

func HashEQ

func HashEQ(v []byte) predicate.Token

HashEQ applies the EQ predicate on the "hash" field.

func HashGT

func HashGT(v []byte) predicate.Token

HashGT applies the GT predicate on the "hash" field.

func HashGTE

func HashGTE(v []byte) predicate.Token

HashGTE applies the GTE predicate on the "hash" field.

func HashIn

func HashIn(vs ...[]byte) predicate.Token

HashIn applies the In predicate on the "hash" field.

func HashLT

func HashLT(v []byte) predicate.Token

HashLT applies the LT predicate on the "hash" field.

func HashLTE

func HashLTE(v []byte) predicate.Token

HashLTE applies the LTE predicate on the "hash" field.

func HashNEQ

func HashNEQ(v []byte) predicate.Token

HashNEQ applies the NEQ predicate on the "hash" field.

func HashNotIn

func HashNotIn(vs ...[]byte) predicate.Token

HashNotIn applies the NotIn predicate on the "hash" field.

func HeadersIsNil

func HeadersIsNil() predicate.Token

HeadersIsNil applies the IsNil predicate on the "headers" field.

func HeadersNotNil

func HeadersNotNil() predicate.Token

HeadersNotNil applies the NotNil predicate on the "headers" field.

func Host

func Host(v string) predicate.Token

Host applies equality check predicate on the "host" field. It's identical to HostEQ.

func HostContains

func HostContains(v string) predicate.Token

HostContains applies the Contains predicate on the "host" field.

func HostContainsFold

func HostContainsFold(v string) predicate.Token

HostContainsFold applies the ContainsFold predicate on the "host" field.

func HostEQ

func HostEQ(v string) predicate.Token

HostEQ applies the EQ predicate on the "host" field.

func HostEqualFold

func HostEqualFold(v string) predicate.Token

HostEqualFold applies the EqualFold predicate on the "host" field.

func HostGT

func HostGT(v string) predicate.Token

HostGT applies the GT predicate on the "host" field.

func HostGTE

func HostGTE(v string) predicate.Token

HostGTE applies the GTE predicate on the "host" field.

func HostHasPrefix

func HostHasPrefix(v string) predicate.Token

HostHasPrefix applies the HasPrefix predicate on the "host" field.

func HostHasSuffix

func HostHasSuffix(v string) predicate.Token

HostHasSuffix applies the HasSuffix predicate on the "host" field.

func HostIn

func HostIn(vs ...string) predicate.Token

HostIn applies the In predicate on the "host" field.

func HostLT

func HostLT(v string) predicate.Token

HostLT applies the LT predicate on the "host" field.

func HostLTE

func HostLTE(v string) predicate.Token

HostLTE applies the LTE predicate on the "host" field.

func HostNEQ

func HostNEQ(v string) predicate.Token

HostNEQ applies the NEQ predicate on the "host" field.

func HostNotIn

func HostNotIn(vs ...string) predicate.Token

HostNotIn applies the NotIn predicate on the "host" field.

func ID

func ID(id int) predicate.Token

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Token

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Token

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Token

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Token

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Token

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Token

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func KeyID

func KeyID(v *types.KeyID) predicate.Token

KeyID applies equality check predicate on the "key_id" field. It's identical to KeyIDEQ.

func KeyIDContains

func KeyIDContains(v *types.KeyID) predicate.Token

KeyIDContains applies the Contains predicate on the "key_id" field.

func KeyIDContainsFold

func KeyIDContainsFold(v *types.KeyID) predicate.Token

KeyIDContainsFold applies the ContainsFold predicate on the "key_id" field.

func KeyIDEQ

func KeyIDEQ(v *types.KeyID) predicate.Token

KeyIDEQ applies the EQ predicate on the "key_id" field.

func KeyIDEqualFold

func KeyIDEqualFold(v *types.KeyID) predicate.Token

KeyIDEqualFold applies the EqualFold predicate on the "key_id" field.

func KeyIDGT

func KeyIDGT(v *types.KeyID) predicate.Token

KeyIDGT applies the GT predicate on the "key_id" field.

func KeyIDGTE

func KeyIDGTE(v *types.KeyID) predicate.Token

KeyIDGTE applies the GTE predicate on the "key_id" field.

func KeyIDHasPrefix

func KeyIDHasPrefix(v *types.KeyID) predicate.Token

KeyIDHasPrefix applies the HasPrefix predicate on the "key_id" field.

func KeyIDHasSuffix

func KeyIDHasSuffix(v *types.KeyID) predicate.Token

KeyIDHasSuffix applies the HasSuffix predicate on the "key_id" field.

func KeyIDIn

func KeyIDIn(vs ...*types.KeyID) predicate.Token

KeyIDIn applies the In predicate on the "key_id" field.

func KeyIDLT

func KeyIDLT(v *types.KeyID) predicate.Token

KeyIDLT applies the LT predicate on the "key_id" field.

func KeyIDLTE

func KeyIDLTE(v *types.KeyID) predicate.Token

KeyIDLTE applies the LTE predicate on the "key_id" field.

func KeyIDNEQ

func KeyIDNEQ(v *types.KeyID) predicate.Token

KeyIDNEQ applies the NEQ predicate on the "key_id" field.

func KeyIDNotIn

func KeyIDNotIn(vs ...*types.KeyID) predicate.Token

KeyIDNotIn applies the NotIn predicate on the "key_id" field.

func LabelContains

func LabelContains(v string) predicate.Token

LabelContains applies the Contains predicate on the "label" field.

func LabelContainsFold

func LabelContainsFold(v string) predicate.Token

LabelContainsFold applies the ContainsFold predicate on the "label" field.

func LabelEQ

func LabelEQ(v string) predicate.Token

LabelEQ applies the EQ predicate on the "label" field.

func LabelEqualFold

func LabelEqualFold(v string) predicate.Token

LabelEqualFold applies the EqualFold predicate on the "label" field.

func LabelGT

func LabelGT(v string) predicate.Token

LabelGT applies the GT predicate on the "label" field.

func LabelGTE

func LabelGTE(v string) predicate.Token

LabelGTE applies the GTE predicate on the "label" field.

func LabelHasPrefix

func LabelHasPrefix(v string) predicate.Token

LabelHasPrefix applies the HasPrefix predicate on the "label" field.

func LabelHasSuffix

func LabelHasSuffix(v string) predicate.Token

LabelHasSuffix applies the HasSuffix predicate on the "label" field.

func LabelIn

func LabelIn(vs ...string) predicate.Token

LabelIn applies the In predicate on the "label" field.

func LabelLT

func LabelLT(v string) predicate.Token

LabelLT applies the LT predicate on the "label" field.

func LabelLTE

func LabelLTE(v string) predicate.Token

LabelLTE applies the LTE predicate on the "label" field.

func LabelNEQ

func LabelNEQ(v string) predicate.Token

LabelNEQ applies the NEQ predicate on the "label" field.

func LabelNotIn

func LabelNotIn(vs ...string) predicate.Token

LabelNotIn applies the NotIn predicate on the "label" field.

func LastAccessAt

func LastAccessAt(v time.Time) predicate.Token

LastAccessAt applies equality check predicate on the "last_access_at" field. It's identical to LastAccessAtEQ.

func LastAccessAtEQ

func LastAccessAtEQ(v time.Time) predicate.Token

LastAccessAtEQ applies the EQ predicate on the "last_access_at" field.

func LastAccessAtGT

func LastAccessAtGT(v time.Time) predicate.Token

LastAccessAtGT applies the GT predicate on the "last_access_at" field.

func LastAccessAtGTE

func LastAccessAtGTE(v time.Time) predicate.Token

LastAccessAtGTE applies the GTE predicate on the "last_access_at" field.

func LastAccessAtIn

func LastAccessAtIn(vs ...time.Time) predicate.Token

LastAccessAtIn applies the In predicate on the "last_access_at" field.

func LastAccessAtLT

func LastAccessAtLT(v time.Time) predicate.Token

LastAccessAtLT applies the LT predicate on the "last_access_at" field.

func LastAccessAtLTE

func LastAccessAtLTE(v time.Time) predicate.Token

LastAccessAtLTE applies the LTE predicate on the "last_access_at" field.

func LastAccessAtNEQ

func LastAccessAtNEQ(v time.Time) predicate.Token

LastAccessAtNEQ applies the NEQ predicate on the "last_access_at" field.

func LastAccessAtNotIn

func LastAccessAtNotIn(vs ...time.Time) predicate.Token

LastAccessAtNotIn applies the NotIn predicate on the "last_access_at" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Token) predicate.Token

Or groups predicates with the OR operator between them.

func Path

func Path(v string) predicate.Token

Path applies equality check predicate on the "path" field. It's identical to PathEQ.

func PathContains

func PathContains(v string) predicate.Token

PathContains applies the Contains predicate on the "path" field.

func PathContainsFold

func PathContainsFold(v string) predicate.Token

PathContainsFold applies the ContainsFold predicate on the "path" field.

func PathEQ

func PathEQ(v string) predicate.Token

PathEQ applies the EQ predicate on the "path" field.

func PathEqualFold

func PathEqualFold(v string) predicate.Token

PathEqualFold applies the EqualFold predicate on the "path" field.

func PathGT

func PathGT(v string) predicate.Token

PathGT applies the GT predicate on the "path" field.

func PathGTE

func PathGTE(v string) predicate.Token

PathGTE applies the GTE predicate on the "path" field.

func PathHasPrefix

func PathHasPrefix(v string) predicate.Token

PathHasPrefix applies the HasPrefix predicate on the "path" field.

func PathHasSuffix

func PathHasSuffix(v string) predicate.Token

PathHasSuffix applies the HasSuffix predicate on the "path" field.

func PathIn

func PathIn(vs ...string) predicate.Token

PathIn applies the In predicate on the "path" field.

func PathLT

func PathLT(v string) predicate.Token

PathLT applies the LT predicate on the "path" field.

func PathLTE

func PathLTE(v string) predicate.Token

PathLTE applies the LTE predicate on the "path" field.

func PathNEQ

func PathNEQ(v string) predicate.Token

PathNEQ applies the NEQ predicate on the "path" field.

func PathNotIn

func PathNotIn(vs ...string) predicate.Token

PathNotIn applies the NotIn predicate on the "path" field.

func Requests

func Requests(v int64) predicate.Token

Requests applies equality check predicate on the "requests" field. It's identical to RequestsEQ.

func RequestsEQ

func RequestsEQ(v int64) predicate.Token

RequestsEQ applies the EQ predicate on the "requests" field.

func RequestsGT

func RequestsGT(v int64) predicate.Token

RequestsGT applies the GT predicate on the "requests" field.

func RequestsGTE

func RequestsGTE(v int64) predicate.Token

RequestsGTE applies the GTE predicate on the "requests" field.

func RequestsIn

func RequestsIn(vs ...int64) predicate.Token

RequestsIn applies the In predicate on the "requests" field.

func RequestsLT

func RequestsLT(v int64) predicate.Token

RequestsLT applies the LT predicate on the "requests" field.

func RequestsLTE

func RequestsLTE(v int64) predicate.Token

RequestsLTE applies the LTE predicate on the "requests" field.

func RequestsNEQ

func RequestsNEQ(v int64) predicate.Token

RequestsNEQ applies the NEQ predicate on the "requests" field.

func RequestsNotIn

func RequestsNotIn(vs ...int64) predicate.Token

RequestsNotIn applies the NotIn predicate on the "requests" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Token

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Token

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Token

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Token

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Token

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Token

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Token

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Token

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Token

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func User

func User(v string) predicate.Token

User applies equality check predicate on the "user" field. It's identical to UserEQ.

func UserContains

func UserContains(v string) predicate.Token

UserContains applies the Contains predicate on the "user" field.

func UserContainsFold

func UserContainsFold(v string) predicate.Token

UserContainsFold applies the ContainsFold predicate on the "user" field.

func UserEQ

func UserEQ(v string) predicate.Token

UserEQ applies the EQ predicate on the "user" field.

func UserEqualFold

func UserEqualFold(v string) predicate.Token

UserEqualFold applies the EqualFold predicate on the "user" field.

func UserGT

func UserGT(v string) predicate.Token

UserGT applies the GT predicate on the "user" field.

func UserGTE

func UserGTE(v string) predicate.Token

UserGTE applies the GTE predicate on the "user" field.

func UserHasPrefix

func UserHasPrefix(v string) predicate.Token

UserHasPrefix applies the HasPrefix predicate on the "user" field.

func UserHasSuffix

func UserHasSuffix(v string) predicate.Token

UserHasSuffix applies the HasSuffix predicate on the "user" field.

func UserIn

func UserIn(vs ...string) predicate.Token

UserIn applies the In predicate on the "user" field.

func UserLT

func UserLT(v string) predicate.Token

UserLT applies the LT predicate on the "user" field.

func UserLTE

func UserLTE(v string) predicate.Token

UserLTE applies the LTE predicate on the "user" field.

func UserNEQ

func UserNEQ(v string) predicate.Token

UserNEQ applies the NEQ predicate on the "user" field.

func UserNotIn

func UserNotIn(vs ...string) predicate.Token

UserNotIn applies the NotIn predicate on the "user" 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 Token queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByHost

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

ByHost orders the results by the host field.

func ByID

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

ByID orders the results by the id field.

func ByKeyID

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

ByKeyID orders the results by the key_id field.

func ByLabel

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

ByLabel orders the results by the label field.

func ByLastAccessAt

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

ByLastAccessAt orders the results by the last_access_at field.

func ByPath

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

ByPath orders the results by the path field.

func ByRequests

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

ByRequests orders the results by the requests field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUser

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

ByUser orders the results by the user field.

Jump to

Keyboard shortcuts

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