services

package
v0.0.0-...-d2439cc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlacklistService

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

func NewBlacklistService

func NewBlacklistService(blacklistRepo repository.IBlacklistRepository) *BlacklistService

func (*BlacklistService) GetBlacklist

func (s *BlacklistService) GetBlacklist(msisdn string) bool

type CampaignService

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

func NewCampaignService

func NewCampaignService(campaignRepo repository.ICampaignRepository) *CampaignService

func (*CampaignService) GetCampaign

func (s *CampaignService) GetCampaign(serviceId int, adnet string) bool

func (*CampaignService) UpdateCampaign

func (s *CampaignService) UpdateCampaign(serviceId int, adnet string) error

type ContentService

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

func NewContentService

func NewContentService(contentRepo repository.IContentRepository) *ContentService

func (*ContentService) GetContent

func (s *ContentService) GetContent(serviceId int, name string, pin int) (*entity.Content, error)

type HistoryService

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

func NewHistoryService

func NewHistoryService(transactionRepo repository.IHistoryRepository) *HistoryService

func (*HistoryService) SaveHistory

func (s *HistoryService) SaveHistory(t *entity.History) error

type IBlacklistService

type IBlacklistService interface {
	GetBlacklist(msisdn string) bool
}

type ICampaignService

type ICampaignService interface {
	GetCampaign(int, string) bool
	UpdateCampaign(int, string) error
}

type IContentService

type IContentService interface {
	GetContent(int, string, int) (*entity.Content, error)
}

type IHistoryService

type IHistoryService interface {
	SaveHistory(*entity.History) error
}

type IScheduleService

type IScheduleService interface {
	GetLocked(string, string) bool
	GetUnlocked(string, string) bool
	UpdateSchedule(bool, string)
}

type IServiceService

type IServiceService interface {
	CheckService(string) bool
	GetServiceId(int) (*entity.Service, error)
	GetServiceByCode(string) (*entity.Service, error)
}

type ISubscriptionService

type ISubscriptionService interface {
	GetActiveSubscription(int, string) bool
	GetSubscription(int, string) bool
	GetPinSubscription(int) bool
	SaveSubscription(*entity.Subscription) error
	UpdateSuccess(*entity.Subscription) error
	UpdateFailed(*entity.Subscription) error
	UpdateLatest(*entity.Subscription) error
	UpdateEnable(*entity.Subscription) error
	UpdateDisable(*entity.Subscription) error
	UpdateConfirm(*entity.Subscription) error
	ReminderSubscription() *[]entity.Subscription
	RenewalSubscription() *[]entity.Subscription
	RetrySubscription() *[]entity.Subscription
	AveragePerUser(string, string, string, string) (*[]entity.AveragePerUserResponse, error)
}

type ITransactionService

type ITransactionService interface {
	SaveTransaction(*entity.Transaction) error
	UpdateTransaction(*entity.Transaction) error
	GroupByStatusTransaction() (*[]entity.Transaction, error)
	GroupByStatusDetailTransaction() (*[]entity.Transaction, error)
	GroupByAdnetTransaction() (*[]entity.Transaction, error)
}

type IVIPService

type IVIPService interface {
	GetVIP(string) bool
}

type IVerifyService

type IVerifyService interface {
	SaveVerify(*entity.Verify) error
	GetVerifyByToken(string) (*entity.Verify, error)
}

type ScheduleService

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

func NewScheduleService

func NewScheduleService(scheduleRepo repository.IScheduleRepository) *ScheduleService

func (*ScheduleService) GetLocked

func (s *ScheduleService) GetLocked(name string, hour string) bool

func (*ScheduleService) GetUnlocked

func (s *ScheduleService) GetUnlocked(name string, hour string) bool

func (*ScheduleService) UpdateSchedule

func (s *ScheduleService) UpdateSchedule(unlocked bool, name string)

type ServiceService

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

func NewServiceService

