repository

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cashback

type Cashback struct {
	Pool   storage.Pooler
	Logger *zap.Logger
}

func (*Cashback) Add

func (c *Cashback) Add(cashback model.Cashback) *model.TechnicalError

type CashbackPersister

type CashbackPersister interface {
	Add(cashback model.Cashback) *model.TechnicalError
}

func NewCashback

func NewCashback(c Cashback) CashbackPersister

type H2H

type H2H struct {
	Pool   storage.Pooler
	Logger *zap.Logger
}

func (*H2H) Pricelists

func (h2h *H2H) Pricelists() ([]model.H2HPricingsProjection, *model.TechnicalError)

func (*H2H) Providers

func (h2h *H2H) Providers() ([]model.H2HProvider, *model.TechnicalError)

type H2HPersister

type H2HPersister interface {
	Providers() ([]model.H2HProvider, *model.TechnicalError)
	Pricelists() ([]model.H2HPricingsProjection, *model.TechnicalError)
}

func NewH2H

func NewH2H(h2h H2H) H2HPersister

type ParamPersister

type ParamPersister interface {
	FindByParamGroup(g string) ([]*model.Parameter, *model.TechnicalError)
}

func NewParameter

func NewParameter(p Parameter) ParamPersister

type Parameter

type Parameter struct {
	Pool   storage.Pooler
	Logger *zap.Logger
}

func (*Parameter) FindByParamGroup

func (p *Parameter) FindByParamGroup(g string) ([]*model.Parameter, *model.TechnicalError)

type Partner

type Partner struct {
	Pool   storage.Pooler
	Logger *zap.Logger
}

func (*Partner) Add

func (p *Partner) Add(data model.Partner) *model.TechnicalError

func (*Partner) CountByIdentifier

func (p *Partner) CountByIdentifier(data model.Partner) (*int, *model.TechnicalError)

func (*Partner) FindActiveByCodeAndApiKey

func (p *Partner) FindActiveByCodeAndApiKey(code string, key string) (*model.Partner, *model.TechnicalError)

func (*Partner) FindActiveByEmail

func (p *Partner) FindActiveByEmail(email string) (*model.Partner, *model.TechnicalError)

type PartnerPersister

type PartnerPersister interface {
	Add(m model.Partner) *model.TechnicalError
	CountByIdentifier(m model.Partner) (*int, *model.TechnicalError)
	FindActiveByCodeAndApiKey(code string, key string) (*model.Partner, *model.TechnicalError)
	FindActiveByEmail(email string) (*model.Partner, *model.TechnicalError)
}

func NewPartner

func NewPartner(p Partner) PartnerPersister

type Tier

type Tier struct {
	Pool   storage.Pooler
	Logger *zap.Logger
}

func (*Tier) Add

func (t *Tier) Add(tier model.Tier) *model.TechnicalError

func (*Tier) CountExpire

func (t *Tier) CountExpire() (*int, *model.TechnicalError)

func (*Tier) Expire

func (t *Tier) Expire(expired time.Time) *model.TechnicalError

func (*Tier) FindByPartnerMsisdn

func (t *Tier) FindByPartnerMsisdn(pid int64, msisdn string) (*model.Tier, *model.TechnicalError)

func (*Tier) Update

func (t *Tier) Update(tier model.Tier) *model.TechnicalError

type TierPersister

type TierPersister interface {
	FindByPartnerMsisdn(pid int64, msisdn string) (*model.Tier, *model.TechnicalError)
	Add(tier model.Tier) *model.TechnicalError
	Update(tier model.Tier) *model.TechnicalError
	Expire(expired time.Time) *model.TechnicalError
	CountExpire() (*int, *model.TechnicalError)
}

func NewTier

func NewTier(t Tier) TierPersister

type Transaction

type Transaction struct {
	Pool   storage.Pooler
	Logger *zap.Logger
}

func (*Transaction) Add

func (*Transaction) CountByPartner

func (t *Transaction) CountByPartner(inp *model.SearchRequest) (*int, *model.TechnicalError)

func (*Transaction) DetailByPartner

func (*Transaction) SearchByPartner

type TransactionPersister

type TransactionPersister interface {
	Add(trx model.Transaction) (*int64, *model.TechnicalError)
	SearchByPartner(inp *model.SearchRequest) ([]model.PartnerTransactionProjection, *model.TechnicalError)
	CountByPartner(inp *model.SearchRequest) (*int, *model.TechnicalError)
	DetailByPartner(inp *model.FindByIdRequest) (*model.PartnerTransactionProjection, *model.TechnicalError)
}

func NewTransaction

func NewTransaction(t Transaction) TransactionPersister

type Workflow

type Workflow struct {
	Pool   storage.Pooler
	Logger *zap.Logger
}

func (*Workflow) FindCashbackByTransaction

func (w *Workflow) FindCashbackByTransaction(qty int, trx decimal.Decimal) (*decimal.Decimal, *model.TechnicalError)

func (*Workflow) FindRewardTiers

func (w *Workflow) FindRewardTiers() ([]model.WfRewardTierProjection, *model.TechnicalError)

type WorkflowPersister

type WorkflowPersister interface {
	FindCashbackByTransaction(qty int, trx decimal.Decimal) (*decimal.Decimal, *model.TechnicalError)
	FindRewardTiers() ([]model.WfRewardTierProjection, *model.TechnicalError)
}

func NewWorkflow

func NewWorkflow(w Workflow) WorkflowPersister

Jump to

Keyboard shortcuts

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