Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Token) predicate.Token
- func CreatedAt(v time.Time) predicate.Token
- func CreatedAtEQ(v time.Time) predicate.Token
- func CreatedAtGT(v time.Time) predicate.Token
- func CreatedAtGTE(v time.Time) predicate.Token
- func CreatedAtIn(vs ...time.Time) predicate.Token
- func CreatedAtLT(v time.Time) predicate.Token
- func CreatedAtLTE(v time.Time) predicate.Token
- func CreatedAtNEQ(v time.Time) predicate.Token
- func CreatedAtNotIn(vs ...time.Time) predicate.Token
- func Hash(v []byte) predicate.Token
- func HashEQ(v []byte) predicate.Token
- func HashGT(v []byte) predicate.Token
- func HashGTE(v []byte) predicate.Token
- func HashIn(vs ...[]byte) predicate.Token
- func HashLT(v []byte) predicate.Token
- func HashLTE(v []byte) predicate.Token
- func HashNEQ(v []byte) predicate.Token
- func HashNotIn(vs ...[]byte) predicate.Token
- func HeadersIsNil() predicate.Token
- func HeadersNotNil() predicate.Token
- func Host(v string) predicate.Token
- func HostContains(v string) predicate.Token
- func HostContainsFold(v string) predicate.Token
- func HostEQ(v string) predicate.Token
- func HostEqualFold(v string) predicate.Token
- func HostGT(v string) predicate.Token
- func HostGTE(v string) predicate.Token
- func HostHasPrefix(v string) predicate.Token
- func HostHasSuffix(v string) predicate.Token
- func HostIn(vs ...string) predicate.Token
- func HostLT(v string) predicate.Token
- func HostLTE(v string) predicate.Token
- func HostNEQ(v string) predicate.Token
- func HostNotIn(vs ...string) predicate.Token
- func ID(id int) predicate.Token
- func IDEQ(id int) predicate.Token
- func IDGT(id int) predicate.Token
- func IDGTE(id int) predicate.Token
- func IDIn(ids ...int) predicate.Token
- func IDLT(id int) predicate.Token
- func IDLTE(id int) predicate.Token
- func IDNEQ(id int) predicate.Token
- func IDNotIn(ids ...int) predicate.Token
- func KeyID(v *types.KeyID) predicate.Token
- func KeyIDContains(v *types.KeyID) predicate.Token
- func KeyIDContainsFold(v *types.KeyID) predicate.Token
- func KeyIDEQ(v *types.KeyID) predicate.Token
- func KeyIDEqualFold(v *types.KeyID) predicate.Token
- func KeyIDGT(v *types.KeyID) predicate.Token
- func KeyIDGTE(v *types.KeyID) predicate.Token
- func KeyIDHasPrefix(v *types.KeyID) predicate.Token
- func KeyIDHasSuffix(v *types.KeyID) predicate.Token
- func KeyIDIn(vs ...*types.KeyID) predicate.Token
- func KeyIDLT(v *types.KeyID) predicate.Token
- func KeyIDLTE(v *types.KeyID) predicate.Token
- func KeyIDNEQ(v *types.KeyID) predicate.Token
- func KeyIDNotIn(vs ...*types.KeyID) predicate.Token
- func LabelContains(v string) predicate.Token
- func LabelContainsFold(v string) predicate.Token
- func LabelEQ(v string) predicate.Token
- func LabelEqualFold(v string) predicate.Token
- func LabelGT(v string) predicate.Token
- func LabelGTE(v string) predicate.Token
- func LabelHasPrefix(v string) predicate.Token
- func LabelHasSuffix(v string) predicate.Token
- func LabelIn(vs ...string) predicate.Token
- func LabelLT(v string) predicate.Token
- func LabelLTE(v string) predicate.Token
- func LabelNEQ(v string) predicate.Token
- func LabelNotIn(vs ...string) predicate.Token
- func LastAccessAt(v time.Time) predicate.Token
- func LastAccessAtEQ(v time.Time) predicate.Token
- func LastAccessAtGT(v time.Time) predicate.Token
- func LastAccessAtGTE(v time.Time) predicate.Token
- func LastAccessAtIn(vs ...time.Time) predicate.Token
- func LastAccessAtLT(v time.Time) predicate.Token
- func LastAccessAtLTE(v time.Time) predicate.Token
- func LastAccessAtNEQ(v time.Time) predicate.Token
- func LastAccessAtNotIn(vs ...time.Time) predicate.Token
- func Not(p predicate.Token) predicate.Token
- func Or(predicates ...predicate.Token) predicate.Token
- func Path(v string) predicate.Token
- func PathContains(v string) predicate.Token
- func PathContainsFold(v string) predicate.Token
- func PathEQ(v string) predicate.Token
- func PathEqualFold(v string) predicate.Token
- func PathGT(v string) predicate.Token
- func PathGTE(v string) predicate.Token
- func PathHasPrefix(v string) predicate.Token
- func PathHasSuffix(v string) predicate.Token
- func PathIn(vs ...string) predicate.Token
- func PathLT(v string) predicate.Token
- func PathLTE(v string) predicate.Token
- func PathNEQ(v string) predicate.Token
- func PathNotIn(vs ...string) predicate.Token
- func Requests(v int64) predicate.Token
- func RequestsEQ(v int64) predicate.Token
- func RequestsGT(v int64) predicate.Token
- func RequestsGTE(v int64) predicate.Token
- func RequestsIn(vs ...int64) predicate.Token
- func RequestsLT(v int64) predicate.Token
- func RequestsLTE(v int64) predicate.Token
- func RequestsNEQ(v int64) predicate.Token
- func RequestsNotIn(vs ...int64) predicate.Token
- func UpdatedAt(v time.Time) predicate.Token
- func UpdatedAtEQ(v time.Time) predicate.Token
- func UpdatedAtGT(v time.Time) predicate.Token
- func UpdatedAtGTE(v time.Time) predicate.Token
- func UpdatedAtIn(vs ...time.Time) predicate.Token
- func UpdatedAtLT(v time.Time) predicate.Token
- func UpdatedAtLTE(v time.Time) predicate.Token
- func UpdatedAtNEQ(v time.Time) predicate.Token
- func UpdatedAtNotIn(vs ...time.Time) predicate.Token
- func User(v string) predicate.Token
- func UserContains(v string) predicate.Token
- func UserContainsFold(v string) predicate.Token
- func UserEQ(v string) predicate.Token
- func UserEqualFold(v string) predicate.Token
- func UserGT(v string) predicate.Token
- func UserGTE(v string) predicate.Token
- func UserHasPrefix(v string) predicate.Token
- func UserHasSuffix(v string) predicate.Token
- func UserIn(vs ...string) predicate.Token
- func UserLT(v string) predicate.Token
- func UserLTE(v string) predicate.Token
- func UserNEQ(v string) predicate.Token
- func UserNotIn(vs ...string) predicate.Token
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByHost(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKeyID(opts ...sql.OrderTermOption) OrderOption
- func ByLabel(opts ...sql.OrderTermOption) OrderOption
- func ByLastAccessAt(opts ...sql.OrderTermOption) OrderOption
- func ByPath(opts ...sql.OrderTermOption) OrderOption
- func ByRequests(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUser(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" // 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" // FieldKeyID holds the string denoting the key_id field in the database. FieldKeyID = "key_id" // FieldHash holds the string denoting the hash field in the database. FieldHash = "hash" // FieldUser holds the string denoting the user field in the database. FieldUser = "user" // FieldLabel holds the string denoting the label field in the database. FieldLabel = "label" // FieldPath holds the string denoting the path field in the database. FieldPath = "path" // FieldHost holds the string denoting the host field in the database. FieldHost = "host" // FieldHeaders holds the string denoting the headers field in the database. FieldHeaders = "headers" // FieldRequests holds the string denoting the requests field in the database. FieldRequests = "requests" // FieldLastAccessAt holds the string denoting the last_access_at field in the database. FieldLastAccessAt = "last_access_at" // Table holds the table name of the token in the database. Table = "token" )
Variables ¶
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 // HashValidator is a validator for the "hash" field. It is called by the builders before save. HashValidator func([]byte) error // DefaultLabel holds the default value on creation for the "label" field. DefaultLabel string // DefaultPath holds the default value on creation for the "path" field. DefaultPath string // DefaultHost holds the default value on creation for the "host" field. DefaultHost string // DefaultRequests holds the default value on creation for the "requests" field. DefaultRequests int64 // DefaultLastAccessAt holds the default value on creation for the "last_access_at" field. DefaultLastAccessAt func() time.Time // ValueScanner of all Token fields. ValueScanner struct { KeyID field.TypeValueScanner[*types.KeyID] } )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldKeyID, FieldHash, FieldUser, FieldLabel, FieldPath, FieldHost, FieldHeaders, FieldRequests, FieldLastAccessAt, }
Columns holds all SQL columns for token fields.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HeadersIsNil ¶
HeadersIsNil applies the IsNil predicate on the "headers" field.
func HeadersNotNil ¶
HeadersNotNil applies the NotNil predicate on the "headers" field.
func HostContains ¶
HostContains applies the Contains predicate on the "host" field.
func HostContainsFold ¶
HostContainsFold applies the ContainsFold predicate on the "host" field.
func HostEqualFold ¶
HostEqualFold applies the EqualFold predicate on the "host" field.
func HostHasPrefix ¶
HostHasPrefix applies the HasPrefix predicate on the "host" field.
func HostHasSuffix ¶
HostHasSuffix applies the HasSuffix predicate on the "host" field.
func KeyID ¶
KeyID applies equality check predicate on the "key_id" field. It's identical to KeyIDEQ.
func KeyIDContains ¶
KeyIDContains applies the Contains predicate on the "key_id" field.
func KeyIDContainsFold ¶
KeyIDContainsFold applies the ContainsFold predicate on the "key_id" field.
func KeyIDEqualFold ¶
KeyIDEqualFold applies the EqualFold predicate on the "key_id" field.
func KeyIDHasPrefix ¶
KeyIDHasPrefix applies the HasPrefix predicate on the "key_id" field.
func KeyIDHasSuffix ¶
KeyIDHasSuffix applies the HasSuffix predicate on the "key_id" field.
func KeyIDNotIn ¶
KeyIDNotIn applies the NotIn predicate on the "key_id" field.
func LabelContains ¶
LabelContains applies the Contains predicate on the "label" field.
func LabelContainsFold ¶
LabelContainsFold applies the ContainsFold predicate on the "label" field.
func LabelEqualFold ¶
LabelEqualFold applies the EqualFold predicate on the "label" field.
func LabelHasPrefix ¶
LabelHasPrefix applies the HasPrefix predicate on the "label" field.
func LabelHasSuffix ¶
LabelHasSuffix applies the HasSuffix predicate on the "label" field.
func LabelNotIn ¶
LabelNotIn applies the NotIn predicate on the "label" field.
func LastAccessAt ¶
LastAccessAt applies equality check predicate on the "last_access_at" field. It's identical to LastAccessAtEQ.
func LastAccessAtEQ ¶
LastAccessAtEQ applies the EQ predicate on the "last_access_at" field.
func LastAccessAtGT ¶
LastAccessAtGT applies the GT predicate on the "last_access_at" field.
func LastAccessAtGTE ¶
LastAccessAtGTE applies the GTE predicate on the "last_access_at" field.
func LastAccessAtIn ¶
LastAccessAtIn applies the In predicate on the "last_access_at" field.
func LastAccessAtLT ¶
LastAccessAtLT applies the LT predicate on the "last_access_at" field.
func LastAccessAtLTE ¶
LastAccessAtLTE applies the LTE predicate on the "last_access_at" field.
func LastAccessAtNEQ ¶
LastAccessAtNEQ applies the NEQ predicate on the "last_access_at" field.
func LastAccessAtNotIn ¶
LastAccessAtNotIn applies the NotIn predicate on the "last_access_at" field.
func PathContains ¶
PathContains applies the Contains predicate on the "path" field.
func PathContainsFold ¶
PathContainsFold applies the ContainsFold predicate on the "path" field.
func PathEqualFold ¶
PathEqualFold applies the EqualFold predicate on the "path" field.
func PathHasPrefix ¶
PathHasPrefix applies the HasPrefix predicate on the "path" field.
func PathHasSuffix ¶
PathHasSuffix applies the HasSuffix predicate on the "path" field.
func Requests ¶
Requests applies equality check predicate on the "requests" field. It's identical to RequestsEQ.
func RequestsEQ ¶
RequestsEQ applies the EQ predicate on the "requests" field.
func RequestsGT ¶
RequestsGT applies the GT predicate on the "requests" field.
func RequestsGTE ¶
RequestsGTE applies the GTE predicate on the "requests" field.
func RequestsIn ¶
RequestsIn applies the In predicate on the "requests" field.
func RequestsLT ¶
RequestsLT applies the LT predicate on the "requests" field.
func RequestsLTE ¶
RequestsLTE applies the LTE predicate on the "requests" field.
func RequestsNEQ ¶
RequestsNEQ applies the NEQ predicate on the "requests" field.
func RequestsNotIn ¶
RequestsNotIn applies the NotIn predicate on the "requests" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UserContains ¶
UserContains applies the Contains predicate on the "user" field.
func UserContainsFold ¶
UserContainsFold applies the ContainsFold predicate on the "user" field.
func UserEqualFold ¶
UserEqualFold applies the EqualFold predicate on the "user" field.
func UserHasPrefix ¶
UserHasPrefix applies the HasPrefix predicate on the "user" field.
func UserHasSuffix ¶
UserHasSuffix applies the HasSuffix predicate on the "user" 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 ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByHost ¶
func ByHost(opts ...sql.OrderTermOption) OrderOption
ByHost orders the results by the host field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByKeyID ¶
func ByKeyID(opts ...sql.OrderTermOption) OrderOption
ByKeyID orders the results by the key_id field.
func ByLabel ¶
func ByLabel(opts ...sql.OrderTermOption) OrderOption
ByLabel orders the results by the label field.
func ByLastAccessAt ¶
func ByLastAccessAt(opts ...sql.OrderTermOption) OrderOption
ByLastAccessAt orders the results by the last_access_at field.
func ByPath ¶
func ByPath(opts ...sql.OrderTermOption) OrderOption
ByPath orders the results by the path field.
func ByRequests ¶
func ByRequests(opts ...sql.OrderTermOption) OrderOption
ByRequests orders the results by the requests field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUser ¶
func ByUser(opts ...sql.OrderTermOption) OrderOption
ByUser orders the results by the user field.