token

package
v0.0.0-...-6269356 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldSymbol holds the string denoting the symbol field in the database.
	FieldSymbol = "symbol"
	// FieldContractAddress holds the string denoting the contract_address field in the database.
	FieldContractAddress = "contract_address"
	// FieldDecimals holds the string denoting the decimals field in the database.
	FieldDecimals = "decimals"
	// FieldIsEnabled holds the string denoting the is_enabled field in the database.
	FieldIsEnabled = "is_enabled"
	// FieldBaseCurrency holds the string denoting the base_currency field in the database.
	FieldBaseCurrency = "base_currency"
	// EdgeNetwork holds the string denoting the network edge name in mutations.
	EdgeNetwork = "network"
	// EdgePaymentOrders holds the string denoting the payment_orders edge name in mutations.
	EdgePaymentOrders = "payment_orders"
	// EdgeLockPaymentOrders holds the string denoting the lock_payment_orders edge name in mutations.
	EdgeLockPaymentOrders = "lock_payment_orders"
	// EdgeSenderOrderTokens holds the string denoting the sender_order_tokens edge name in mutations.
	EdgeSenderOrderTokens = "sender_order_tokens"
	// EdgeProviderOrderTokens holds the string denoting the provider_order_tokens edge name in mutations.
	EdgeProviderOrderTokens = "provider_order_tokens"
	// Table holds the table name of the token in the database.
	Table = "tokens"
	// NetworkTable is the table that holds the network relation/edge.
	NetworkTable = "tokens"
	// NetworkInverseTable is the table name for the Network entity.
	// It exists in this package in order to avoid circular dependency with the "network" package.
	NetworkInverseTable = "networks"
	// NetworkColumn is the table column denoting the network relation/edge.
	NetworkColumn = "network_tokens"
	// 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 = "token_payment_orders"
	// LockPaymentOrdersTable is the table that holds the lock_payment_orders relation/edge.
	LockPaymentOrdersTable = "lock_payment_orders"
	// LockPaymentOrdersInverseTable is the table name for the LockPaymentOrder entity.
	// It exists in this package in order to avoid circular dependency with the "lockpaymentorder" package.
	LockPaymentOrdersInverseTable = "lock_payment_orders"
	// LockPaymentOrdersColumn is the table column denoting the lock_payment_orders relation/edge.
	LockPaymentOrdersColumn = "token_lock_payment_orders"
	// SenderOrderTokensTable is the table that holds the sender_order_tokens relation/edge.
	SenderOrderTokensTable = "sender_order_tokens"
	// SenderOrderTokensInverseTable is the table name for the SenderOrderToken entity.
	// It exists in this package in order to avoid circular dependency with the "senderordertoken" package.
	SenderOrderTokensInverseTable = "sender_order_tokens"
	// SenderOrderTokensColumn is the table column denoting the sender_order_tokens relation/edge.
	SenderOrderTokensColumn = "token_sender_order_tokens"
	// ProviderOrderTokensTable is the table that holds the provider_order_tokens relation/edge.
	ProviderOrderTokensTable = "provider_order_tokens"
	// ProviderOrderTokensInverseTable is the table name for the ProviderOrderToken entity.
	// It exists in this package in order to avoid circular dependency with the "providerordertoken" package.
	ProviderOrderTokensInverseTable = "provider_order_tokens"
	// ProviderOrderTokensColumn is the table column denoting the provider_order_tokens relation/edge.
	ProviderOrderTokensColumn = "token_provider_order_tokens"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// SymbolValidator is a validator for the "symbol" field. It is called by the builders before save.
	SymbolValidator func(string) error
	// ContractAddressValidator is a validator for the "contract_address" field. It is called by the builders before save.
	ContractAddressValidator func(string) error
	// DefaultIsEnabled holds the default value on creation for the "is_enabled" field.
	DefaultIsEnabled bool
	// DefaultBaseCurrency holds the default value on creation for the "base_currency" field.
	DefaultBaseCurrency string
)

