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 HasUser() predicate.Token
- func HasUserWith(preds ...predicate.User) 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 LastUsed(v time.Time) predicate.Token
- func LastUsedEQ(v time.Time) predicate.Token
- func LastUsedGT(v time.Time) predicate.Token
- func LastUsedGTE(v time.Time) predicate.Token
- func LastUsedIn(vs ...time.Time) predicate.Token
- func LastUsedIsNil() predicate.Token
- func LastUsedLT(v time.Time) predicate.Token
- func LastUsedLTE(v time.Time) predicate.Token
- func LastUsedNEQ(v time.Time) predicate.Token
- func LastUsedNotIn(vs ...time.Time) predicate.Token
- func LastUsedNotNil() 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 PermissionsEQ(v Permissions) predicate.Token
- func PermissionsIn(vs ...Permissions) predicate.Token
- func PermissionsNEQ(v Permissions) predicate.Token
- func PermissionsNotIn(vs ...Permissions) predicate.Token
- func PermissionsValidator(pe Permissions) error
- func Secret(v string) predicate.Token
- func SecretContains(v string) predicate.Token
- func SecretContainsFold(v string) predicate.Token
- func SecretEQ(v string) predicate.Token
- func SecretEqualFold(v string) predicate.Token
- func SecretGT(v string) predicate.Token
- func SecretGTE(v string) predicate.Token
- func SecretHasPrefix(v string) predicate.Token
- func SecretHasSuffix(v string) predicate.Token
- func SecretIn(vs ...string) predicate.Token
- func SecretLT(v string) predicate.Token
- func SecretLTE(v string) predicate.Token
- func SecretNEQ(v string) predicate.Token
- func SecretNotIn(vs ...string) predicate.Token
- type Permissions
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" // FieldName holds the string denoting the name vertex property in the database. FieldName = "name" // FieldSecret holds the string denoting the secret vertex property in the database. FieldSecret = "secret" // FieldPermissions holds the string denoting the permissions vertex property in the database. FieldPermissions = "permissions" // FieldCreatedAt holds the string denoting the created_at vertex property in the database. FieldCreatedAt = "created_at" // FieldLastUsed holds the string denoting the last_used vertex property in the database. FieldLastUsed = "last_used" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // Table holds the table name of the token in the database. Table = "tokens" // UserTable is the table the holds the user relation/edge. UserTable = "tokens" // 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_tokens" )
const DefaultPermissions = PermissionsReadWrite
PermissionsReadWrite is the default Permissions.
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // SecretValidator is a validator for the "secret" field. It is called by the builders before save. SecretValidator func(string) error // DefaultCreatedAt holds the default value on creation for the created_at field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldName, FieldSecret, FieldPermissions, FieldCreatedAt, FieldLastUsed, }
Columns holds all SQL columns for token fields.
var ForeignKeys = []string{
"user_tokens",
}
ForeignKeys holds the SQL foreign-keys that are owned by the Token type.
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 HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func LastUsed ¶
LastUsed applies equality check predicate on the "last_used" field. It's identical to LastUsedEQ.
func LastUsedEQ ¶
LastUsedEQ applies the EQ predicate on the "last_used" field.
func LastUsedGT ¶
LastUsedGT applies the GT predicate on the "last_used" field.
func LastUsedGTE ¶
LastUsedGTE applies the GTE predicate on the "last_used" field.
func LastUsedIn ¶
LastUsedIn applies the In predicate on the "last_used" field.
func LastUsedIsNil ¶
LastUsedIsNil applies the IsNil predicate on the "last_used" field.
func LastUsedLT ¶
LastUsedLT applies the LT predicate on the "last_used" field.
func LastUsedLTE ¶
LastUsedLTE applies the LTE predicate on the "last_used" field.
func LastUsedNEQ ¶
LastUsedNEQ applies the NEQ predicate on the "last_used" field.
func LastUsedNotIn ¶
LastUsedNotIn applies the NotIn predicate on the "last_used" field.
func LastUsedNotNil ¶
LastUsedNotNil applies the NotNil predicate on the "last_used" 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 PermissionsEQ ¶
func PermissionsEQ(v Permissions) predicate.Token
PermissionsEQ applies the EQ predicate on the "permissions" field.
func PermissionsIn ¶
func PermissionsIn(vs ...Permissions) predicate.Token
PermissionsIn applies the In predicate on the "permissions" field.
func PermissionsNEQ ¶
func PermissionsNEQ(v Permissions) predicate.Token
PermissionsNEQ applies the NEQ predicate on the "permissions" field.
func PermissionsNotIn ¶
func PermissionsNotIn(vs ...Permissions) predicate.Token
PermissionsNotIn applies the NotIn predicate on the "permissions" field.
func PermissionsValidator ¶
func PermissionsValidator(pe Permissions) error
PermissionsValidator is a validator for the "pe" field enum values. It is called by the builders before save.
func Secret ¶
Secret applies equality check predicate on the "secret" field. It's identical to SecretEQ.
func SecretContains ¶
SecretContains applies the Contains predicate on the "secret" field.
func SecretContainsFold ¶
SecretContainsFold applies the ContainsFold predicate on the "secret" field.
func SecretEqualFold ¶
SecretEqualFold applies the EqualFold predicate on the "secret" field.
func SecretHasPrefix ¶
SecretHasPrefix applies the HasPrefix predicate on the "secret" field.
func SecretHasSuffix ¶
SecretHasSuffix applies the HasSuffix predicate on the "secret" field.
func SecretNotIn ¶
SecretNotIn applies the NotIn predicate on the "secret" field.
Types ¶
type Permissions ¶
type Permissions string
Permissions defines the type for the permissions enum field.
const ( PermissionsRead Permissions = "Read" PermissionsWrite Permissions = "Write" PermissionsReadWrite Permissions = "ReadWrite" )
Permissions values.
func (Permissions) String ¶
func (s Permissions) String() string