postgres

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

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

Jump to

Keyboard shortcuts

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