datakey

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the datakey type in the database.
	Label = "data_key"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldPurpose holds the string denoting the purpose field in the database.
	FieldPurpose = "purpose"
	// FieldSubject holds the string denoting the subject field in the database.
	FieldSubject = "subject"
	// FieldEpoch holds the string denoting the epoch field in the database.
	FieldEpoch = "epoch"
	// FieldAlgorithm holds the string denoting the algorithm field in the database.
	FieldAlgorithm = "algorithm"
	// FieldKekID holds the string denoting the kek_id field in the database.
	FieldKekID = "kek_id"
	// FieldKekVersion holds the string denoting the kek_version field in the database.
	FieldKekVersion = "kek_version"
	// FieldWrapped holds the string denoting the wrapped field in the database.
	FieldWrapped = "wrapped"
	// FieldState holds the string denoting the state field in the database.
	FieldState = "state"
	// FieldReserved holds the string denoting the reserved field in the database.
	FieldReserved = "reserved"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldWrappedUnder holds the string denoting the wrapped_under field in the database.
	FieldWrappedUnder = "wrapped_under"
	// FieldIsCurrent holds the string denoting the is_current field in the database.
	FieldIsCurrent = "is_current"
	// EdgeKek holds the string denoting the kek edge name in mutations.
	EdgeKek = "kek"
	// Table holds the table name of the datakey in the database.
	Table = "data_keys"
	// KekTable is the table that holds the kek relation/edge.
	KekTable = "data_keys"
	// KekInverseTable is the table name for the KEK entity.
	// It exists in this package in order to avoid circular dependency with the "kek" package.
	KekInverseTable = "ke_ks"
	// KekColumn is the table column denoting the kek relation/edge.
	KekColumn = "kek_id"
)

Variables

View Source
var (
	// PurposeValidator is a validator for the "purpose" field. It is called by the builders before save.
	PurposeValidator func(string) error
	// DefaultSubject holds the default value on creation for the "subject" field.
	DefaultSubject string
	// DefaultReserved holds the default value on creation for the "reserved" field.
	DefaultReserved uint64
	// DefaultIsCurrent holds the default value on creation for the "is_current" field.
	DefaultIsCurrent bool
)

Columns holds all SQL columns for datakey fields.

Functions

func Algorithm

func Algorithm(v uint8) predicate.DataKey

Algorithm applies equality check predicate on the "algorithm" field. It's identical to AlgorithmEQ.

func AlgorithmEQ

func AlgorithmEQ(v uint8) predicate.DataKey

AlgorithmEQ applies the EQ predicate on the "algorithm" field.

func AlgorithmGT

func AlgorithmGT(v uint8) predicate.DataKey

AlgorithmGT applies the GT predicate on the "algorithm" field.

func AlgorithmGTE

func AlgorithmGTE(v uint8) predicate.DataKey

AlgorithmGTE applies the GTE predicate on the "algorithm" field.

func AlgorithmIn

func AlgorithmIn(vs ...uint8) predicate.DataKey

AlgorithmIn applies the In predicate on the "algorithm" field.

func AlgorithmLT

func AlgorithmLT(v uint8) predicate.DataKey

AlgorithmLT applies the LT predicate on the "algorithm" field.

func AlgorithmLTE

func AlgorithmLTE(v uint8) predicate.DataKey

AlgorithmLTE applies the LTE predicate on the "algorithm" field.

func AlgorithmNEQ

func AlgorithmNEQ(v uint8) predicate.DataKey

AlgorithmNEQ applies the NEQ predicate on the "algorithm" field.

func AlgorithmNotIn

func AlgorithmNotIn(vs ...uint8) predicate.DataKey

AlgorithmNotIn applies the NotIn predicate on the "algorithm" field.

func And

func And(predicates ...predicate.DataKey) predicate.DataKey

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.DataKey

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.DataKey

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.DataKey

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.DataKey

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.DataKey

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.DataKey

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.DataKey

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.DataKey

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.DataKey

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func Epoch

func Epoch(v uint32) predicate.DataKey

Epoch applies equality check predicate on the "epoch" field. It's identical to EpochEQ.

func EpochEQ

func EpochEQ(v uint32) predicate.DataKey

EpochEQ applies the EQ predicate on the "epoch" field.

func EpochGT

func EpochGT(v uint32) predicate.DataKey

EpochGT applies the GT predicate on the "epoch" field.

func EpochGTE

func EpochGTE(v uint32) predicate.DataKey

EpochGTE applies the GTE predicate on the "epoch" field.

func EpochIn

func EpochIn(vs ...uint32) predicate.DataKey

