token

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 9 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"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldSubjectID holds the string denoting the subject_id field in the database.
	FieldSubjectID = "subject_id"
	// FieldKind holds the string denoting the kind field in the database.
	FieldKind = "kind"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldExpiration holds the string denoting the expiration field in the database.
	FieldExpiration = "expiration"
	// FieldValue holds the string denoting the value field in the database.
	FieldValue = "value"
	// EdgeSubject holds the string denoting the subject edge name in mutations.
	EdgeSubject = "subject"
	// Table holds the table name of the token in the database.
	Table = "tokens"
	// SubjectTable is the table that holds the subject relation/edge.
	SubjectTable = "tokens"
	// SubjectInverseTable is the table name for the Subject entity.
	// It exists in this package in order to avoid circular dependency with the "subject" package.
	SubjectInverseTable = "subjects"
	// SubjectColumn is the table column denoting the subject relation/edge.
	SubjectColumn = "subject_id"
)

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// SubjectIDValidator is a validator for the "subject_id" field. It is called by the builders before save.
	SubjectIDValidator func(string) error
	// DefaultKind holds the default value on creation for the "kind" field.
	DefaultKind string
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// ValueValidator is a validator for the "value" field. It is called by the builders before save.
	ValueValidator func(string) error
)

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/seal-io/walrus/pkg/dao/model/runtime"

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 CreateTime

func CreateTime(v time.Time) predicate.Token

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Token

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Token

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Token

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

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

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Token

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Token

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Token

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

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

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Expiration

func Expiration(v time.Time) predicate.Token

Expiration applies equality check predicate on the "expiration" field. It's identical to ExpirationEQ.

func ExpirationEQ

func ExpirationEQ(v time.Time) predicate.Token

ExpirationEQ applies the EQ predicate on the "expiration" field.

func ExpirationGT

func ExpirationGT(v time.Time) predicate.Token

ExpirationGT applies the GT predicate on the "expiration" field.

func ExpirationGTE

func ExpirationGTE(v time.Time) predicate.Token

ExpirationGTE applies the GTE predicate on the "expiration" field.

func ExpirationIn

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

ExpirationIn applies the In predicate on the "expiration" field.

func ExpirationIsNil

func ExpirationIsNil() predicate.Token

ExpirationIsNil applies the IsNil predicate on the "expiration" field.

func ExpirationLT

func ExpirationLT(v time.Time) predicate.Token

ExpirationLT applies the LT predicate on the "expiration" field.

func ExpirationLTE

func ExpirationLTE(v time.Time) predicate.Token

ExpirationLTE applies the LTE predicate on the "expiration" field.

func ExpirationNEQ

func ExpirationNEQ(v time.Time) predicate.Token

ExpirationNEQ applies the NEQ predicate on the "expiration" field.

func ExpirationNotIn

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

ExpirationNotIn applies the NotIn predicate on the "expiration" field.

func ExpirationNotNil

func ExpirationNotNil() predicate.Token

ExpirationNotNil applies the NotNil predicate on the "expiration" field.

func HasSubject

func HasSubject() predicate.Token

HasSubject applies the HasEdge predicate on the "subject" edge.

func HasSubjectWith

func HasSubjectWith(preds ...predicate.Subject) predicate.Token

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

func ID

func ID(id object.ID) predicate.Token

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id object.ID) predicate.Token

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id object.ID) predicate.Token

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id object.ID) predicate.Token

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...object.ID) predicate.Token

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id object.ID) predicate.Token

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id object.ID) predicate.Token

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id object.ID) predicate.Token

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...object.ID) predicate.Token

IDNotIn applies the NotIn predicate on the ID field.

func Kind

func Kind(v string) predicate.Token

Kind applies equality check predicate on the "kind" field. It's identical to KindEQ.

func KindContains

func KindContains(v string) predicate.Token

KindContains applies the Contains predicate on the "kind" field.

func KindContainsFold

func KindContainsFold(v string) predicate.Token

KindContainsFold applies the ContainsFold predicate on the "kind" field.

func KindEQ

func KindEQ(v string) predicate.Token

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

func KindEqualFold

func KindEqualFold(v string) predicate.Token

KindEqualFold applies the EqualFold predicate on the "kind" field.

func KindGT

func KindGT(v string) predicate.Token

KindGT applies the GT predicate on the "kind" field.

func KindGTE

func KindGTE(v string) predicate.Token

KindGTE applies the GTE predicate on the "kind" field.

func KindHasPrefix

func KindHasPrefix(v string) predicate.Token

KindHasPrefix applies the HasPrefix predicate on the "kind" field.

func KindHasSuffix

func KindHasSuffix(v string) predicate.Token

KindHasSuffix applies the HasSuffix predicate on the "kind" field.

func KindIn

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

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

func KindLT

func KindLT(v string) predicate.Token

KindLT applies the LT predicate on the "kind" field.

func KindLTE

func KindLTE(v string) predicate.Token

KindLTE applies the LTE predicate on the "kind" field.

func KindNEQ

func KindNEQ(v string) predicate.Token

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

func KindNotIn

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

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

