token

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

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 3 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"
	// FieldValue holds the string denoting the value field in the database.
	FieldValue = "value"

	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"

	// Table holds the table name of the token in the database.
	Table = "tokens"
	// UserTable is the table the holds the user relation/edge.
	UserTable = "tokens"
	// 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 = "token_user"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldValue,
}

Columns holds all SQL columns for token fields.

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

ForeignKeys holds the SQL foreign-keys that are owned by the Token type.

View Source
var (
	// ValueValidator is a validator for the "value" field. It is called by the builders before save.
	ValueValidator func(string) error
)

Functions

func And

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

And groups list of predicates with the AND operator between them.

func HasUser

func HasUser() predicate.Token

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.Token

ID filters vertices based on their identifier.

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 Not

Not applies the not operator on the given predicate.

func Or

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

Or groups list of predicates with the OR operator between them.

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 string) predicate.Token

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

func ValueContains

func ValueContains(v string) predicate.Token

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

func ValueContainsFold

func ValueContainsFold(v string) predicate.Token

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

func ValueEQ

func ValueEQ(v string) predicate.Token

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

func ValueEqualFold

func ValueEqualFold(v string) predicate.Token

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

func ValueGT

func ValueGT(v string) predicate.Token

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

func ValueGTE

func ValueGTE(v string) predicate.Token

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

func ValueHasPrefix

func ValueHasPrefix(v string) predicate.Token

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

func ValueHasSuffix

func ValueHasSuffix(v string) predicate.Token

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

func ValueIn

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

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

func ValueLT

func ValueLT(v string) predicate.Token

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

func ValueLTE

func ValueLTE(v string) predicate.Token

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

func ValueNEQ

func ValueNEQ(v string) predicate.Token

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

func ValueNotIn

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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