market

package
v0.0.0-...-fe50809 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the market type in the database.
	Label = "market"
	// 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"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// EdgeVenue holds the string denoting the venue edge name in mutations.
	EdgeVenue = "venue"
	// EdgeTradingPair holds the string denoting the trading_pair edge name in mutations.
	EdgeTradingPair = "trading_pair"
	// Table holds the table name of the market in the database.
	Table = "markets"
	// VenueTable is the table that holds the venue relation/edge.
	VenueTable = "markets"
	// VenueInverseTable is the table name for the Venue entity.
	// It exists in this package in order to avoid circular dependency with the "venue" package.
	VenueInverseTable = "venues"
	// VenueColumn is the table column denoting the venue relation/edge.
	VenueColumn = "venue_market"
	// TradingPairTable is the table that holds the trading_pair relation/edge. The primary key declared below.
	TradingPairTable = "market_trading_pair"
	// TradingPairInverseTable is the table name for the TradingPair entity.
	// It exists in this package in order to avoid circular dependency with the "tradingpair" package.
	TradingPairInverseTable = "trading_pairs"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldName,
	FieldType,
}

Columns holds all SQL columns for market fields.

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

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

View Source
var (
	// TradingPairPrimaryKey and TradingPairColumn2 are the table columns denoting the
	// primary key for the trading_pair relation (M2M).
	TradingPairPrimaryKey = []string{"market_id", "trading_pair_id"}
)

Functions

func And

func And(predicates ...predicate.Market) predicate.Market

And groups predicates with the AND operator between them.

func HasTradingPair

func HasTradingPair() predicate.Market

HasTradingPair applies the HasEdge predicate on the "trading_pair" edge.

func HasTradingPairWith

func HasTradingPairWith(preds ...predicate.TradingPair) predicate.Market

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

func HasVenue

func HasVenue() predicate.Market

HasVenue applies the HasEdge predicate on the "venue" edge.

func HasVenueWith

func HasVenueWith(preds ...predicate.Venue) predicate.Market

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

func ID

func ID(id int) predicate.Market

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Market

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Market

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Market

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Market

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Market

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Market

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Market

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Market

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Market

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Market

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Market

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Market

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Market

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Market

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Market

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Market

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Market

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Market

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Market

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Market

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Market) predicate.Market

Or groups predicates with the OR operator between them.

func TypeEQ

func TypeEQ(v Type) predicate.Market

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Market

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Market

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Market

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeSPOT_TRADING     Type = "SPOT_TRADING"
	TypeMARGIN_TRADING   Type = "MARGIN_TRADING"
	TypeDERIVATIVES      Type = "DERIVATIVES"
	TypeEARN             Type = "EARN"
	TypePERPETUAL        Type = "PERPETUAL"
	TypeFUTURES          Type = "FUTURES"
	TypeWARRANT          Type = "WARRANT"
	TypeOTC              Type = "OTC"
	TypeYIELD            Type = "YIELD"
	TypeP2P              Type = "P2P"
	TypeSTRATEGY_TRADING Type = "STRATEGY_TRADING"
	TypeSWAP_FARMING     Type = "SWAP_FARMING"
	TypeFAN_TOKEN        Type = "FAN_TOKEN"
	TypeETF              Type = "ETF"
	TypeNFT              Type = "NFT"
	TypeSWAP             Type = "SWAP"
	TypeCFD              Type = "CFD"
	TypeLIQUIDITY        Type = "LIQUIDITY"
	TypeFARM             Type = "FARM"
)

Type values.

func (Type) MarshalGQL

func (e Type) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Type) String

func (_type Type) String() string

func (*Type) UnmarshalGQL

func (e *Type) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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