repository

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlacklistRepository

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

func NewBlacklistRepository

func NewBlacklistRepository(db *sql.DB) *BlacklistRepository

func (*BlacklistRepository) Count

func (r *BlacklistRepository) Count(msisdn string) (int, error)

type CampaignRepository

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

func NewCampaignRepository

func NewCampaignRepository(db *sql.DB) *CampaignRepository

func (*CampaignRepository) Count

func (r *CampaignRepository) Count(serviceId int, adnet string) (int, error)

func (*CampaignRepository) Update

func (r *CampaignRepository) Update(c *entity.Campaign) error

type ContentRepository

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

func NewContentRepository

func NewContentRepository(db *sql.DB) *ContentRepository

func (*ContentRepository) Get

func (r *ContentRepository) Get(serviceId int, name string) (*entity.Content, error)

type HistoryRepository

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

func NewHistoryRepository

func NewHistoryRepository(db *sql.DB) *HistoryRepository

func (*HistoryRepository) Save

func (r *HistoryRepository) Save(h *entity.History) error

type IBlacklistRepository

type IBlacklistRepository interface {
	Count(string) (int, error)
}

type ICampaignRepository

type ICampaignRepository interface {
	Count(int, string) (int, error)
	Update(*entity.Campaign) error
}

type IContentRepository

type IContentRepository interface {
	Get(int, string) (*entity.Content, error)
}

type IHistoryRepository

type IHistoryRepository interface {
	Save(*entity.History) error
}

type IScheduleRepository

type IScheduleRepository interface {
	CountUnlocked(string, string) (int, error)
	CountLocked(string, string) (int, error)
	Update(*entity.Schedule) error
}

type IServiceRepository

type IServiceRepository interface {
	CountByCategory(string) (int, error)
	CountByCode(string) (int, error)
	GetById(int) (*entity.Service, error)
	GetByCode(string) (*entity.Service, error)
}

type ISubscriptionRepository

type ISubscriptionRepository interface {
	Save(*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
	Count(int, string) (int, error)
	CountActive(int, string) (int, error)
	CountPin(int) (int, error)
	Get(int, string) (*entity.Subscription, error)
	Renewal() (*[]entity.Subscription, error)
	Retry() (*[]entity.Subscription, error)
	Reminder() (*[]entity.Subscription, error)
	AveragePerUser(string, string, string, string) (*[]entity.AveragePerUser, error)
}

type ITransactionRepository

type ITransactionRepository interface {
	Save(*entity.Transaction) error
	Delete(*entity.Transaction) error
	SelectByStatus() (*[]entity.Transaction, error)
	SelectByStatusDetail() (*[]entity.Transaction, error)
	SelectByAdnet() (*[]entity.Transaction, error)
}

type IVIPRepository

type IVIPRepository interface {
	Count(string) (int, error)
}

type IVerifyRepository

type IVerifyRepository interface {
	Save(*entity.Verify) error
	GetByToken(string) (*entity.Verify, error)
}

type ScheduleRepository

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

func NewScheduleRepository

func NewScheduleRepository(db *sql.DB) *ScheduleRepository

func (*ScheduleRepository) CountLocked

func (r *ScheduleRepository) CountLocked(name, hour string) (int, error)

func (*ScheduleRepository) CountUnlocked

func (r *ScheduleRepository) CountUnlocked(name, hour string) (int, error)

func (*ScheduleRepository) Update

func (r *ScheduleRepository) Update(s *entity.Schedule) error

type ServiceRepository

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

func NewServiceRepository

func NewServiceRepository(db *sql.DB) *ServiceRepository

func (*ServiceRepository) CountByCategory

func (r *ServiceRepository) CountByCategory(category string) (int, error)

func (*ServiceRepository) CountByCode

func (r *ServiceRepository) CountByCode(code string) (int, error)

func (*ServiceRepository) GetByCode

func (r *ServiceRepository) GetByCode(code string) (*entity.Service, error)

func (*ServiceRepository) GetById

func (r *ServiceRepository) GetById(id int) (*entity.Service, error)

type SubscriptionRepository

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

func NewSubscriptionRepository

func NewSubscriptionRepository(db *sql.DB) *SubscriptionRepository

func (*SubscriptionRepository) AveragePerUser

func (r *SubscriptionRepository) AveragePerUser(start, end, renewal, subkey string) (*[]entity.AveragePerUser, error)

func (*SubscriptionRepository) Count

func (r *SubscriptionRepository) Count(serviceId int, msisdn string) (int, error)

func (*SubscriptionRepository) CountActive

func (r *SubscriptionRepository) CountActive(serviceId int, msisdn string) (int, error)

func (*SubscriptionRepository) CountPin

func (r *SubscriptionRepository) CountPin(pin int) (int, error)

func (*SubscriptionRepository) Get

func (r *SubscriptionRepository) Get(serviceId int, msisdn string) (*entity.Subscription, error)

func (*SubscriptionRepository) Reminder

func (r *SubscriptionRepository) Reminder() (*[]entity.Subscription, error)

func (*SubscriptionRepository) Renewal

func (r *SubscriptionRepository) Renewal() (*[]entity.Subscription, error)

func (*SubscriptionRepository) Retry

func (*SubscriptionRepository) Save

func (*SubscriptionRepository) UpdateConfirm

func (r *SubscriptionRepository) UpdateConfirm(s *entity.Subscription) error

func (*SubscriptionRepository) UpdateDisable

func (r *SubscriptionRepository) UpdateDisable(s *entity.Subscription) error

func (*SubscriptionRepository) UpdateEnable

func (r *SubscriptionRepository) UpdateEnable(s *entity.Subscription) error

func (*SubscriptionRepository) UpdateFailed

func (r *SubscriptionRepository) UpdateFailed(s *entity.Subscription) error

func (*SubscriptionRepository) UpdateLatest

func (r *SubscriptionRepository) UpdateLatest(s *entity.Subscription) error

func (*SubscriptionRepository) UpdateSuccess

func (r *SubscriptionRepository) UpdateSuccess(s *entity.Subscription) error

type TransactionRepository

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

func NewTransactionRepository

func NewTransactionRepository(db *sql.DB) *TransactionRepository

func (*TransactionRepository) Delete

func (*TransactionRepository) Save

func (*TransactionRepository) SelectByAdnet

func (r *TransactionRepository) SelectByAdnet() (*[]entity.Transaction, error)

func (*TransactionRepository) SelectByStatus

func (r *TransactionRepository) SelectByStatus() (*[]entity.Transaction, error)

func (*TransactionRepository) SelectByStatusDetail

func (r *TransactionRepository) SelectByStatusDetail() (*[]entity.Transaction, error)

type VIPRepository

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

func NewVIPRepository

func NewVIPRepository(db *sql.DB) *VIPRepository

func (*VIPRepository) Count

func (r *VIPRepository) Count(msisdn string) (int, error)

type VerifyRepository

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

func NewVerifyRepository

func NewVerifyRepository(db *sql.DB) *VerifyRepository

func (*VerifyRepository) GetByToken

func (r *VerifyRepository) GetByToken(token string) (*entity.Verify, error)

func (*VerifyRepository) Save

func (r *VerifyRepository) Save(t *entity.Verify) error

Jump to

Keyboard shortcuts

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