EpochIn applies the In predicate on the "epoch" field.

func EpochLT

func EpochLT(v uint32) predicate.DataKey

EpochLT applies the LT predicate on the "epoch" field.

func EpochLTE

func EpochLTE(v uint32) predicate.DataKey

EpochLTE applies the LTE predicate on the "epoch" field.

func EpochNEQ

func EpochNEQ(v uint32) predicate.DataKey

EpochNEQ applies the NEQ predicate on the "epoch" field.

func EpochNotIn

func EpochNotIn(vs ...uint32) predicate.DataKey

EpochNotIn applies the NotIn predicate on the "epoch" field.

func HasKek

func HasKek() predicate.DataKey

HasKek applies the HasEdge predicate on the "kek" edge.

func HasKekWith

func HasKekWith(preds ...predicate.KEK) predicate.DataKey

HasKekWith applies the HasEdge predicate on the "kek" edge with a given conditions (other predicates).

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id envelope.ID) predicate.DataKey

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id envelope.ID) predicate.DataKey

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id envelope.ID) predicate.DataKey

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...envelope.ID) predicate.DataKey

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id envelope.ID) predicate.DataKey

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id envelope.ID) predicate.DataKey

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id envelope.ID) predicate.DataKey

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...envelope.ID) predicate.DataKey

IDNotIn applies the NotIn predicate on the ID field.

func IsCurrent

func IsCurrent(v bool) predicate.DataKey

IsCurrent applies equality check predicate on the "is_current" field. It's identical to IsCurrentEQ.

func IsCurrentEQ

func IsCurrentEQ(v bool) predicate.DataKey

IsCurrentEQ applies the EQ predicate on the "is_current" field.

func IsCurrentNEQ

func IsCurrentNEQ(v bool) predicate.DataKey

IsCurrentNEQ applies the NEQ predicate on the "is_current" field.

func KekID

func KekID(v envelope.ID) predicate.DataKey

KekID applies equality check predicate on the "kek_id" field. It's identical to KekIDEQ.

func KekIDEQ

func KekIDEQ(v envelope.ID) predicate.DataKey

KekIDEQ applies the EQ predicate on the "kek_id" field.

func KekIDIn

func KekIDIn(vs ...envelope.ID) predicate.DataKey

KekIDIn applies the In predicate on the "kek_id" field.

func KekIDNEQ

func KekIDNEQ(v envelope.ID) predicate.DataKey

KekIDNEQ applies the NEQ predicate on the "kek_id" field.

func KekIDNotIn

func KekIDNotIn(vs ...envelope.ID) predicate.DataKey

KekIDNotIn applies the NotIn predicate on the "kek_id" field.

func KekVersion

func KekVersion(v uint32) predicate.DataKey

KekVersion applies equality check predicate on the "kek_version" field. It's identical to KekVersionEQ.

func KekVersionEQ

func KekVersionEQ(v uint32) predicate.DataKey

KekVersionEQ applies the EQ predicate on the "kek_version" field.

func KekVersionGT

func KekVersionGT(v uint32) predicate.DataKey

KekVersionGT applies the GT predicate on the "kek_version" field.

func KekVersionGTE

func KekVersionGTE(v uint32) predicate.DataKey

KekVersionGTE applies the GTE predicate on the "kek_version" field.

func KekVersionIn

func KekVersionIn(vs ...uint32) predicate.DataKey

KekVersionIn applies the In predicate on the "kek_version" field.

func KekVersionLT

func KekVersionLT(v uint32) predicate.DataKey

KekVersionLT applies the LT predicate on the "kek_version" field.

func KekVersionLTE

func KekVersionLTE(v uint32) predicate.DataKey

KekVersionLTE applies the LTE predicate on the "kek_version" field.

func KekVersionNEQ

func KekVersionNEQ(v uint32) predicate.DataKey

KekVersionNEQ applies the NEQ predicate on the "kek_version" field.

func KekVersionNotIn

func KekVersionNotIn(vs ...uint32) predicate.DataKey

KekVersionNotIn applies the NotIn predicate on the "kek_version" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.DataKey) predicate.DataKey

Or groups predicates with the OR operator between them.

func Purpose

func Purpose(v string) predicate.DataKey

Purpose applies equality check predicate on the "purpose" field. It's identical to PurposeEQ.

func PurposeContains

func PurposeContains(v string) predicate.DataKey

PurposeContains applies the Contains predicate on the "purpose" field.

func PurposeContainsFold

func PurposeContainsFold(v string) predicate.DataKey

PurposeContainsFold applies the ContainsFold predicate on the "purpose" field.

