storage

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	UpdatePriceAnalytic(data common.PriceAnalytic) error
	GetPriceAnalytic(fromTime, toTime time.Time) ([]common.PriceAnalytic, error)
}

Interface is the interface for price analytic storage

type PriceAnalyticDB

type PriceAnalyticDB struct {
	// contains filtered or unexported fields
}

PriceAnalyticDB represent db for price analytic data

func NewPriceStorage

func NewPriceStorage(sugar *zap.SugaredLogger, db *sqlx.DB) (*PriceAnalyticDB, error)

NewPriceStorage return new storage for price analytics

func (*PriceAnalyticDB) Close

func (pad *PriceAnalyticDB) Close() error

Close close db connection and return error if any

func (*PriceAnalyticDB) DeleteAllTables

func (pad *PriceAnalyticDB) DeleteAllTables() error

DeleteAllTables delete all table from schema using for test only

func (*PriceAnalyticDB) GetPriceAnalytic

func (pad *PriceAnalyticDB) GetPriceAnalytic(fromTime, toTime time.Time) ([]common.PriceAnalytic, error)

GetPriceAnalytic get price analytic data to return to api

func (*PriceAnalyticDB) UpdatePriceAnalytic

func (pad *PriceAnalyticDB) UpdatePriceAnalytic(data common.PriceAnalytic) error

UpdatePriceAnalytic store price analytic to db

Jump to

Keyboard shortcuts

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