Columns holds all SQL columns for token fields.

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

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

Functions

func And

func And(predicates ...predicate.Token) predicate.Token

And groups predicates with the AND operator between them.

func BaseCurrency

func BaseCurrency(v string) predicate.Token

BaseCurrency applies equality check predicate on the "base_currency" field. It's identical to BaseCurrencyEQ.

func BaseCurrencyContains

func BaseCurrencyContains(v string) predicate.Token

BaseCurrencyContains applies the Contains predicate on the "base_currency" field.

func BaseCurrencyContainsFold

func BaseCurrencyContainsFold(v string) predicate.Token

BaseCurrencyContainsFold applies the ContainsFold predicate on the "base_currency" field.

func BaseCurrencyEQ

func BaseCurrencyEQ(v string) predicate.Token

BaseCurrencyEQ applies the EQ predicate on the "base_currency" field.

func BaseCurrencyEqualFold

func BaseCurrencyEqualFold(v string) predicate.Token

BaseCurrencyEqualFold applies the EqualFold predicate on the "base_currency" field.

func BaseCurrencyGT

func BaseCurrencyGT(v string) predicate.Token

BaseCurrencyGT applies the GT predicate on the "base_currency" field.

func BaseCurrencyGTE

func BaseCurrencyGTE(v string) predicate.Token

BaseCurrencyGTE applies the GTE predicate on the "base_currency" field.

func BaseCurrencyHasPrefix

func BaseCurrencyHasPrefix(v string) predicate.Token

BaseCurrencyHasPrefix applies the HasPrefix predicate on the "base_currency" field.

func BaseCurrencyHasSuffix

func BaseCurrencyHasSuffix(v string) predicate.Token

BaseCurrencyHasSuffix applies the HasSuffix predicate on the "base_currency" field.

func BaseCurrencyIn

func BaseCurrencyIn(vs ...string) predicate.Token

BaseCurrencyIn applies the In predicate on the "base_currency" field.

func BaseCurrencyLT

func BaseCurrencyLT(v string) predicate.Token

BaseCurrencyLT applies the LT predicate on the "base_currency" field.

func BaseCurrencyLTE

func BaseCurrencyLTE(v string) predicate.Token

BaseCurrencyLTE applies the LTE predicate on the "base_currency" field.

func BaseCurrencyNEQ

func BaseCurrencyNEQ(v string) predicate.Token

BaseCurrencyNEQ applies the NEQ predicate on the "base_currency" field.

func BaseCurrencyNotIn

func BaseCurrencyNotIn(vs ...string) predicate.Token

BaseCurrencyNotIn applies the NotIn predicate on the "base_currency" field.

func ContractAddress

func ContractAddress(v string) predicate.Token

ContractAddress applies equality check predicate on the "contract_address" field. It's identical to ContractAddressEQ.

func ContractAddressContains

func ContractAddressContains(v string) predicate.Token

ContractAddressContains applies the Contains predicate on the "contract_address" field.

func ContractAddressContainsFold

func ContractAddressContainsFold(v string) predicate.Token

ContractAddressContainsFold applies the ContainsFold predicate on the "contract_address" field.

func ContractAddressEQ

func ContractAddressEQ(v string) predicate.Token

ContractAddressEQ applies the EQ predicate on the "contract_address" field.

func ContractAddressEqualFold

func ContractAddressEqualFold(v string) predicate.Token

ContractAddressEqualFold applies the EqualFold predicate on the "contract_address" field.

func ContractAddressGT

func ContractAddressGT(v string) predicate.Token

ContractAddressGT applies the GT predicate on the "contract_address" field.

func ContractAddressGTE

func ContractAddressGTE(v string) predicate.Token

ContractAddressGTE applies the GTE predicate on the "contract_address" field.

func ContractAddressHasPrefix

