Documentation ¶
Index ¶
- Constants
- type ProductPrice
- type Repository
- func (r *Repository) CountPrices(productId int64, tx *sql.Tx) (int64, error)
- func (r *Repository) CreatePrice(productId int64, currency string, price int, timestamp time.Time, tx *sql.Tx) error
- func (r *Repository) FindLatestPrice(productId int64, tx *sql.Tx) (*ProductPrice, error)
- func (r *Repository) FindPrices(productId int64, offset int64, limit int, orderBy, direction string, ...) ([]ProductPrice, error)
- func (r *Repository) FindPricesBetween(productId int64, from time.Time, to time.Time, tx *sql.Tx) ([]ProductPrice, error)
Constants ¶
View Source
const ProductPriceTableName = "product_price"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductPrice ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sql.DB) *Repository
func (*Repository) CountPrices ¶
func (*Repository) CreatePrice ¶
func (*Repository) FindLatestPrice ¶
func (r *Repository) FindLatestPrice(productId int64, tx *sql.Tx) (*ProductPrice, error)
func (*Repository) FindPrices ¶
func (r *Repository) FindPrices(productId int64, offset int64, limit int, orderBy, direction string, tx *sql.Tx) ([]ProductPrice, error)
func (*Repository) FindPricesBetween ¶
func (r *Repository) FindPricesBetween(productId int64, from time.Time, to time.Time, tx *sql.Tx) ([]ProductPrice, error)
Click to show internal directories.
Click to hide internal directories.