Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Token) predicate.Token
- func CreateTime(v time.Time) predicate.Token
- func CreateTimeEQ(v time.Time) predicate.Token
- func CreateTimeGT(v time.Time) predicate.Token
- func CreateTimeGTE(v time.Time) predicate.Token
- func CreateTimeIn(vs ...time.Time) predicate.Token
- func CreateTimeLT(v time.Time) predicate.Token
- func CreateTimeLTE(v time.Time) predicate.Token
- func CreateTimeNEQ(v time.Time) predicate.Token
- func CreateTimeNotIn(vs ...time.Time) predicate.Token
- func Description(v string) predicate.Token
- func DescriptionContains(v string) predicate.Token
- func DescriptionContainsFold(v string) predicate.Token
- func DescriptionEQ(v string) predicate.Token
- func DescriptionEqualFold(v string) predicate.Token
- func DescriptionGT(v string) predicate.Token
- func DescriptionGTE(v string) predicate.Token
- func DescriptionHasPrefix(v string) predicate.Token
- func DescriptionHasSuffix(v string) predicate.Token
- func DescriptionIn(vs ...string) predicate.Token
- func DescriptionIsNil() predicate.Token
- func DescriptionLT(v string) predicate.Token
- func DescriptionLTE(v string) predicate.Token
- func DescriptionNEQ(v string) predicate.Token
- func DescriptionNotIn(vs ...string) predicate.Token
- func DescriptionNotNil() predicate.Token
- func ExpiresAt(v time.Time) predicate.Token
- func ExpiresAtEQ(v time.Time) predicate.Token
- func ExpiresAtGT(v time.Time) predicate.Token
- func ExpiresAtGTE(v time.Time) predicate.Token
- func ExpiresAtIn(vs ...time.Time) predicate.Token
- func ExpiresAtLT(v time.Time) predicate.Token
- func ExpiresAtLTE(v time.Time) predicate.Token
- func ExpiresAtNEQ(v time.Time) predicate.Token
- func ExpiresAtNotIn(vs ...time.Time) predicate.Token
- func ID(id uuid.UUID) predicate.Token
- func IDEQ(id uuid.UUID) predicate.Token
- func IDGT(id uuid.UUID) predicate.Token
- func IDGTE(id uuid.UUID) predicate.Token
- func IDIn(ids ...uuid.UUID) predicate.Token
- func IDLT(id uuid.UUID) predicate.Token
- func IDLTE(id uuid.UUID) predicate.Token
- func IDNEQ(id uuid.UUID) predicate.Token
- func IDNotIn(ids ...uuid.UUID) predicate.Token
- func Name(v string) predicate.Token
- func NameContains(v string) predicate.Token
- func NameContainsFold(v string) predicate.Token
- func NameEQ(v string) predicate.Token
- func NameEqualFold(v string) predicate.Token
- func NameGT(v string) predicate.Token
- func NameGTE(v string) predicate.Token
- func NameHasPrefix(v string) predicate.Token
- func NameHasSuffix(v string) predicate.Token
- func NameIn(vs ...string) predicate.Token
- func NameLT(v string) predicate.Token
- func NameLTE(v string) predicate.Token
- func NameNEQ(v string) predicate.Token
- func NameNotIn(vs ...string) predicate.Token
- func Not(p predicate.Token) predicate.Token
- func Or(predicates ...predicate.Token) predicate.Token
- func TokenHash(v []byte) predicate.Token
- func TokenHashEQ(v []byte) predicate.Token
- func TokenHashGT(v []byte) predicate.Token
- func TokenHashGTE(v []byte) predicate.Token
- func TokenHashIn(vs ...[]byte) predicate.Token
- func TokenHashLT(v []byte) predicate.Token
- func TokenHashLTE(v []byte) predicate.Token
- func TokenHashNEQ(v []byte) predicate.Token
- func TokenHashNotIn(vs ...[]byte) predicate.Token
- func TypeEQ(v types.TokenType) predicate.Token
- func TypeIn(vs ...types.TokenType) predicate.Token
- func TypeNEQ(v types.TokenType) predicate.Token
- func TypeNotIn(vs ...types.TokenType) predicate.Token
- func TypeValidator(_type types.TokenType) error
- func UpdateTime(v time.Time) predicate.Token
- func UpdateTimeEQ(v time.Time) predicate.Token
- func UpdateTimeGT(v time.Time) predicate.Token
- func UpdateTimeGTE(v time.Time) predicate.Token
- func UpdateTimeIn(vs ...time.Time) predicate.Token
- func UpdateTimeLT(v time.Time) predicate.Token
- func UpdateTimeLTE(v time.Time) predicate.Token
- func UpdateTimeNEQ(v time.Time) predicate.Token
- func UpdateTimeNotIn(vs ...time.Time) predicate.Token
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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" // 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" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldTokenHash holds the string denoting the token_hash field in the database. FieldTokenHash = "token_hash" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // FieldExpiresAt holds the string denoting the expires_at field in the database. FieldExpiresAt = "expires_at" // Table holds the table name of the token in the database. Table = "tokens" )
const DefaultType types.TokenType = "api_token"
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 // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreateTime, FieldUpdateTime, FieldName, FieldType, FieldTokenHash, FieldDescription, FieldExpiresAt, }
Columns holds all SQL columns for token fields.
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 Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionIsNil ¶
DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotNil ¶
DescriptionNotNil applies the NotNil predicate on the "description" field.
func ExpiresAt ¶
ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.
func ExpiresAtEQ ¶
ExpiresAtEQ applies the EQ predicate on the "expires_at" field.
func ExpiresAtGT ¶
ExpiresAtGT applies the GT predicate on the "expires_at" field.
func ExpiresAtGTE ¶
ExpiresAtGTE applies the GTE predicate on the "expires_at" field.
func ExpiresAtIn ¶
ExpiresAtIn applies the In predicate on the "expires_at" field.
func ExpiresAtLT ¶
ExpiresAtLT applies the LT predicate on the "expires_at" field.
func ExpiresAtLTE ¶
ExpiresAtLTE applies the LTE predicate on the "expires_at" field.
func ExpiresAtNEQ ¶
ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.
func ExpiresAtNotIn ¶
ExpiresAtNotIn applies the NotIn predicate on the "expires_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 TokenHash ¶
TokenHash applies equality check predicate on the "token_hash" field. It's identical to TokenHashEQ.
func TokenHashEQ ¶
TokenHashEQ applies the EQ predicate on the "token_hash" field.
func TokenHashGT ¶
TokenHashGT applies the GT predicate on the "token_hash" field.
func TokenHashGTE ¶
TokenHashGTE applies the GTE predicate on the "token_hash" field.
func TokenHashIn ¶
TokenHashIn applies the In predicate on the "token_hash" field.
func TokenHashLT ¶
TokenHashLT applies the LT predicate on the "token_hash" field.
func TokenHashLTE ¶
TokenHashLTE applies the LTE predicate on the "token_hash" field.
func TokenHashNEQ ¶
TokenHashNEQ applies the NEQ predicate on the "token_hash" field.
func TokenHashNotIn ¶
TokenHashNotIn applies the NotIn predicate on the "token_hash" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
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 Token queries.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByDescription ¶
func ByDescription(opts ...sql.OrderTermOption) OrderOption
ByDescription orders the results by the description field.
func ByExpiresAt ¶
func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
ByExpiresAt orders the results by the expires_at field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time field.