func ContractAddressHasPrefix(v string) predicate.Token

ContractAddressHasPrefix applies the HasPrefix predicate on the "contract_address" field.

func ContractAddressHasSuffix

func ContractAddressHasSuffix(v string) predicate.Token

ContractAddressHasSuffix applies the HasSuffix predicate on the "contract_address" field.

func ContractAddressIn

func ContractAddressIn(vs ...string) predicate.Token

ContractAddressIn applies the In predicate on the "contract_address" field.

func ContractAddressLT

func ContractAddressLT(v string) predicate.Token

ContractAddressLT applies the LT predicate on the "contract_address" field.

func ContractAddressLTE

func ContractAddressLTE(v string) predicate.Token

ContractAddressLTE applies the LTE predicate on the "contract_address" field.

func ContractAddressNEQ

func ContractAddressNEQ(v string) predicate.Token

ContractAddressNEQ applies the NEQ predicate on the "contract_address" field.

func ContractAddressNotIn

func ContractAddressNotIn(vs ...string) predicate.Token

ContractAddressNotIn applies the NotIn predicate on the "contract_address" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Token

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Token

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Token

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Token

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Token

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Token

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Token

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

func CreatedAtNotIn

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

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

func Decimals

func Decimals(v int8) predicate.Token

Decimals applies equality check predicate on the "decimals" field. It's identical to DecimalsEQ.

func DecimalsEQ

func DecimalsEQ(v int8) predicate.Token

DecimalsEQ applies the EQ predicate on the "decimals" field.

func DecimalsGT

func DecimalsGT(v int8) predicate.Token

DecimalsGT applies the GT predicate on the "decimals" field.

func DecimalsGTE

func DecimalsGTE(v int8) predicate.Token

DecimalsGTE applies the GTE predicate on the "decimals" field.

func DecimalsIn

func DecimalsIn(vs ...int8) predicate.Token

DecimalsIn applies the In predicate on the "decimals" field.

func DecimalsLT

func DecimalsLT(v int8) predicate.Token

DecimalsLT applies the LT predicate on the "decimals" field.

func DecimalsLTE

func DecimalsLTE(v int8) predicate.Token

DecimalsLTE applies the LTE predicate on the "decimals" field.

func DecimalsNEQ

func DecimalsNEQ(v int8) predicate.Token

DecimalsNEQ applies the NEQ predicate on the "decimals" field.

func DecimalsNotIn

func DecimalsNotIn(vs ...int8) predicate.Token

DecimalsNotIn applies the NotIn predicate on the "decimals" field.

func HasLockPaymentOrders

func HasLockPaymentOrders() predicate.Token

HasLockPaymentOrders applies the HasEdge predicate on the "lock_payment_orders" edge.

func HasLockPaymentOrdersWith

func HasLockPaymentOrdersWith(preds ...predicate.LockPaymentOrder) predicate.Token

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

func HasNetwork

func HasNetwork() predicate.Token

HasNetwork applies the HasEdge predicate on the "network" edge.

func HasNetworkWith

func HasNetworkWith(preds ...predicate.Network) predicate.Token

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

func HasPaymentOrders

func HasPaymentOrders() predicate.Token

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

func HasPaymentOrdersWith

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

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

func HasProviderOrderTokens

func HasProviderOrderTokens() predicate.Token

HasProviderOrderTokens applies the HasEdge predicate on the "provider_order_tokens" edge.

func HasProviderOrderTokensWith

func HasProviderOrderTokensWith(preds ...predicate.ProviderOrderToken) predicate.Token

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

func HasSenderOrderTokens

func HasSenderOrderTokens() predicate.Token

HasSenderOrderTokens applies the HasEdge predicate on the "sender_order_tokens" edge.

func HasSenderOrderTokensWith

func HasSenderOrderTokensWith(preds ...predicate.SenderOrderToken) predicate.Token

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

func ID

