exchange

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNoExchangeFound is a basic predefined error
	ErrNoExchangeFound = errors.New("exchange not found")
)

Functions

func Insert

func Insert(in Details) error

Insert writes a single entry into database

func InsertMany

func InsertMany(in []Details) error

InsertMany writes multiple entries into database

func ResetExchangeCache

func ResetExchangeCache()

ResetExchangeCache reinitialise cache to blank state used to clear cache for testing

func UUIDByName

func UUIDByName(exchange string) (uuid.UUID, error)

UUIDByName returns UUID of exchange

Types

type Details

type Details struct {
	UUID uuid.UUID
	Name string
}

Details holds exchange information such as Name

func LoadCSV

func LoadCSV(file string) (out []Details, err error)

LoadCSV loads & parses a CSV list of exchanges

func One

func One(in string) (Details, error)

One returns one exchange by Name

func OneByUUID

func OneByUUID(in uuid.UUID) (Details, error)

OneByUUID returns one exchange by UUID

Jump to

Keyboard shortcuts

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