apikey

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the apikey type in the database.
	Label = "api_key"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldSecret holds the string denoting the secret field in the database.
	FieldSecret = "secret"
	// EdgeSenderProfile holds the string denoting the sender_profile edge name in mutations.
	EdgeSenderProfile = "sender_profile"
	// EdgeProviderProfile holds the string denoting the provider_profile edge name in mutations.
	EdgeProviderProfile = "provider_profile"
	// EdgePaymentOrders holds the string denoting the payment_orders edge name in mutations.
	EdgePaymentOrders = "payment_orders"
	// Table holds the table name of the apikey in the database.
	Table = "api_keys"
	// SenderProfileTable is the table that holds the sender_profile relation/edge.
	SenderProfileTable = "api_keys"
	// SenderProfileInverseTable is the table name for the SenderProfile entity.
	// It exists in this package in order to avoid circular dependency with the "senderprofile" package.
	SenderProfileInverseTable = "sender_profiles"
	// SenderProfileColumn is the table column denoting the sender_profile relation/edge.
	SenderProfileColumn = "sender_profile_api_key"
	// ProviderProfileTable is the table that holds the provider_profile relation/edge.
	ProviderProfileTable = "api_keys"
	// ProviderProfileInverseTable is the table name for the ProviderProfile entity.
	// It exists in this package in order to avoid circular dependency with the "providerprofile" package.
	ProviderProfileInverseTable = "provider_profiles"
	// ProviderProfileColumn is the table column denoting the provider_profile relation/edge.
	ProviderProfileColumn = "provider_profile_api_key"
	// PaymentOrdersTable is the table that holds the payment_orders relation/edge.
	PaymentOrdersTable = "payment_orders"
	// PaymentOrdersInverseTable is the table name for the PaymentOrder entity.
	// It exists in this package in order to avoid circular dependency with the "paymentorder" package.
	PaymentOrdersInverseTable = "payment_orders"
	// PaymentOrdersColumn is the table column denoting the payment_orders relation/edge.
	PaymentOrdersColumn = "api_key_payment_orders"
)

Variables

View Source
var (
	// SecretValidator is a validator for the "secret" field. It is called by the builders before save.
	SecretValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var Columns = []string{
	FieldID,
	FieldSecret,
}

Columns holds all SQL columns for apikey fields.

View Source
var ForeignKeys = []string{
	"provider_profile_api_key",
	"sender_profile_api_key",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "api_keys" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.APIKey) predicate.APIKey

And groups predicates with the AND operator between them.

func HasPaymentOrders

func HasPaymentOrders() predicate.APIKey

HasPaymentOrders applies the HasEdge predicate on the "payment_orders" edge.

func HasPaymentOrdersWith

func HasPaymentOrdersWith(preds ...predicate.PaymentOrder) predicate.APIKey

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

func HasProviderProfile

func HasProviderProfile() predicate.APIKey

HasProviderProfile applies the HasEdge predicate on the "provider_profile" edge.

func HasProviderProfileWith

func HasProviderProfileWith(preds ...predicate.ProviderProfile) predicate.APIKey

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

func HasSenderProfile

func HasSenderProfile() predicate.APIKey

HasSenderProfile applies the HasEdge predicate on the "sender_profile" edge.

func HasSenderProfileWith

func HasSenderProfileWith(preds ...predicate.SenderProfile) predicate.APIKey

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

func ID

func ID(id uuid.UUID) predicate.APIKey

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.APIKey

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.APIKey

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.APIKey

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.APIKey

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.APIKey

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.APIKey

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.APIKey

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.APIKey

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.APIKey) predicate.APIKey

Or groups predicates with the OR operator between them.

func Secret

func Secret(v string) predicate.APIKey

Secret applies equality check predicate on the "secret" field. It's identical to SecretEQ.

func SecretContains

func SecretContains(v string) predicate.APIKey

SecretContains applies the Contains predicate on the "secret" field.

func SecretContainsFold

func SecretContainsFold(v string) predicate.APIKey

SecretContainsFold applies the ContainsFold predicate on the "secret" field.

func SecretEQ

func SecretEQ(v string) predicate.APIKey

SecretEQ applies the EQ predicate on the "secret" field.

func SecretEqualFold

func SecretEqualFold(v string) predicate.APIKey

SecretEqualFold applies the EqualFold predicate on the "secret" field.

func SecretGT

func SecretGT(v string) predicate.APIKey

SecretGT applies the GT predicate on the "secret" field.

func SecretGTE

func SecretGTE(v string) predicate.APIKey

SecretGTE applies the GTE predicate on the "secret" field.

func SecretHasPrefix

func SecretHasPrefix(v string) predicate.APIKey

SecretHasPrefix applies the HasPrefix predicate on the "secret" field.

func SecretHasSuffix

func SecretHasSuffix(v string) predicate.APIKey

SecretHasSuffix applies the HasSuffix predicate on the "secret" field.

func SecretIn

func SecretIn(vs ...string) predicate.APIKey

SecretIn applies the In predicate on the "secret" field.

func SecretLT

func SecretLT(v string) predicate.APIKey

SecretLT applies the LT predicate on the "secret" field.

func SecretLTE

func SecretLTE(v string) predicate.APIKey

SecretLTE applies the LTE predicate on the "secret" field.

func SecretNEQ

func SecretNEQ(v string) predicate.APIKey

SecretNEQ applies the NEQ predicate on the "secret" field.

func SecretNotIn

func SecretNotIn(vs ...string) predicate.APIKey

SecretNotIn applies the NotIn predicate on the "secret" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the APIKey queries.

func ByID

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

ByID orders the results by the id field.

func ByPaymentOrders

func ByPaymentOrders(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByPaymentOrders orders the results by payment_orders terms.

func ByPaymentOrdersCount

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

ByPaymentOrdersCount orders the results by payment_orders count.

func ByProviderProfileField

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

ByProviderProfileField orders the results by provider_profile field.

func BySecret

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

BySecret orders the results by the secret field.

func BySenderProfileField

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

BySenderProfileField orders the results by sender_profile field.

Jump to

Keyboard shortcuts

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