func PurposeEQ

func PurposeEQ(v string) predicate.DataKey

PurposeEQ applies the EQ predicate on the "purpose" field.

func PurposeEqualFold

func PurposeEqualFold(v string) predicate.DataKey

PurposeEqualFold applies the EqualFold predicate on the "purpose" field.

func PurposeGT

func PurposeGT(v string) predicate.DataKey

PurposeGT applies the GT predicate on the "purpose" field.

func PurposeGTE

func PurposeGTE(v string) predicate.DataKey

PurposeGTE applies the GTE predicate on the "purpose" field.

func PurposeHasPrefix

func PurposeHasPrefix(v string) predicate.DataKey

PurposeHasPrefix applies the HasPrefix predicate on the "purpose" field.

func PurposeHasSuffix

func PurposeHasSuffix(v string) predicate.DataKey

PurposeHasSuffix applies the HasSuffix predicate on the "purpose" field.

func PurposeIn

func PurposeIn(vs ...string) predicate.DataKey

PurposeIn applies the In predicate on the "purpose" field.

func PurposeLT

func PurposeLT(v string) predicate.DataKey

PurposeLT applies the LT predicate on the "purpose" field.

func PurposeLTE

func PurposeLTE(v string) predicate.DataKey

PurposeLTE applies the LTE predicate on the "purpose" field.

func PurposeNEQ

func PurposeNEQ(v string) predicate.DataKey

PurposeNEQ applies the NEQ predicate on the "purpose" field.

func PurposeNotIn

func PurposeNotIn(vs ...string) predicate.DataKey

PurposeNotIn applies the NotIn predicate on the "purpose" field.

func Reserved

func Reserved(v uint64) predicate.DataKey

Reserved applies equality check predicate on the "reserved" field. It's identical to ReservedEQ.

func ReservedEQ

func ReservedEQ(v uint64) predicate.DataKey

ReservedEQ applies the EQ predicate on the "reserved" field.

func ReservedGT

func ReservedGT(v uint64) predicate.DataKey

ReservedGT applies the GT predicate on the "reserved" field.

func ReservedGTE

func ReservedGTE(v uint64) predicate.DataKey

ReservedGTE applies the GTE predicate on the "reserved" field.

func ReservedIn

func ReservedIn(vs ...uint64) predicate.DataKey

ReservedIn applies the In predicate on the "reserved" field.

func ReservedLT

func ReservedLT(v uint64) predicate.DataKey

ReservedLT applies the LT predicate on the "reserved" field.

func ReservedLTE

func ReservedLTE(v uint64) predicate.DataKey

ReservedLTE applies the LTE predicate on the "reserved" field.

func ReservedNEQ

func ReservedNEQ(v uint64) predicate.DataKey

ReservedNEQ applies the NEQ predicate on the "reserved" field.

func ReservedNotIn

func ReservedNotIn(vs ...uint64) predicate.DataKey

ReservedNotIn applies the NotIn predicate on the "reserved" field.

func State

func State(v uint8) predicate.DataKey

State applies equality check predicate on the "state" field. It's identical to StateEQ.

func StateEQ

func StateEQ(v uint8) predicate.DataKey

StateEQ applies the EQ predicate on the "state" field.

func StateGT

func StateGT(v uint8) predicate.DataKey

StateGT applies the GT predicate on the "state" field.

func StateGTE

func StateGTE(v uint8) predicate.DataKey

StateGTE applies the GTE predicate on the "state" field.

func StateIn

func StateIn(vs ...uint8) predicate.DataKey

StateIn applies the In predicate on the "state" field.

func StateLT

func StateLT(v uint8) predicate.DataKey

StateLT applies the LT predicate on the "state" field.

func StateLTE

func StateLTE(v uint8) predicate.DataKey

StateLTE applies the LTE predicate on the "state" field.

func StateNEQ

func StateNEQ(v uint8) predicate.DataKey

StateNEQ applies the NEQ predicate on the "state" field.

func StateNotIn

func StateNotIn(vs ...uint8) predicate.DataKey

StateNotIn applies the NotIn predicate on the "state" field.

func Subject

func Subject(v string) predicate.DataKey

Subject applies equality check predicate on the "subject" field. It's identical to SubjectEQ.

func SubjectContains

func SubjectContains(v string) predicate.DataKey

SubjectContains applies the Contains predicate on the "subject" field.

func SubjectContainsFold

func SubjectContainsFold(v string) predicate.DataKey

SubjectContainsFold applies the ContainsFold predicate on the "subject" field.

func SubjectEQ