func NewServiceService(serviceRepo repository.IServiceRepository) *ServiceService

func (*ServiceService) CheckService

func (s *ServiceService) CheckService(category string) bool

func (*ServiceService) GetServiceByCode

func (s *ServiceService) GetServiceByCode(code string) (*entity.Service, error)

func (*ServiceService) GetServiceId

func (s *ServiceService) GetServiceId(id int) (*entity.Service, error)

type SubscriptionService

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

func NewSubscriptionService

func NewSubscriptionService(subscriptionRepo repository.ISubscriptionRepository) *SubscriptionService

func (*SubscriptionService) AveragePerUser

func (s *SubscriptionService) AveragePerUser(start, end, renewal, service string) (*[]entity.AveragePerUserResponse, error)

func (*SubscriptionService) GetActiveSubscription

func (s *SubscriptionService) GetActiveSubscription(serviceId int, msisdn string) bool

func (*SubscriptionService) GetPinSubscription

func (s *SubscriptionService) GetPinSubscription(pin int) bool

func (*SubscriptionService) GetSubscription

func (s *SubscriptionService) GetSubscription(serviceId int, msisdn string) bool

func (*SubscriptionService) ReminderSubscription

func (s *SubscriptionService) ReminderSubscription() *[]entity.Subscription

func (*SubscriptionService) RenewalSubscription

func (s *SubscriptionService) RenewalSubscription() *[]entity.Subscription

func (*SubscriptionService) RetrySubscription

func (s *SubscriptionService) RetrySubscription() *[]entity.Subscription

func (*SubscriptionService) SaveSubscription

func (s *SubscriptionService) SaveSubscription(sub *entity.Subscription) error

func (*SubscriptionService) UpdateConfirm

func (s *SubscriptionService) UpdateConfirm(sub *entity.Subscription) error

func (*SubscriptionService) UpdateDisable

func (s *SubscriptionService) UpdateDisable(sub *entity.Subscription) error

func (*SubscriptionService) UpdateEnable

func (s *SubscriptionService) UpdateEnable(sub *entity.Subscription) error

func (*SubscriptionService) UpdateFailed

func (s *SubscriptionService) UpdateFailed(sub *entity.Subscription) error

func (*SubscriptionService) UpdateLatest

func (s *SubscriptionService) UpdateLatest(sub *entity.Subscription) error

func (*SubscriptionService) UpdateSuccess

func (s *SubscriptionService) UpdateSuccess(sub *entity.Subscription) error

type TransactionService

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

func NewTransactionService

func NewTransactionService(transactionRepo repository.ITransactionRepository) *TransactionService

func (*TransactionService) GroupByAdnetTransaction

func (s *TransactionService) GroupByAdnetTransaction() (*[]entity.Transaction, error)

func (*TransactionService) GroupByStatusDetailTransaction

func (s *TransactionService) GroupByStatusDetailTransaction() (*[]entity.Transaction, error)

func (*TransactionService) GroupByStatusTransaction

func (s *TransactionService) GroupByStatusTransaction() (*[]entity.Transaction, error)

func (*TransactionService) SaveTransaction

func (s *TransactionService) SaveTransaction(t *entity.Transaction) error

func (*TransactionService) UpdateTransaction

func (s *TransactionService) UpdateTransaction(t *entity.Transaction) error

type VIPService

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

func NewVIPService

func NewVIPService(vipRepo repository.IVIPRepository) *VIPService

func (*VIPService) GetVIP

func (s *VIPService) GetVIP(msisdn string) bool

type VerifyService

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

func NewVerifyService

func NewVerifyService(verifyRepo repository.IVerifyRepository) *VerifyService

func (*VerifyService) GetVerifyByToken

func (s *VerifyService) GetVerifyByToken(token string) (*entity.Verify, error)

func (*VerifyService) SaveVerify

func (s *VerifyService) SaveVerify(t *entity.Verify) error

Jump to

Keyboard shortcuts

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