Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Key) predicate.Key
- func CreatedAt(v time.Time) predicate.Key
- func CreatedAtEQ(v time.Time) predicate.Key
- func CreatedAtGT(v time.Time) predicate.Key
- func CreatedAtGTE(v time.Time) predicate.Key
- func CreatedAtIn(vs ...time.Time) predicate.Key
- func CreatedAtLT(v time.Time) predicate.Key
- func CreatedAtLTE(v time.Time) predicate.Key
- func CreatedAtNEQ(v time.Time) predicate.Key
- func CreatedAtNotIn(vs ...time.Time) predicate.Key
- func HasSecrets() predicate.Key
- func HasSecretsWith(preds ...predicate.Secret) predicate.Key
- func ID(id uuid.UUID) predicate.Key
- func IDEQ(id uuid.UUID) predicate.Key
- func IDGT(id uuid.UUID) predicate.Key
- func IDGTE(id uuid.UUID) predicate.Key
- func IDIn(ids ...uuid.UUID) predicate.Key
- func IDLT(id uuid.UUID) predicate.Key
- func IDLTE(id uuid.UUID) predicate.Key
- func IDNEQ(id uuid.UUID) predicate.Key
- func IDNotIn(ids ...uuid.UUID) predicate.Key
- func LastUsedAt(v time.Time) predicate.Key
- func LastUsedAtEQ(v time.Time) predicate.Key
- func LastUsedAtGT(v time.Time) predicate.Key
- func LastUsedAtGTE(v time.Time) predicate.Key
- func LastUsedAtIn(vs ...time.Time) predicate.Key
- func LastUsedAtIsNil() predicate.Key
- func LastUsedAtLT(v time.Time) predicate.Key
- func LastUsedAtLTE(v time.Time) predicate.Key
- func LastUsedAtNEQ(v time.Time) predicate.Key
- func LastUsedAtNotIn(vs ...time.Time) predicate.Key
- func LastUsedAtNotNil() predicate.Key
- func Name(v string) predicate.Key
- func NameContains(v string) predicate.Key
- func NameContainsFold(v string) predicate.Key
- func NameEQ(v string) predicate.Key
- func NameEqualFold(v string) predicate.Key
- func NameGT(v string) predicate.Key
- func NameGTE(v string) predicate.Key
- func NameHasPrefix(v string) predicate.Key
- func NameHasSuffix(v string) predicate.Key
- func NameIn(vs ...string) predicate.Key
- func NameLT(v string) predicate.Key
- func NameLTE(v string) predicate.Key
- func NameNEQ(v string) predicate.Key
- func NameNotIn(vs ...string) predicate.Key
- func Not(p predicate.Key) predicate.Key
- func Or(predicates ...predicate.Key) predicate.Key
- func RemoteKeyID(v string) predicate.Key
- func RemoteKeyIDContains(v string) predicate.Key
- func RemoteKeyIDContainsFold(v string) predicate.Key
- func RemoteKeyIDEQ(v string) predicate.Key
- func RemoteKeyIDEqualFold(v string) predicate.Key
- func RemoteKeyIDGT(v string) predicate.Key
- func RemoteKeyIDGTE(v string) predicate.Key
- func RemoteKeyIDHasPrefix(v string) predicate.Key
- func RemoteKeyIDHasSuffix(v string) predicate.Key
- func RemoteKeyIDIn(vs ...string) predicate.Key
- func RemoteKeyIDLT(v string) predicate.Key
- func RemoteKeyIDLTE(v string) predicate.Key
- func RemoteKeyIDNEQ(v string) predicate.Key
- func RemoteKeyIDNotIn(vs ...string) predicate.Key
- func TypeEQ(v Type) predicate.Key
- func TypeIn(vs ...Type) predicate.Key
- func TypeNEQ(v Type) predicate.Key
- func TypeNotIn(vs ...Type) predicate.Key
- func TypeValidator(_type Type) error
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByLastUsedAt(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRemoteKeyID(opts ...sql.OrderTermOption) OrderOption
- func BySecrets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySecretsCount(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- type Type
Constants ¶
const ( // Label holds the string label denoting the key type in the database. Label = "key" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldRemoteKeyID holds the string denoting the remote_key_id field in the database. FieldRemoteKeyID = "remote_key_id" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldLastUsedAt holds the string denoting the last_used_at field in the database. FieldLastUsedAt = "last_used_at" // EdgeSecrets holds the string denoting the secrets edge name in mutations. EdgeSecrets = "secrets" // Table holds the table name of the key in the database. Table = "keys" // SecretsTable is the table that holds the secrets relation/edge. SecretsTable = "secrets" // SecretsInverseTable is the table name for the Secret entity. // It exists in this package in order to avoid circular dependency with the "secret" package. SecretsInverseTable = "secrets" // SecretsColumn is the table column denoting the secrets relation/edge. SecretsColumn = "key_secrets" )
const DefaultType = TypeEncryption
TypeEncryption is the default value of the Type enum.
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // RemoteKeyIDValidator is a validator for the "remote_key_id" field. It is called by the builders before save. RemoteKeyIDValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldName, FieldRemoteKeyID, FieldType, FieldCreatedAt, FieldLastUsedAt, }
Columns holds all SQL columns for key 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 HasSecrets ¶
HasSecrets applies the HasEdge predicate on the "secrets" edge.
func HasSecretsWith ¶
HasSecretsWith applies the HasEdge predicate on the "secrets" 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 RemoteKeyID ¶
RemoteKeyID applies equality check predicate on the "remote_key_id" field. It's identical to RemoteKeyIDEQ.
func RemoteKeyIDContains ¶
RemoteKeyIDContains applies the Contains predicate on the "remote_key_id" field.
func RemoteKeyIDContainsFold ¶
RemoteKeyIDContainsFold applies the ContainsFold predicate on the "remote_key_id" field.
func RemoteKeyIDEQ ¶
RemoteKeyIDEQ applies the EQ predicate on the "remote_key_id" field.
func RemoteKeyIDEqualFold ¶
RemoteKeyIDEqualFold applies the EqualFold predicate on the "remote_key_id" field.
func RemoteKeyIDGT ¶
RemoteKeyIDGT applies the GT predicate on the "remote_key_id" field.
func RemoteKeyIDGTE ¶
RemoteKeyIDGTE applies the GTE predicate on the "remote_key_id" field.
func RemoteKeyIDHasPrefix ¶
RemoteKeyIDHasPrefix applies the HasPrefix predicate on the "remote_key_id" field.
func RemoteKeyIDHasSuffix ¶
RemoteKeyIDHasSuffix applies the HasSuffix predicate on the "remote_key_id" field.
func RemoteKeyIDIn ¶
RemoteKeyIDIn applies the In predicate on the "remote_key_id" field.
func RemoteKeyIDLT ¶
RemoteKeyIDLT applies the LT predicate on the "remote_key_id" field.
func RemoteKeyIDLTE ¶
RemoteKeyIDLTE applies the LTE predicate on the "remote_key_id" field.
func RemoteKeyIDNEQ ¶
RemoteKeyIDNEQ applies the NEQ predicate on the "remote_key_id" field.
func RemoteKeyIDNotIn ¶
RemoteKeyIDNotIn applies the NotIn predicate on the "remote_key_id" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
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 Key queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_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 ByRemoteKeyID ¶
func ByRemoteKeyID(opts ...sql.OrderTermOption) OrderOption
ByRemoteKeyID orders the results by the remote_key_id field.
func BySecrets ¶
func BySecrets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySecrets orders the results by secrets terms.
func BySecretsCount ¶
func BySecretsCount(opts ...sql.OrderTermOption) OrderOption
BySecretsCount orders the results by secrets count.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.