func Name

func Name(v string) predicate.Token

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Token

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Token

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Token

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Token

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Token

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Token

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Token

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Token

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

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

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Token

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Token

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Token

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

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

NameNotIn applies the NotIn predicate on the "name" 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 SubjectID

func SubjectID(v object.ID) predicate.Token

SubjectID applies equality check predicate on the "subject_id" field. It's identical to SubjectIDEQ.

func SubjectIDContains

func SubjectIDContains(v object.ID) predicate.Token

SubjectIDContains applies the Contains predicate on the "subject_id" field.

func SubjectIDContainsFold

func SubjectIDContainsFold(v object.ID) predicate.Token

SubjectIDContainsFold applies the ContainsFold predicate on the "subject_id" field.

func SubjectIDEQ

func SubjectIDEQ(v object.ID) predicate.Token

SubjectIDEQ applies the EQ predicate on the "subject_id" field.

func SubjectIDEqualFold

func SubjectIDEqualFold(v object.ID) predicate.Token

SubjectIDEqualFold applies the EqualFold predicate on the "subject_id" field.

func SubjectIDGT

func SubjectIDGT(v object.ID) predicate.Token

SubjectIDGT applies the GT predicate on the "subject_id" field.

func SubjectIDGTE

func SubjectIDGTE(v object.ID) predicate.Token

SubjectIDGTE applies the GTE predicate on the "subject_id" field.

func SubjectIDHasPrefix

func SubjectIDHasPrefix(v object.ID) predicate.Token

SubjectIDHasPrefix applies the HasPrefix predicate on the "subject_id" field.

func SubjectIDHasSuffix

func SubjectIDHasSuffix(v object.ID) predicate.Token

SubjectIDHasSuffix applies the HasSuffix predicate on the "subject_id" field.

func SubjectIDIn

func SubjectIDIn(vs ...object.ID) predicate.Token

SubjectIDIn applies the In predicate on the "subject_id" field.

func SubjectIDLT

func SubjectIDLT(v object.ID) predicate.Token

SubjectIDLT applies the LT predicate on the "subject_id" field.

func SubjectIDLTE

func SubjectIDLTE(v object.ID) predicate.Token

SubjectIDLTE applies the LTE predicate on the "subject_id" field.

func SubjectIDNEQ

func SubjectIDNEQ(v object.ID) predicate.Token

SubjectIDNEQ applies the NEQ predicate on the "subject_id" field.

func SubjectIDNotIn

func SubjectIDNotIn(vs ...object.ID) predicate.Token

SubjectIDNotIn applies the NotIn predicate on the "subject_id" field.

func ValidColumn

func ValidColumn(column string) bool

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

func Value

func Value(v crypto.String) predicate.Token

Value applies equality check predicate on the "value" field. It's identical to ValueEQ.

func ValueContains

func ValueContains(v crypto.String) predicate.Token

ValueContains applies the Contains predicate on the "value" field.

func ValueContainsFold

func ValueContainsFold(v crypto.String) predicate.Token

ValueContainsFold applies the ContainsFold predicate on the "value" field.

func ValueEQ

func ValueEQ(v crypto.String) predicate.Token

ValueEQ applies the EQ predicate on the "value" field.

func ValueEqualFold

func ValueEqualFold(v crypto.String) predicate.Token

ValueEqualFold applies the EqualFold predicate on the "value" field.

func ValueGT

func ValueGT(v crypto.String) predicate.Token

ValueGT applies the GT predicate on the "value" field.

func ValueGTE

func ValueGTE(v crypto.String) predicate.Token

ValueGTE applies the GTE predicate on the "value" field.

func ValueHasPrefix

func ValueHasPrefix(v crypto.String) predicate.Token

ValueHasPrefix applies the HasPrefix predicate on the "value" field.

func ValueHasSuffix

func ValueHasSuffix(v crypto.String) predicate.Token

ValueHasSuffix applies the HasSuffix predicate on the "value" field.

func ValueIn

func ValueIn(vs ...crypto.String) predicate.Token

ValueIn applies the In predicate on the "value" field.

func ValueLT

func ValueLT(v crypto.String) predicate.Token

ValueLT applies the LT predicate on the "value" field.

func ValueLTE

func ValueLTE(v crypto.String) predicate.Token

ValueLTE applies the LTE predicate on the "value" field.

func ValueNEQ

func ValueNEQ(v crypto.String) predicate.Token

ValueNEQ applies the NEQ predicate on the "value" field.

func ValueNotIn

func ValueNotIn(vs ...crypto.String) predicate.Token

ValueNotIn applies the NotIn predicate on the "value" field.

func WithoutFields

func WithoutFields(ignores ...string) []string

WithoutFields returns the fields ignored the given list.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Token queries.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByExpiration

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

ByExpiration orders the results by the expiration 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 ByName

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

ByName orders the results by the name field.

func BySubjectField

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

BySubjectField orders the results by subject field.

func BySubjectID

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

BySubjectID orders the results by the subject_id field.

func ByValue

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

ByValue orders the results by the value field.

Jump to

Keyboard shortcuts

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