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
Click to show internal directories.
Click to hide internal directories.