recoverycode

package
v0.0.0-...-65a4bde Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the recoverycode type in the database.
	Label = "recovery_code"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCode holds the string denoting the code field in the database.
	FieldCode = "code"
	// FieldUsed holds the string denoting the used field in the database.
	FieldUsed = "used"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "uid"
	// Table holds the table name of the recoverycode in the database.
	Table = "recovery_codes"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "recovery_codes"
	// 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 = "user_recoverycodes"
)

Variables

View Source
var (
	// CodeValidator is a validator for the "code" field. It is called by the builders before save.
	CodeValidator func(string) error
	// DefaultUsed holds the default value on creation for the "used" field.
	DefaultUsed bool
)
View Source
var Columns = []string{
	FieldID,
	FieldCode,
	FieldUsed,
}

Columns holds all SQL columns for recoverycode fields.

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

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

Functions

func And

func And(predicates ...predicate.RecoveryCode) predicate.RecoveryCode

And groups predicates with the AND operator between them.

func Code

Code applies equality check predicate on the "code" field. It's identical to CodeEQ.

func CodeContains

func CodeContains(v string) predicate.RecoveryCode

CodeContains applies the Contains predicate on the "code" field.

func CodeContainsFold

func CodeContainsFold(v string) predicate.RecoveryCode

CodeContainsFold applies the ContainsFold predicate on the "code" field.

func CodeEQ

func CodeEQ(v string) predicate.RecoveryCode

CodeEQ applies the EQ predicate on the "code" field.

func CodeEqualFold

func CodeEqualFold(v string) predicate.RecoveryCode

CodeEqualFold applies the EqualFold predicate on the "code" field.

func CodeGT

func CodeGT(v string) predicate.RecoveryCode

CodeGT applies the GT predicate on the "code" field.

func CodeGTE

func CodeGTE(v string) predicate.RecoveryCode

CodeGTE applies the GTE predicate on the "code" field.

func CodeHasPrefix

func CodeHasPrefix(v string) predicate.RecoveryCode

CodeHasPrefix applies the HasPrefix predicate on the "code" field.

func CodeHasSuffix

func CodeHasSuffix(v string) predicate.RecoveryCode

CodeHasSuffix applies the HasSuffix predicate on the "code" field.

func CodeIn

func CodeIn(vs ...string) predicate.RecoveryCode

CodeIn applies the In predicate on the "code" field.

func CodeLT

func CodeLT(v string) predicate.RecoveryCode

CodeLT applies the LT predicate on the "code" field.

func CodeLTE

func CodeLTE(v string) predicate.RecoveryCode

CodeLTE applies the LTE predicate on the "code" field.

func CodeNEQ

func CodeNEQ(v string) predicate.RecoveryCode

CodeNEQ applies the NEQ predicate on the "code" field.

func CodeNotIn

func CodeNotIn(vs ...string) predicate.RecoveryCode

CodeNotIn applies the NotIn predicate on the "code" field.

func HasUser

func HasUser() predicate.RecoveryCode

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.RecoveryCode

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.RecoveryCode

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.RecoveryCode

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.RecoveryCode

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.RecoveryCode

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.RecoveryCode

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.RecoveryCode

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.RecoveryCode) predicate.RecoveryCode

Or groups predicates with the OR operator between them.

func Used

func Used(v bool) predicate.RecoveryCode

Used applies equality check predicate on the "used" field. It's identical to UsedEQ.

func UsedEQ

func UsedEQ(v bool) predicate.RecoveryCode

UsedEQ applies the EQ predicate on the "used" field.

func UsedNEQ

func UsedNEQ(v bool) predicate.RecoveryCode

UsedNEQ applies the NEQ predicate on the "used" 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 RecoveryCode queries.

func ByCode

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

ByCode orders the results by the code field.

func ByID

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

ByID orders the results by the id field.

func ByUsed

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

ByUsed orders the results by the used field.

func ByUserField

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

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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