Back to

Package postgres

Latest Go to latest

The latest major version is .

Published: Nov 22, 2019 | License: MIT | Module:



var (
	// ErrNotFound return when data not found
	ErrNotFound = errors.New("not found")

type TokenPriceDB

type TokenPriceDB struct {
	// contains filtered or unexported fields

TokenPriceDB is storage of token price

func NewTokenPriceDB

func NewTokenPriceDB(sugar *zap.SugaredLogger, db *sqlx.DB) (*TokenPriceDB, error)

NewTokenPriceDB return instance of TokenPriceDB

func (*TokenPriceDB) GetTokenPrice

func (x *TokenPriceDB) GetTokenPrice(token, currency, provider string, timestamp time.Time) (float64, error)

GetTokenPrice save token price data

func (*TokenPriceDB) SaveTokenPrice

func (x *TokenPriceDB) SaveTokenPrice(token, currency, provider string, timestamp time.Time, price float64) error

SaveTokenPrice save token price data

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier