Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.RecoveryCode) predicate.RecoveryCode
- func Code(v string) predicate.RecoveryCode
- func CodeContains(v string) predicate.RecoveryCode
- func CodeContainsFold(v string) predicate.RecoveryCode
- func CodeEQ(v string) predicate.RecoveryCode
- func CodeEqualFold(v string) predicate.RecoveryCode
- func CodeGT(v string) predicate.RecoveryCode
- func CodeGTE(v string) predicate.RecoveryCode
- func CodeHasPrefix(v string) predicate.RecoveryCode
- func CodeHasSuffix(v string) predicate.RecoveryCode
- func CodeIn(vs ...string) predicate.RecoveryCode
- func CodeLT(v string) predicate.RecoveryCode
- func CodeLTE(v string) predicate.RecoveryCode
- func CodeNEQ(v string) predicate.RecoveryCode
- func CodeNotIn(vs ...string) predicate.RecoveryCode
- func HasUser() predicate.RecoveryCode
- func HasUserWith(preds ...predicate.User) predicate.RecoveryCode
- func ID(id int) predicate.RecoveryCode
- func IDEQ(id int) predicate.RecoveryCode
- func IDGT(id int) predicate.RecoveryCode
- func IDGTE(id int) predicate.RecoveryCode
- func IDIn(ids ...int) predicate.RecoveryCode
- func IDLT(id int) predicate.RecoveryCode
- func IDLTE(id int) predicate.RecoveryCode
- func IDNEQ(id int) predicate.RecoveryCode
- func IDNotIn(ids ...int) predicate.RecoveryCode
- func Not(p predicate.RecoveryCode) predicate.RecoveryCode
- func Or(predicates ...predicate.RecoveryCode) predicate.RecoveryCode
- func Used(v bool) predicate.RecoveryCode
- func UsedEQ(v bool) predicate.RecoveryCode
- func UsedNEQ(v bool) predicate.RecoveryCode
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
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 ¶
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 )
var Columns = []string{ FieldID, FieldCode, FieldUsed, }
Columns holds all SQL columns for recoverycode fields.
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 ¶
func Code(v string) predicate.RecoveryCode
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 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 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 ¶
func Not(p predicate.RecoveryCode) predicate.RecoveryCode
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 ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.