sentinel

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 sentinel type in the database.
	Label = "sentinel"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldKekID holds the string denoting the kek_id field in the database.
	FieldKekID = "kek_id"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// FieldEnvelope holds the string denoting the envelope field in the database.
	FieldEnvelope = "envelope"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeKek holds the string denoting the kek edge name in mutations.
	EdgeKek = "kek"
	// Table holds the table name of the sentinel in the database.
	Table = "sentinels"
	// KekTable is the table that holds the kek relation/edge.
	KekTable = "sentinels"
	// 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

Columns holds all SQL columns for sentinel fields.

Functions

func And

func And(predicates ...predicate.Sentinel) predicate.Sentinel

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Sentinel

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Sentinel

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Sentinel

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Sentinel

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Sentinel

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Sentinel

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Sentinel

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

func CreatedAtNotIn

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

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

func Envelope

func Envelope(v string) predicate.Sentinel

Envelope applies equality check predicate on the "envelope" field. It's identical to EnvelopeEQ.

func EnvelopeContains

func EnvelopeContains(v string) predicate.Sentinel

EnvelopeContains applies the Contains predicate on the "envelope" field.

func EnvelopeContainsFold

func EnvelopeContainsFold(v string) predicate.Sentinel

EnvelopeContainsFold applies the ContainsFold predicate on the "envelope" field.

func EnvelopeEQ

func EnvelopeEQ(v string) predicate.Sentinel

EnvelopeEQ applies the EQ predicate on the "envelope" field.

func EnvelopeEqualFold

func EnvelopeEqualFold(v string) predicate.Sentinel

EnvelopeEqualFold applies the EqualFold predicate on the "envelope" field.

func EnvelopeGT

func EnvelopeGT(v string) predicate.Sentinel

EnvelopeGT applies the GT predicate on the "envelope" field.

func EnvelopeGTE

func EnvelopeGTE(v string) predicate.Sentinel

EnvelopeGTE applies the GTE predicate on the "envelope" field.

func EnvelopeHasPrefix

func EnvelopeHasPrefix(v string) predicate.Sentinel

EnvelopeHasPrefix applies the HasPrefix predicate on the "envelope" field.

func EnvelopeHasSuffix

func EnvelopeHasSuffix(v string) predicate.Sentinel

EnvelopeHasSuffix applies the HasSuffix predicate on the "envelope" field.

func EnvelopeIn

func EnvelopeIn(vs ...string) predicate.Sentinel

EnvelopeIn applies the In predicate on the "envelope" field.

func EnvelopeLT

func EnvelopeLT(v string) predicate.Sentinel

EnvelopeLT applies the LT predicate on the "envelope" field.

func EnvelopeLTE

func EnvelopeLTE(v string) predicate.Sentinel

EnvelopeLTE applies the LTE predicate on the "envelope" field.

func EnvelopeNEQ

func EnvelopeNEQ(v string) predicate.Sentinel

EnvelopeNEQ applies the NEQ predicate on the "envelope" field.

func EnvelopeNotIn

func EnvelopeNotIn(vs ...string) predicate.Sentinel

EnvelopeNotIn applies the NotIn predicate on the "envelope" field.

func HasKek

func HasKek() predicate.Sentinel

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

func HasKekWith

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

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

func ID

func ID(id int) predicate.Sentinel

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Sentinel

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Sentinel

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Sentinel

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Sentinel

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Sentinel

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Sentinel

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Sentinel

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Sentinel

IDNotIn applies the NotIn predicate on the ID field.

func KekID

func KekID(v envelope.ID) predicate.Sentinel

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

func KekIDEQ

func KekIDEQ(v envelope.ID) predicate.Sentinel

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

func KekIDIn

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

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

func KekIDNEQ

func KekIDNEQ(v envelope.ID) predicate.Sentinel

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

func KekIDNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Sentinel) predicate.Sentinel

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

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

func Version

func Version(v uint32) predicate.Sentinel

Version applies equality check predicate on the "version" field. It's identical to VersionEQ.

func VersionEQ

func VersionEQ(v uint32) predicate.Sentinel

VersionEQ applies the EQ predicate on the "version" field.

func VersionGT

func VersionGT(v uint32) predicate.Sentinel

VersionGT applies the GT predicate on the "version" field.

func VersionGTE

func VersionGTE(v uint32) predicate.Sentinel

VersionGTE applies the GTE predicate on the "version" field.

func VersionIn

func VersionIn(vs ...uint32) predicate.Sentinel

VersionIn applies the In predicate on the "version" field.

func VersionLT

func VersionLT(v uint32) predicate.Sentinel

VersionLT applies the LT predicate on the "version" field.

func VersionLTE

func VersionLTE(v uint32) predicate.Sentinel

VersionLTE applies the LTE predicate on the "version" field.

func VersionNEQ

func VersionNEQ(v uint32) predicate.Sentinel

VersionNEQ applies the NEQ predicate on the "version" field.

func VersionNotIn

func VersionNotIn(vs ...uint32) predicate.Sentinel

VersionNotIn applies the NotIn predicate on the "version" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Sentinel queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByEnvelope

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

ByEnvelope orders the results by the envelope field.

func ByID

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

ByID orders the results by the id 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 ByVersion

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

ByVersion orders the results by the version field.

Jump to

Keyboard shortcuts

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