func ID(id int) predicate.Token

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Token

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Token

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Token

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Token

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Token

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Token

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsEnabled

func IsEnabled(v bool) predicate.Token

IsEnabled applies equality check predicate on the "is_enabled" field. It's identical to IsEnabledEQ.

func IsEnabledEQ

func IsEnabledEQ(v bool) predicate.Token

IsEnabledEQ applies the EQ predicate on the "is_enabled" field.

func IsEnabledNEQ

func IsEnabledNEQ(v bool) predicate.Token

IsEnabledNEQ applies the NEQ predicate on the "is_enabled" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Token) predicate.Token

Or groups predicates with the OR operator between them.

func Symbol

func Symbol(v string) predicate.Token

Symbol applies equality check predicate on the "symbol" field. It's identical to SymbolEQ.

func SymbolContains

func SymbolContains(v string) predicate.Token

SymbolContains applies the Contains predicate on the "symbol" field.

func SymbolContainsFold

func SymbolContainsFold(v string) predicate.Token

SymbolContainsFold applies the ContainsFold predicate on the "symbol" field.

func SymbolEQ

func SymbolEQ(v string) predicate.Token

SymbolEQ applies the EQ predicate on the "symbol" field.

func SymbolEqualFold

func SymbolEqualFold(v string) predicate.Token

SymbolEqualFold applies the EqualFold predicate on the "symbol" field.

func SymbolGT

func SymbolGT(v string) predicate.Token

SymbolGT applies the GT predicate on the "symbol" field.

func SymbolGTE

func SymbolGTE(v string) predicate.Token

SymbolGTE applies the GTE predicate on the "symbol" field.

func SymbolHasPrefix

func SymbolHasPrefix(v string) predicate.Token

SymbolHasPrefix applies the HasPrefix predicate on the "symbol" field.

func SymbolHasSuffix

func SymbolHasSuffix(v string) predicate.Token

SymbolHasSuffix applies the HasSuffix predicate on the "symbol" field.

func SymbolIn

func SymbolIn(vs ...string) predicate.Token

SymbolIn applies the In predicate on the "symbol" field.

func SymbolLT

func SymbolLT(v string) predicate.Token

SymbolLT applies the LT predicate on the "symbol" field.

func SymbolLTE

func SymbolLTE(v string) predicate.Token

SymbolLTE applies the LTE predicate on the "symbol" field.

func SymbolNEQ

func SymbolNEQ(v string) predicate.Token

SymbolNEQ applies the NEQ predicate on the "symbol" field.

func SymbolNotIn

func SymbolNotIn(vs ...string) predicate.Token

SymbolNotIn applies the NotIn predicate on the "symbol" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Token

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Token

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Token

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Token

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Token

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Token

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Token

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Token

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Token

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 Token queries.

func ByBaseCurrency

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

ByBaseCurrency orders the results by the base_currency field.

func ByContractAddress

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

ByContractAddress orders the results by the contract_address field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDecimals

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

ByDecimals orders the results by the decimals field.

func ByID

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

ByID orders the results by the id field.

func ByIsEnabled

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

ByIsEnabled orders the results by the is_enabled field.

func ByLockPaymentOrders

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

ByLockPaymentOrders orders the results by lock_payment_orders terms.

func ByLockPaymentOrdersCount

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

ByLockPaymentOrdersCount orders the results by lock_payment_orders count.

func ByNetworkField

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

ByNetworkField orders the results by network 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 ByProviderOrderTokens

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

ByProviderOrderTokens orders the results by provider_order_tokens terms.

func ByProviderOrderTokensCount

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

ByProviderOrderTokensCount orders the results by provider_order_tokens count.

func BySenderOrderTokens

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

BySenderOrderTokens orders the results by sender_order_tokens terms.

func BySenderOrderTokensCount

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

BySenderOrderTokensCount orders the results by sender_order_tokens count.

func BySymbol

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

BySymbol orders the results by the symbol field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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