token

package
v0.11.10 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 4 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"
	// FieldBody holds the string denoting the body field in the database.
	FieldBody = "body"
	// EdgeAccount holds the string denoting the account edge name in mutations.
	EdgeAccount = "account"
	// Table holds the table name of the token in the database.
	Table = "tokens"
	// AccountTable is the table that holds the account relation/edge.
	AccountTable = "tokens"
	// AccountInverseTable is the table name for the Account entity.
	// It exists in this package in order to avoid circular dependency with the "account" package.
	AccountInverseTable = "accounts"
	// AccountColumn is the table column denoting the account relation/edge.
	AccountColumn = "account_token"
)

Variables

View Source
var (
	// BodyValidator is a validator for the "body" field. It is called by the builders before save.
	BodyValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() sid.ID
)
View Source
var Columns = []string{
	FieldID,
	FieldBody,
}

Columns holds all SQL columns for token fields.

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

ForeignKeys holds the SQL foreign-keys that are owned by the "tokens" table and are not defined as standalone fields in the schema.

Functions

func And

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

And groups predicates with the AND operator between them.

func Body

func Body(v string) predicate.Token

Body applies equality check predicate on the "body" field. It's identical to BodyEQ.

func BodyContains

func BodyContains(v string) predicate.Token

BodyContains applies the Contains predicate on the "body" field.

func BodyContainsFold

func BodyContainsFold(v string) predicate.Token

BodyContainsFold applies the ContainsFold predicate on the "body" field.

func BodyEQ

func BodyEQ(v string) predicate.Token

BodyEQ applies the EQ predicate on the "body" field.

func BodyEqualFold

func BodyEqualFold(v string) predicate.Token

BodyEqualFold applies the EqualFold predicate on the "body" field.

func BodyGT

func BodyGT(v string) predicate.Token

BodyGT applies the GT predicate on the "body" field.

func BodyGTE

func BodyGTE(v string) predicate.Token

BodyGTE applies the GTE predicate on the "body" field.

func BodyHasPrefix

func BodyHasPrefix(v string) predicate.Token

BodyHasPrefix applies the HasPrefix predicate on the "body" field.

func BodyHasSuffix

func BodyHasSuffix(v string) predicate.Token

BodyHasSuffix applies the HasSuffix predicate on the "body" field.

func BodyIn

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

BodyIn applies the In predicate on the "body" field.

func BodyLT

func BodyLT(v string) predicate.Token

BodyLT applies the LT predicate on the "body" field.

func BodyLTE

func BodyLTE(v string) predicate.Token

BodyLTE applies the LTE predicate on the "body" field.

func BodyNEQ

func BodyNEQ(v string) predicate.Token

BodyNEQ applies the NEQ predicate on the "body" field.

func BodyNotIn

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

BodyNotIn applies the NotIn predicate on the "body" field.

func HasAccount

func HasAccount() predicate.Token

HasAccount applies the HasEdge predicate on the "account" edge.

func HasAccountWith

func HasAccountWith(preds ...predicate.Account) predicate.Token

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

func ID

func ID(id sid.ID) predicate.Token

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id sid.ID) predicate.Token

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id sid.ID) predicate.Token

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id sid.ID) predicate.Token

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id sid.ID) predicate.Token

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id sid.ID) predicate.Token

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id sid.ID) predicate.Token

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...sid.ID) 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 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).

Types

This section is empty.

Jump to

Keyboard shortcuts

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