model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB(db *sql.DB)

func CreateTable

func CreateTable()

func Exec

func Exec(tx *sql.Tx, stmt *sql.Stmt, args ...interface{})

func Prepare

func Prepare(query string) (db *sql.DB, tx *sql.Tx, stmt *sql.Stmt)

func UpdateJsons

func UpdateJsons(all bool)

func UpdateMapJson

func UpdateMapJson()

func UpdateMapJsons

func UpdateMapJsons()

func WriteCryptosMapSQLDB

func WriteCryptosMapSQLDB(coinDataMap CoinDataMap)

func WriteCryptosSQLDB

func WriteCryptosSQLDB(coinData CoinData)

Types

type ApiKeyData

type ApiKeyData struct {
	ApiKey string `json:"api_key"`
}

type CoinData

type CoinData struct {
	CoinData []CoinDatum `json:"data"`
}

func ReadCryptosSQLDB

func ReadCryptosSQLDB() CoinData

func ReadJson

func ReadJson(filename string) CoinData

type CoinDataMap

type CoinDataMap struct {
	CoinDataMap []CoinDatumMap
}

func ReadMapJson200

func ReadMapJson200() CoinDataMap

func ReadMapJsons

func ReadMapJsons() CoinDataMap

type CoinDataMapUnmarshaler

type CoinDataMapUnmarshaler struct {
	CoinDataMap map[string]json.RawMessage `json:"data"`
}

func ReadMapJson

func ReadMapJson(filename string) CoinDataMapUnmarshaler

type CoinDatum

type CoinDatum struct {
	Id            int64  `json:"id"`
	Name          string `json:"name"`
	Slug          string
	Symbol        string `json:"symbol"`
	DateAdded     string   `json:"date_added"`
	Properties    Property `json:"quote"`
	Explorers     []string
	Twitters      []string
	Websites      []string
	Chats         []string
	Facebooks     []string
	MessageBoards []string
	Technicals    []string
	SourceCodes   []string
	Announcements []string
	BscScan       string
	EthScan       string
	XrpScan       string
	BscContract   string
	EthContract   string
	XrpContract   string
}

func ReadCryptoSQLDB

func ReadCryptoSQLDB(id int64) CoinDatum

type CoinDatumMap

type CoinDatumMap struct {
	Id int64 `json:"id"`
	//Name		string   	`json:"name"`
	//Symbol		string   	`json:"symbol"`
	DateAdded string `json:"date_added"`
	//Category	string		`json:"category"`
	//Description	string		`json:"description"`
	Slug string `json:"slug"`
	//Subreddit	string		`json:"subreddit"`
	//Tags		[]string	`json:"tags"`
	////TagsName	[]string	`json:"tags-names"`
	////TagsGroups	[]string	`json:"tags-groups"`
	URLs Urls `json:"urls"`
}

type MarketValue

type MarketValue struct {
	Price    float64 `json:"price"`
	Volume24 float64 `json:"volume_24h"`
}

type Property

type Property struct {
	Dollar MarketValue `json:"USD"`
}

type Urls

type Urls struct {
	Twitter      []string `json:"twitter"`
	Website      []string `json:"website"`
	Chat         []string `json:"chat"`
	Facebook     []string `json:"facebook"`
	MessageBoard []string `json:"message_board"`
	Explorer     []string `json:"explorer"`
	Technical    []string `json:"technical_doc"`
	SourceCode   []string `json:"source_code"`
	Announcement []string `json:"announcement"`
}

Jump to

Keyboard shortcuts

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