exchange

package
v2.0.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTotalExchangeCount

func GetTotalExchangeCount(dbConnPgx utils.PgxIface) (*int, error)

func InsertExchange

func InsertExchange(dbConnPgx utils.PgxIface, exchange *Exchange) (int, error)

func InsertExchangeChain

func InsertExchangeChain(dbConnPgx utils.PgxIface, exchangeChain *ExchangeChain) (int, error)

func InsertExchangeChains

func InsertExchangeChains(dbConnPgx utils.PgxIface, exchangeChains []ExchangeChain) error

func InsertExchanges

func InsertExchanges(dbConnPgx utils.PgxIface, exchanges []Exchange) error

func RemoveExchange

func RemoveExchange(dbConnPgx utils.PgxIface, exchangeID *int) error

func UpdateExchange

func UpdateExchange(dbConnPgx utils.PgxIface, exchange *Exchange) error

func UpdateExchangeChainByUUID

func UpdateExchangeChainByUUID(dbConnPgx utils.PgxIface, exchangeChain *ExchangeChain) error

Types

type Exchange

type Exchange struct {
	ID             *int       `json:"id" db:"id"`
	UUID           string     `json:"uuid" db:"uuid"`
	Name           string     `json:"name" db:"name" db:"name"`
	AlternateName  string     `json:"alternateName" db:"alternate_name"`
	ExchangeTypeID *int       `json:"exchangeTypeId" db:"exchange_type_id"`
	Url            string     `json:"url" db:"url"`
	StartDate      *time.Time `json:"startDate" db:"start_date"`
	EndDate        *time.Time `json:"endDate" db:"end_date"`
	Description    string     `json:"description" db:"description"`
	CreatedBy      string     `json:"createdBy" db:"created_by"`
	CreatedAt      time.Time  `json:"createdAt" db:"created_at"`
	UpdatedBy      string     `json:"updatedBy" db:"updated_by"`
	UpdatedAt      time.Time  `json:"updatedAt" db:"updated_at"`
}

func GetExchange

func GetExchange(dbConnPgx utils.PgxIface, exchangeID *int) (*Exchange, error)

func GetExchangeList

func GetExchangeList(dbConnPgx utils.PgxIface, ids []int) ([]Exchange, error)

func GetExchangeListByPagination

func GetExchangeListByPagination(dbConnPgx utils.PgxIface, _start, _end *int, _order, _sort string, _filters []string) ([]Exchange, error)

for refinedev

func GetExchangesByUUIDs

func GetExchangesByUUIDs(dbConnPgx utils.PgxIface, UUIDList []string) ([]Exchange, error)

func GetStartAndEndDateDiffExchanges

func GetStartAndEndDateDiffExchanges(dbConnPgx utils.PgxIface, diffInDate *int) ([]Exchange, error)

type ExchangeChain

type ExchangeChain struct {
	UUID        string    `json:"uuid" db:"uuid"`
	ExchangeID  *int      `json:"exchangeId" db:"exchange_id"`
	ChainID     *int      `json:"chainId" db:"chain_id"`
	Description string    `json:"description" db:"description"`
	CreatedBy   string    `json:"createdBy" db:"created_by"`
	CreatedAt   time.Time `json:"createdAt" db:"created_at"`
	UpdatedBy   string    `json:"updatedBy" db:"updated_by"`
	UpdatedAt   time.Time `json:"updatedAt" db:"updated_at"`
}

Jump to

Keyboard shortcuts

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