func SubjectEQ(v string) predicate.DataKey

SubjectEQ applies the EQ predicate on the "subject" field.

func SubjectEqualFold

func SubjectEqualFold(v string) predicate.DataKey

SubjectEqualFold applies the EqualFold predicate on the "subject" field.

func SubjectGT

func SubjectGT(v string) predicate.DataKey

SubjectGT applies the GT predicate on the "subject" field.

func SubjectGTE

func SubjectGTE(v string) predicate.DataKey

SubjectGTE applies the GTE predicate on the "subject" field.

func SubjectHasPrefix

func SubjectHasPrefix(v string) predicate.DataKey

SubjectHasPrefix applies the HasPrefix predicate on the "subject" field.

func SubjectHasSuffix

func SubjectHasSuffix(v string) predicate.DataKey

SubjectHasSuffix applies the HasSuffix predicate on the "subject" field.

func SubjectIn

func SubjectIn(vs ...string) predicate.DataKey

SubjectIn applies the In predicate on the "subject" field.

func SubjectLT

func SubjectLT(v string) predicate.DataKey

SubjectLT applies the LT predicate on the "subject" field.

func SubjectLTE

func SubjectLTE(v string) predicate.DataKey

SubjectLTE applies the LTE predicate on the "subject" field.

func SubjectNEQ

func SubjectNEQ(v string) predicate.DataKey

SubjectNEQ applies the NEQ predicate on the "subject" field.

func SubjectNotIn

func SubjectNotIn(vs ...string) predicate.DataKey

SubjectNotIn applies the NotIn predicate on the "subject" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Wrapped

func Wrapped(v []byte) predicate.DataKey

Wrapped applies equality check predicate on the "wrapped" field. It's identical to WrappedEQ.

func WrappedEQ

func WrappedEQ(v []byte) predicate.DataKey

WrappedEQ applies the EQ predicate on the "wrapped" field.

func WrappedGT

func WrappedGT(v []byte) predicate.DataKey

WrappedGT applies the GT predicate on the "wrapped" field.

func WrappedGTE

func WrappedGTE(v []byte) predicate.DataKey

WrappedGTE applies the GTE predicate on the "wrapped" field.

func WrappedIn

func WrappedIn(vs ...[]byte) predicate.DataKey

WrappedIn applies the In predicate on the "wrapped" field.

func WrappedIsNil

func WrappedIsNil() predicate.DataKey

WrappedIsNil applies the IsNil predicate on the "wrapped" field.

func WrappedLT

func WrappedLT(v []byte) predicate.DataKey

WrappedLT applies the LT predicate on the "wrapped" field.

func WrappedLTE

func WrappedLTE(v []byte) predicate.DataKey

WrappedLTE applies the LTE predicate on the "wrapped" field.

func WrappedNEQ

func WrappedNEQ(v []byte) predicate.DataKey

WrappedNEQ applies the NEQ predicate on the "wrapped" field.

func WrappedNotIn

func WrappedNotIn(vs ...[]byte) predicate.DataKey

WrappedNotIn applies the NotIn predicate on the "wrapped" field.

func WrappedNotNil

func WrappedNotNil() predicate.DataKey

WrappedNotNil applies the NotNil predicate on the "wrapped" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the DataKey queries.

func ByAlgorithm

func ByAlgorithm(opts ...sql.OrderTermOption) OrderOption

ByAlgorithm orders the results by the algorithm field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByEpoch

func ByEpoch(opts ...sql.OrderTermOption) OrderOption

ByEpoch orders the results by the epoch field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByIsCurrent

func ByIsCurrent(opts ...sql.OrderTermOption) OrderOption

ByIsCurrent orders the results by the is_current field.

func ByKekField

func ByKekField(field string, opts ...sql.OrderTermOption) OrderOption

ByKekField orders the results by kek field.

func ByKekID

func ByKekID(opts ...sql.OrderTermOption) OrderOption

ByKekID orders the results by the kek_id field.

func ByKekVersion

func ByKekVersion(opts ...sql.OrderTermOption) OrderOption

ByKekVersion orders the results by the kek_version field.

func ByPurpose

func ByPurpose(opts ...sql.OrderTermOption) OrderOption

ByPurpose orders the results by the purpose field.

func ByReserved

func ByReserved(opts ...sql.OrderTermOption) OrderOption

ByReserved orders the results by the reserved field.

func ByState

func ByState(opts ...sql.OrderTermOption) OrderOption

ByState orders the results by the state field.

func BySubject

func BySubject(opts ...sql.OrderTermOption) OrderOption

BySubject orders the results by the subject field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL