Help us shape the future of Go! Take the 2026 Go Developer Survey

recoverycode

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: AGPL-3.0 Imports: 4 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"
	// 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"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldCodeHash holds the string denoting the code_hash field in the database.
	FieldCodeHash = "code_hash"
	// FieldUsedAt holds the string denoting the used_at field in the database.
	FieldUsedAt = "used_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// 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_id"
)

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
	// CodeHashValidator is a validator for the "code_hash" field. It is called by the builders before save.
	CodeHashValidator func(string) error
)

Columns holds all SQL columns for recoverycode fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func CodeHash

func CodeHash(v string) predicate.RecoveryCode

CodeHash applies equality check predicate on the "code_hash" field. It's identical to CodeHashEQ.

func CodeHashContains

func CodeHashContains(v string) predicate.RecoveryCode

CodeHashContains applies the Contains predicate on the "code_hash" field.

func CodeHashContainsFold

func CodeHashContainsFold(v string) predicate.RecoveryCode

CodeHashContainsFold applies the ContainsFold predicate on the "code_hash" field.

func CodeHashEQ

func CodeHashEQ(v string) predicate.RecoveryCode

CodeHashEQ applies the EQ predicate on the "code_hash" field.

func CodeHashEqualFold

func CodeHashEqualFold(v string) predicate.RecoveryCode

CodeHashEqualFold applies the EqualFold predicate on the "code_hash" field.

func CodeHashGT

func CodeHashGT(v string) predicate.RecoveryCode

CodeHashGT applies the GT predicate on the "code_hash" field.

func CodeHashGTE

func CodeHashGTE(v string) predicate.RecoveryCode

CodeHashGTE applies the GTE predicate on the "code_hash" field.

func CodeHashHasPrefix

func CodeHashHasPrefix(v string) predicate.RecoveryCode

CodeHashHasPrefix applies the HasPrefix predicate on the "code_hash" field.

func CodeHashHasSuffix

func CodeHashHasSuffix(v string) predicate.RecoveryCode

CodeHashHasSuffix applies the HasSuffix predicate on the "code_hash" field.

func CodeHashIn

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

CodeHashIn applies the In predicate on the "code_hash" field.

func CodeHashLT

func CodeHashLT(v string) predicate.RecoveryCode

CodeHashLT applies the LT predicate on the "code_hash" field.

func CodeHashLTE

func CodeHashLTE(v string) predicate.RecoveryCode

CodeHashLTE applies the LTE predicate on the "code_hash" field.

func CodeHashNEQ

func CodeHashNEQ(v string) predicate.RecoveryCode

CodeHashNEQ applies the NEQ predicate on the "code_hash" field.

func CodeHashNotIn

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

CodeHashNotIn applies the NotIn predicate on the "code_hash" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.RecoveryCode

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.RecoveryCode

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.RecoveryCode

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.RecoveryCode

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.RecoveryCode

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.RecoveryCode

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.RecoveryCode

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

func CreatedAtNotIn

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

CreatedAtNotIn applies the NotIn predicate on the "created_at" 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

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.RecoveryCode

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.RecoveryCode

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.RecoveryCode

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.RecoveryCode

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.RecoveryCode

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.RecoveryCode

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) 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 UpdatedAt

func UpdatedAt(v time.Time) predicate.RecoveryCode

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.RecoveryCode

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.RecoveryCode

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.RecoveryCode

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.RecoveryCode

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.RecoveryCode

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.RecoveryCode

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

func UpdatedAtNotIn

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

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

func UsedAt

func UsedAt(v time.Time) predicate.RecoveryCode

UsedAt applies equality check predicate on the "used_at" field. It's identical to UsedAtEQ.

func UsedAtEQ

func UsedAtEQ(v time.Time) predicate.RecoveryCode

UsedAtEQ applies the EQ predicate on the "used_at" field.

func UsedAtGT

func UsedAtGT(v time.Time) predicate.RecoveryCode

UsedAtGT applies the GT predicate on the "used_at" field.

func UsedAtGTE

func UsedAtGTE(v time.Time) predicate.RecoveryCode

UsedAtGTE applies the GTE predicate on the "used_at" field.

func UsedAtIn

func UsedAtIn(vs ...time.Time) predicate.RecoveryCode

UsedAtIn applies the In predicate on the "used_at" field.

func UsedAtIsNil

func UsedAtIsNil() predicate.RecoveryCode

UsedAtIsNil applies the IsNil predicate on the "used_at" field.

func UsedAtLT

func UsedAtLT(v time.Time) predicate.RecoveryCode

UsedAtLT applies the LT predicate on the "used_at" field.

func UsedAtLTE

func UsedAtLTE(v time.Time) predicate.RecoveryCode

UsedAtLTE applies the LTE predicate on the "used_at" field.

func UsedAtNEQ

func UsedAtNEQ(v time.Time) predicate.RecoveryCode

UsedAtNEQ applies the NEQ predicate on the "used_at" field.

func UsedAtNotIn

func UsedAtNotIn(vs ...time.Time) predicate.RecoveryCode

UsedAtNotIn applies the NotIn predicate on the "used_at" field.

func UsedAtNotNil

func UsedAtNotNil() predicate.RecoveryCode

UsedAtNotNil applies the NotNil predicate on the "used_at" field.

func UserID

func UserID(v int64) predicate.RecoveryCode

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int64) predicate.RecoveryCode

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int64) predicate.RecoveryCode

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int64) predicate.RecoveryCode

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int64) predicate.RecoveryCode

UserIDNotIn applies the NotIn predicate on the "user_id" 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 ByCodeHash

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

ByCodeHash orders the results by the code_hash field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUsedAt

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

ByUsedAt orders the results by the used_at field.

func ByUserField

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

ByUserField orders the results by user field.

func ByUserID

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

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

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