Versions in this module Expand all Collapse all v1 v1.0.0 Jan 8, 2023 Changes in this version + type Cashback struct + Logger *zap.Logger + Pool storage.Pooler + func (c *Cashback) Add(cashback model.Cashback) *model.TechnicalError + type CashbackPersister interface + Add func(cashback model.Cashback) *model.TechnicalError + func NewCashback(c Cashback) CashbackPersister + type H2H struct + Logger *zap.Logger + Pool storage.Pooler + func (h2h *H2H) Pricelists() ([]model.H2HPricingsProjection, *model.TechnicalError) + func (h2h *H2H) Providers() ([]model.H2HProvider, *model.TechnicalError) + type H2HPersister interface + Pricelists func() ([]model.H2HPricingsProjection, *model.TechnicalError) + Providers func() ([]model.H2HProvider, *model.TechnicalError) + func NewH2H(h2h H2H) H2HPersister + type ParamPersister interface + FindByParamGroup func(g string) ([]*model.Parameter, *model.TechnicalError) + func NewParameter(p Parameter) ParamPersister + type Parameter struct + Logger *zap.Logger + Pool storage.Pooler + func (p *Parameter) FindByParamGroup(g string) ([]*model.Parameter, *model.TechnicalError) + type Partner struct + Logger *zap.Logger + Pool storage.Pooler + func (p *Partner) Add(data model.Partner) *model.TechnicalError + func (p *Partner) CountByIdentifier(data model.Partner) (*int, *model.TechnicalError) + func (p *Partner) FindActiveByCodeAndApiKey(code string, key string) (*model.Partner, *model.TechnicalError) + func (p *Partner) FindActiveByEmail(email string) (*model.Partner, *model.TechnicalError) + type PartnerPersister interface + Add func(m model.Partner) *model.TechnicalError + CountByIdentifier func(m model.Partner) (*int, *model.TechnicalError) + FindActiveByCodeAndApiKey func(code string, key string) (*model.Partner, *model.TechnicalError) + FindActiveByEmail func(email string) (*model.Partner, *model.TechnicalError) + func NewPartner(p Partner) PartnerPersister + type Tier struct + Logger *zap.Logger + Pool storage.Pooler + func (t *Tier) Add(tier model.Tier) *model.TechnicalError + func (t *Tier) CountExpire() (*int, *model.TechnicalError) + func (t *Tier) Expire(expired time.Time) *model.TechnicalError + func (t *Tier) FindByPartnerMsisdn(pid int64, msisdn string) (*model.Tier, *model.TechnicalError) + func (t *Tier) Update(tier model.Tier) *model.TechnicalError + type TierPersister interface + Add func(tier model.Tier) *model.TechnicalError + CountExpire func() (*int, *model.TechnicalError) + Expire func(expired time.Time) *model.TechnicalError + FindByPartnerMsisdn func(pid int64, msisdn string) (*model.Tier, *model.TechnicalError) + Update func(tier model.Tier) *model.TechnicalError + func NewTier(t Tier) TierPersister + type Transaction struct + Logger *zap.Logger + Pool storage.Pooler + func (t *Transaction) Add(trx model.Transaction) (*int64, *model.TechnicalError) + func (t *Transaction) CountByPartner(inp *model.SearchRequest) (*int, *model.TechnicalError) + func (t *Transaction) DetailByPartner(inp *model.FindByIdRequest) (*model.PartnerTransactionProjection, *model.TechnicalError) + func (t *Transaction) SearchByPartner(inp *model.SearchRequest) ([]model.PartnerTransactionProjection, *model.TechnicalError) + type TransactionPersister interface + Add func(trx model.Transaction) (*int64, *model.TechnicalError) + CountByPartner func(inp *model.SearchRequest) (*int, *model.TechnicalError) + DetailByPartner func(inp *model.FindByIdRequest) (*model.PartnerTransactionProjection, *model.TechnicalError) + SearchByPartner func(inp *model.SearchRequest) ([]model.PartnerTransactionProjection, *model.TechnicalError) + func NewTransaction(t Transaction) TransactionPersister + type Workflow struct + Logger *zap.Logger + Pool storage.Pooler + func (w *Workflow) FindCashbackByTransaction(qty int, trx decimal.Decimal) (*decimal.Decimal, *model.TechnicalError) + func (w *Workflow) FindRewardTiers() ([]model.WfRewardTierProjection, *model.TechnicalError) + type WorkflowPersister interface + FindCashbackByTransaction func(qty int, trx decimal.Decimal) (*decimal.Decimal, *model.TechnicalError) + FindRewardTiers func() ([]model.WfRewardTierProjection, *model.TechnicalError) + func NewWorkflow(w Workflow) WorkflowPersister