Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.ApiKey) predicate.ApiKey
- func CreateTime(v time.Time) predicate.ApiKey
- func CreateTimeEQ(v time.Time) predicate.ApiKey
- func CreateTimeGT(v time.Time) predicate.ApiKey
- func CreateTimeGTE(v time.Time) predicate.ApiKey
- func CreateTimeIn(vs ...time.Time) predicate.ApiKey
- func CreateTimeLT(v time.Time) predicate.ApiKey
- func CreateTimeLTE(v time.Time) predicate.ApiKey
- func CreateTimeNEQ(v time.Time) predicate.ApiKey
- func CreateTimeNotIn(vs ...time.Time) predicate.ApiKey
- func HasOwner() predicate.ApiKey
- func HasOwnerWith(preds ...predicate.User) predicate.ApiKey
- func ID(id uint32) predicate.ApiKey
- func IDEQ(id uint32) predicate.ApiKey
- func IDGT(id uint32) predicate.ApiKey
- func IDGTE(id uint32) predicate.ApiKey
- func IDIn(ids ...uint32) predicate.ApiKey
- func IDLT(id uint32) predicate.ApiKey
- func IDLTE(id uint32) predicate.ApiKey
- func IDNEQ(id uint32) predicate.ApiKey
- func IDNotIn(ids ...uint32) predicate.ApiKey
- func KeyHash(v string) predicate.ApiKey
- func KeyHashContains(v string) predicate.ApiKey
- func KeyHashContainsFold(v string) predicate.ApiKey
- func KeyHashEQ(v string) predicate.ApiKey
- func KeyHashEqualFold(v string) predicate.ApiKey
- func KeyHashGT(v string) predicate.ApiKey
- func KeyHashGTE(v string) predicate.ApiKey
- func KeyHashHasPrefix(v string) predicate.ApiKey
- func KeyHashHasSuffix(v string) predicate.ApiKey
- func KeyHashIn(vs ...string) predicate.ApiKey
- func KeyHashLT(v string) predicate.ApiKey
- func KeyHashLTE(v string) predicate.ApiKey
- func KeyHashNEQ(v string) predicate.ApiKey
- func KeyHashNotIn(vs ...string) predicate.ApiKey
- func LastUsedAt(v time.Time) predicate.ApiKey
- func LastUsedAtEQ(v time.Time) predicate.ApiKey
- func LastUsedAtGT(v time.Time) predicate.ApiKey
- func LastUsedAtGTE(v time.Time) predicate.ApiKey
- func LastUsedAtIn(vs ...time.Time) predicate.ApiKey
- func LastUsedAtIsNil() predicate.ApiKey
- func LastUsedAtLT(v time.Time) predicate.ApiKey
- func LastUsedAtLTE(v time.Time) predicate.ApiKey
- func LastUsedAtNEQ(v time.Time) predicate.ApiKey
- func LastUsedAtNotIn(vs ...time.Time) predicate.ApiKey
- func LastUsedAtNotNil() predicate.ApiKey
- func Name(v string) predicate.ApiKey
- func NameContains(v string) predicate.ApiKey
- func NameContainsFold(v string) predicate.ApiKey
- func NameEQ(v string) predicate.ApiKey
- func NameEqualFold(v string) predicate.ApiKey
- func NameGT(v string) predicate.ApiKey
- func NameGTE(v string) predicate.ApiKey
- func NameHasPrefix(v string) predicate.ApiKey
- func NameHasSuffix(v string) predicate.ApiKey
- func NameIn(vs ...string) predicate.ApiKey
- func NameLT(v string) predicate.ApiKey
- func NameLTE(v string) predicate.ApiKey
- func NameNEQ(v string) predicate.ApiKey
- func NameNotIn(vs ...string) predicate.ApiKey
- func Not(p predicate.ApiKey) predicate.ApiKey
- func Or(predicates ...predicate.ApiKey) predicate.ApiKey
- func UpdateTime(v time.Time) predicate.ApiKey
- func UpdateTimeEQ(v time.Time) predicate.ApiKey
- func UpdateTimeGT(v time.Time) predicate.ApiKey
- func UpdateTimeGTE(v time.Time) predicate.ApiKey
- func UpdateTimeIn(vs ...time.Time) predicate.ApiKey
- func UpdateTimeLT(v time.Time) predicate.ApiKey
- func UpdateTimeLTE(v time.Time) predicate.ApiKey
- func UpdateTimeNEQ(v time.Time) predicate.ApiKey
- func UpdateTimeNotIn(vs ...time.Time) predicate.ApiKey
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKeyHash(opts ...sql.OrderTermOption) OrderOption
- func ByLastUsedAt(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the apikey type in the database. Label = "api_key" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreateTime holds the string denoting the create_time field in the database. FieldCreateTime = "create_time" // FieldUpdateTime holds the string denoting the update_time field in the database. FieldUpdateTime = "update_time" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldKeyHash holds the string denoting the key_hash field in the database. FieldKeyHash = "key_hash" // FieldLastUsedAt holds the string denoting the last_used_at field in the database. FieldLastUsedAt = "last_used_at" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // Table holds the table name of the apikey in the database. Table = "api_keys" // OwnerTable is the table that holds the owner relation/edge. OwnerTable = "api_keys" // OwnerInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. OwnerInverseTable = "users" // OwnerColumn is the table column denoting the owner relation/edge. OwnerColumn = "user_api_keys" )
Variables ¶
var ( // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time // DefaultUpdateTime holds the default value on creation for the "update_time" field. DefaultUpdateTime func() time.Time // UpdateDefaultUpdateTime holds the default value on update for the "update_time" field. UpdateDefaultUpdateTime func() time.Time // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // KeyHashValidator is a validator for the "key_hash" field. It is called by the builders before save. KeyHashValidator func(string) error )
var Columns = []string{ FieldID, FieldCreateTime, FieldUpdateTime, FieldName, FieldKeyHash, FieldLastUsedAt, }
Columns holds all SQL columns for apikey fields.
var ForeignKeys = []string{
"user_api_keys",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "api_keys" table and are not defined as standalone fields in the schema.
Functions ¶
func CreateTime ¶
CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTimeEQ ¶
CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeGT ¶
CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGTE ¶
CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeIn ¶
CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeLT ¶
CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLTE ¶
CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeNEQ ¶
CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNotIn ¶
CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func KeyHash ¶
KeyHash applies equality check predicate on the "key_hash" field. It's identical to KeyHashEQ.
func KeyHashContains ¶
KeyHashContains applies the Contains predicate on the "key_hash" field.
func KeyHashContainsFold ¶
KeyHashContainsFold applies the ContainsFold predicate on the "key_hash" field.
func KeyHashEqualFold ¶
KeyHashEqualFold applies the EqualFold predicate on the "key_hash" field.
func KeyHashGTE ¶
KeyHashGTE applies the GTE predicate on the "key_hash" field.
func KeyHashHasPrefix ¶
KeyHashHasPrefix applies the HasPrefix predicate on the "key_hash" field.
func KeyHashHasSuffix ¶
KeyHashHasSuffix applies the HasSuffix predicate on the "key_hash" field.
func KeyHashLTE ¶
KeyHashLTE applies the LTE predicate on the "key_hash" field.
func KeyHashNEQ ¶
KeyHashNEQ applies the NEQ predicate on the "key_hash" field.
func KeyHashNotIn ¶
KeyHashNotIn applies the NotIn predicate on the "key_hash" field.
func LastUsedAt ¶
LastUsedAt applies equality check predicate on the "last_used_at" field. It's identical to LastUsedAtEQ.
func LastUsedAtEQ ¶
LastUsedAtEQ applies the EQ predicate on the "last_used_at" field.
func LastUsedAtGT ¶
LastUsedAtGT applies the GT predicate on the "last_used_at" field.
func LastUsedAtGTE ¶
LastUsedAtGTE applies the GTE predicate on the "last_used_at" field.
func LastUsedAtIn ¶
LastUsedAtIn applies the In predicate on the "last_used_at" field.
func LastUsedAtIsNil ¶
LastUsedAtIsNil applies the IsNil predicate on the "last_used_at" field.
func LastUsedAtLT ¶
LastUsedAtLT applies the LT predicate on the "last_used_at" field.
func LastUsedAtLTE ¶
LastUsedAtLTE applies the LTE predicate on the "last_used_at" field.
func LastUsedAtNEQ ¶
LastUsedAtNEQ applies the NEQ predicate on the "last_used_at" field.
func LastUsedAtNotIn ¶
LastUsedAtNotIn applies the NotIn predicate on the "last_used_at" field.
func LastUsedAtNotNil ¶
LastUsedAtNotNil applies the NotNil predicate on the "last_used_at" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func UpdateTime ¶
UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTimeEQ ¶
UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeGT ¶
UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGTE ¶
UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeIn ¶
UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeLT ¶
UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLTE ¶
UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeNEQ ¶
UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNotIn ¶
UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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 ApiKey queries.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByKeyHash ¶
func ByKeyHash(opts ...sql.OrderTermOption) OrderOption
ByKeyHash orders the results by the key_hash field.
func ByLastUsedAt ¶
func ByLastUsedAt(opts ...sql.OrderTermOption) OrderOption
ByLastUsedAt orders the results by the last_used_at field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByOwnerField ¶
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
ByOwnerField orders the results by owner field.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time field.