Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.ApiToken) predicate.ApiToken
- func CreatedAt(v time.Time) predicate.ApiToken
- func CreatedAtEQ(v time.Time) predicate.ApiToken
- func CreatedAtGT(v time.Time) predicate.ApiToken
- func CreatedAtGTE(v time.Time) predicate.ApiToken
- func CreatedAtIn(vs ...time.Time) predicate.ApiToken
- func CreatedAtLT(v time.Time) predicate.ApiToken
- func CreatedAtLTE(v time.Time) predicate.ApiToken
- func CreatedAtNEQ(v time.Time) predicate.ApiToken
- func CreatedAtNotIn(vs ...time.Time) predicate.ApiToken
- func ExpiresAt(v time.Time) predicate.ApiToken
- func ExpiresAtEQ(v time.Time) predicate.ApiToken
- func ExpiresAtGT(v time.Time) predicate.ApiToken
- func ExpiresAtGTE(v time.Time) predicate.ApiToken
- func ExpiresAtIn(vs ...time.Time) predicate.ApiToken
- func ExpiresAtIsNil() predicate.ApiToken
- func ExpiresAtLT(v time.Time) predicate.ApiToken
- func ExpiresAtLTE(v time.Time) predicate.ApiToken
- func ExpiresAtNEQ(v time.Time) predicate.ApiToken
- func ExpiresAtNotIn(vs ...time.Time) predicate.ApiToken
- func ExpiresAtNotNil() predicate.ApiToken
- func HasWorkspace() predicate.ApiToken
- func HasWorkspaceWith(preds ...predicate.Workspace) predicate.ApiToken
- func ID(id int64) predicate.ApiToken
- func IDEQ(id int64) predicate.ApiToken
- func IDGT(id int64) predicate.ApiToken
- func IDGTE(id int64) predicate.ApiToken
- func IDIn(ids ...int64) predicate.ApiToken
- func IDLT(id int64) predicate.ApiToken
- func IDLTE(id int64) predicate.ApiToken
- func IDNEQ(id int64) predicate.ApiToken
- func IDNotIn(ids ...int64) predicate.ApiToken
- func LastUsedAt(v time.Time) predicate.ApiToken
- func LastUsedAtEQ(v time.Time) predicate.ApiToken
- func LastUsedAtGT(v time.Time) predicate.ApiToken
- func LastUsedAtGTE(v time.Time) predicate.ApiToken
- func LastUsedAtIn(vs ...time.Time) predicate.ApiToken
- func LastUsedAtIsNil() predicate.ApiToken
- func LastUsedAtLT(v time.Time) predicate.ApiToken
- func LastUsedAtLTE(v time.Time) predicate.ApiToken
- func LastUsedAtNEQ(v time.Time) predicate.ApiToken
- func LastUsedAtNotIn(vs ...time.Time) predicate.ApiToken
- func LastUsedAtNotNil() predicate.ApiToken
- func Name(v string) predicate.ApiToken
- func NameContains(v string) predicate.ApiToken
- func NameContainsFold(v string) predicate.ApiToken
- func NameEQ(v string) predicate.ApiToken
- func NameEqualFold(v string) predicate.ApiToken
- func NameGT(v string) predicate.ApiToken
- func NameGTE(v string) predicate.ApiToken
- func NameHasPrefix(v string) predicate.ApiToken
- func NameHasSuffix(v string) predicate.ApiToken
- func NameIn(vs ...string) predicate.ApiToken
- func NameLT(v string) predicate.ApiToken
- func NameLTE(v string) predicate.ApiToken
- func NameNEQ(v string) predicate.ApiToken
- func NameNotIn(vs ...string) predicate.ApiToken
- func Not(p predicate.ApiToken) predicate.ApiToken
- func Or(predicates ...predicate.ApiToken) predicate.ApiToken
- func Prefix(v string) predicate.ApiToken
- func PrefixContains(v string) predicate.ApiToken
- func PrefixContainsFold(v string) predicate.ApiToken
- func PrefixEQ(v string) predicate.ApiToken
- func PrefixEqualFold(v string) predicate.ApiToken
- func PrefixGT(v string) predicate.ApiToken
- func PrefixGTE(v string) predicate.ApiToken
- func PrefixHasPrefix(v string) predicate.ApiToken
- func PrefixHasSuffix(v string) predicate.ApiToken
- func PrefixIn(vs ...string) predicate.ApiToken
- func PrefixLT(v string) predicate.ApiToken
- func PrefixLTE(v string) predicate.ApiToken
- func PrefixNEQ(v string) predicate.ApiToken
- func PrefixNotIn(vs ...string) predicate.ApiToken
- func RevokedAt(v time.Time) predicate.ApiToken
- func RevokedAtEQ(v time.Time) predicate.ApiToken
- func RevokedAtGT(v time.Time) predicate.ApiToken
- func RevokedAtGTE(v time.Time) predicate.ApiToken
- func RevokedAtIn(vs ...time.Time) predicate.ApiToken
- func RevokedAtIsNil() predicate.ApiToken
- func RevokedAtLT(v time.Time) predicate.ApiToken
- func RevokedAtLTE(v time.Time) predicate.ApiToken
- func RevokedAtNEQ(v time.Time) predicate.ApiToken
- func RevokedAtNotIn(vs ...time.Time) predicate.ApiToken
- func RevokedAtNotNil() predicate.ApiToken
- func SecretHash(v string) predicate.ApiToken
- func SecretHashContains(v string) predicate.ApiToken
- func SecretHashContainsFold(v string) predicate.ApiToken
- func SecretHashEQ(v string) predicate.ApiToken
- func SecretHashEqualFold(v string) predicate.ApiToken
- func SecretHashGT(v string) predicate.ApiToken
- func SecretHashGTE(v string) predicate.ApiToken
- func SecretHashHasPrefix(v string) predicate.ApiToken
- func SecretHashHasSuffix(v string) predicate.ApiToken
- func SecretHashIn(vs ...string) predicate.ApiToken
- func SecretHashLT(v string) predicate.ApiToken
- func SecretHashLTE(v string) predicate.ApiToken
- func SecretHashNEQ(v string) predicate.ApiToken
- func SecretHashNotIn(vs ...string) predicate.ApiToken
- func UpdatedAt(v time.Time) predicate.ApiToken
- func UpdatedAtEQ(v time.Time) predicate.ApiToken
- func UpdatedAtGT(v time.Time) predicate.ApiToken
- func UpdatedAtGTE(v time.Time) predicate.ApiToken
- func UpdatedAtIn(vs ...time.Time) predicate.ApiToken
- func UpdatedAtLT(v time.Time) predicate.ApiToken
- func UpdatedAtLTE(v time.Time) predicate.ApiToken
- func UpdatedAtNEQ(v time.Time) predicate.ApiToken
- func UpdatedAtNotIn(vs ...time.Time) predicate.ApiToken
- func ValidColumn(column string) bool
- func WorkspaceID(v int64) predicate.ApiToken
- func WorkspaceIDEQ(v int64) predicate.ApiToken
- func WorkspaceIDIn(vs ...int64) predicate.ApiToken
- func WorkspaceIDNEQ(v int64) predicate.ApiToken
- func WorkspaceIDNotIn(vs ...int64) predicate.ApiToken
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByLastUsedAt(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByPrefix(opts ...sql.OrderTermOption) OrderOption
- func ByRevokedAt(opts ...sql.OrderTermOption) OrderOption
- func BySecretHash(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByWorkspaceField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByWorkspaceID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the apitoken type in the database. Label = "api_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" // FieldWorkspaceID holds the string denoting the workspace_id field in the database. FieldWorkspaceID = "workspace_id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldPrefix holds the string denoting the prefix field in the database. FieldPrefix = "prefix" // FieldSecretHash holds the string denoting the secret_hash field in the database. FieldSecretHash = "secret_hash" // FieldScopes holds the string denoting the scopes field in the database. FieldScopes = "scopes" // FieldExpiresAt holds the string denoting the expires_at field in the database. FieldExpiresAt = "expires_at" // FieldRevokedAt holds the string denoting the revoked_at field in the database. FieldRevokedAt = "revoked_at" // FieldLastUsedAt holds the string denoting the last_used_at field in the database. FieldLastUsedAt = "last_used_at" // EdgeWorkspace holds the string denoting the workspace edge name in mutations. EdgeWorkspace = "workspace" // Table holds the table name of the apitoken in the database. Table = "api_tokens" // WorkspaceTable is the table that holds the workspace relation/edge. WorkspaceTable = "api_tokens" // WorkspaceInverseTable is the table name for the Workspace entity. // It exists in this package in order to avoid circular dependency with the "workspace" package. WorkspaceInverseTable = "workspaces" // WorkspaceColumn is the table column denoting the workspace relation/edge. WorkspaceColumn = "workspace_id" )
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 // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // PrefixValidator is a validator for the "prefix" field. It is called by the builders before save. PrefixValidator func(string) error // SecretHashValidator is a validator for the "secret_hash" field. It is called by the builders before save. SecretHashValidator func(string) error // DefaultScopes holds the default value on creation for the "scopes" field. DefaultScopes []string )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldWorkspaceID, FieldName, FieldPrefix, FieldSecretHash, FieldScopes, FieldExpiresAt, FieldRevokedAt, FieldLastUsedAt, }
Columns holds all SQL columns for apitoken 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 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 ExpiresAtIsNil ¶
ExpiresAtIsNil applies the IsNil 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 ExpiresAtNotNil ¶
ExpiresAtNotNil applies the NotNil predicate on the "expires_at" field.
func HasWorkspace ¶
HasWorkspace applies the HasEdge predicate on the "workspace" edge.
func HasWorkspaceWith ¶
HasWorkspaceWith applies the HasEdge predicate on the "workspace" edge with a given conditions (other predicates).
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 Prefix ¶
Prefix applies equality check predicate on the "prefix" field. It's identical to PrefixEQ.
func PrefixContains ¶
PrefixContains applies the Contains predicate on the "prefix" field.
func PrefixContainsFold ¶
PrefixContainsFold applies the ContainsFold predicate on the "prefix" field.
func PrefixEqualFold ¶
PrefixEqualFold applies the EqualFold predicate on the "prefix" field.
func PrefixHasPrefix ¶
PrefixHasPrefix applies the HasPrefix predicate on the "prefix" field.
func PrefixHasSuffix ¶
PrefixHasSuffix applies the HasSuffix predicate on the "prefix" field.
func PrefixNotIn ¶
PrefixNotIn applies the NotIn predicate on the "prefix" field.
func RevokedAt ¶
RevokedAt applies equality check predicate on the "revoked_at" field. It's identical to RevokedAtEQ.
func RevokedAtEQ ¶
RevokedAtEQ applies the EQ predicate on the "revoked_at" field.
func RevokedAtGT ¶
RevokedAtGT applies the GT predicate on the "revoked_at" field.
func RevokedAtGTE ¶
RevokedAtGTE applies the GTE predicate on the "revoked_at" field.
func RevokedAtIn ¶
RevokedAtIn applies the In predicate on the "revoked_at" field.
func RevokedAtIsNil ¶
RevokedAtIsNil applies the IsNil predicate on the "revoked_at" field.
func RevokedAtLT ¶
RevokedAtLT applies the LT predicate on the "revoked_at" field.
func RevokedAtLTE ¶
RevokedAtLTE applies the LTE predicate on the "revoked_at" field.
func RevokedAtNEQ ¶
RevokedAtNEQ applies the NEQ predicate on the "revoked_at" field.
func RevokedAtNotIn ¶
RevokedAtNotIn applies the NotIn predicate on the "revoked_at" field.
func RevokedAtNotNil ¶
RevokedAtNotNil applies the NotNil predicate on the "revoked_at" field.
func SecretHash ¶
SecretHash applies equality check predicate on the "secret_hash" field. It's identical to SecretHashEQ.
func SecretHashContains ¶
SecretHashContains applies the Contains predicate on the "secret_hash" field.
func SecretHashContainsFold ¶
SecretHashContainsFold applies the ContainsFold predicate on the "secret_hash" field.
func SecretHashEQ ¶
SecretHashEQ applies the EQ predicate on the "secret_hash" field.
func SecretHashEqualFold ¶
SecretHashEqualFold applies the EqualFold predicate on the "secret_hash" field.
func SecretHashGT ¶
SecretHashGT applies the GT predicate on the "secret_hash" field.
func SecretHashGTE ¶
SecretHashGTE applies the GTE predicate on the "secret_hash" field.
func SecretHashHasPrefix ¶
SecretHashHasPrefix applies the HasPrefix predicate on the "secret_hash" field.
func SecretHashHasSuffix ¶
SecretHashHasSuffix applies the HasSuffix predicate on the "secret_hash" field.
func SecretHashIn ¶
SecretHashIn applies the In predicate on the "secret_hash" field.
func SecretHashLT ¶
SecretHashLT applies the LT predicate on the "secret_hash" field.
func SecretHashLTE ¶
SecretHashLTE applies the LTE predicate on the "secret_hash" field.
func SecretHashNEQ ¶
SecretHashNEQ applies the NEQ predicate on the "secret_hash" field.
func SecretHashNotIn ¶
SecretHashNotIn applies the NotIn predicate on the "secret_hash" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func WorkspaceID ¶
WorkspaceID applies equality check predicate on the "workspace_id" field. It's identical to WorkspaceIDEQ.
func WorkspaceIDEQ ¶
WorkspaceIDEQ applies the EQ predicate on the "workspace_id" field.
func WorkspaceIDIn ¶
WorkspaceIDIn applies the In predicate on the "workspace_id" field.
func WorkspaceIDNEQ ¶
WorkspaceIDNEQ applies the NEQ predicate on the "workspace_id" field.
func WorkspaceIDNotIn ¶
WorkspaceIDNotIn applies the NotIn predicate on the "workspace_id" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the ApiToken queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at 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 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 ByPrefix ¶
func ByPrefix(opts ...sql.OrderTermOption) OrderOption
ByPrefix orders the results by the prefix field.
func ByRevokedAt ¶
func ByRevokedAt(opts ...sql.OrderTermOption) OrderOption
ByRevokedAt orders the results by the revoked_at field.
func BySecretHash ¶
func BySecretHash(opts ...sql.OrderTermOption) OrderOption
BySecretHash orders the results by the secret_hash field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByWorkspaceField ¶
func ByWorkspaceField(field string, opts ...sql.OrderTermOption) OrderOption
ByWorkspaceField orders the results by workspace field.
func ByWorkspaceID ¶
func ByWorkspaceID(opts ...sql.OrderTermOption) OrderOption
ByWorkspaceID orders the results by the workspace_id field.