common

package
v0.0.0-...-20dc6fc Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ETHID id of eth
	ETHID = "ETH"
	// USDID id of usd
	USDID = "USD"
)
View Source
const (
	// Coingecko coingecko provider
	Coingecko = "coingecko"
	// CoinLib provider
	CoinLib = "coinlib"
)

Variables

This section is empty.

Functions

func DateStringToTime

func DateStringToTime(date string) (time.Time, error)

DateStringToTime convert date string in format YYYY-MM-DD to time

func TimeOfTodayStart

func TimeOfTodayStart() time.Time

TimeOfTodayStart return time of today start in UTC.

func TimeToDateString

func TimeToDateString(t time.Time) string

TimeToDateString convert time to date string with format YYYY-MM-DD

Types

type PriceResponse

type PriceResponse struct {
	Token    string  `json:"token,omitempty"`
	Currency string  `json:"currency,omitempty"`
	Failed   bool    `json:"failed"`
	Error    string  `json:"error,omitempty"`
	Price    float64 `json:"price"`
}

PriceResponse ...

Jump to

Keyboard shortcuts

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