Documentation
¶
Index ¶
- type KoFi
- type Matrix
- type Status
- func (s *Status) CheckOverdue()
- func (s *Status) Get(ctx context.Context, server string) (*models.Status, error)
- func (s *Status) GetAll(ctx context.Context) ([]*models.Status, error)
- func (s *Status) GetGlobals(ctx context.Context) ([]*models.GlobalStatus, error)
- func (s *Status) GetServers(ctx context.Context) (subscribable, nonsubscribable []string, err error)
- func (s *Status) SaveGlobalStatus()
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KoFi ¶
type KoFi struct {
// contains filtered or unexported fields
}
KoFi service handles Ko-Fi data
func (*KoFi) AdjustServers ¶
AdjustServers is a cron job that finds transactions without servers and tries to identify their servers
type Matrix ¶
type Matrix struct {
// contains filtered or unexported fields
}
func (*Matrix) NewPayment ¶
NewPayment sends a notice about a new payment
func (*Matrix) OverduePayments ¶
OverduePayments sends a notice about overdue payments of the specified servers
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status service handles servers payment status
func (*Status) CheckOverdue ¶
func (s *Status) CheckOverdue()
CheckOverdue is a cron job that checks for overdue payments
func (*Status) GetGlobals ¶
GetGlobals returns the global status of the system
func (*Status) GetServers ¶
func (s *Status) GetServers(ctx context.Context) (subscribable, nonsubscribable []string, err error)
GetServers returns a list of servers with Ko-Fi subscriptions
func (*Status) SaveGlobalStatus ¶
func (s *Status) SaveGlobalStatus()
SaveGlobalStatus saves the global status of the system for the previous month to the database NOTE: IT IS IMPORTANT TO CALL THIS FUNCTION ON THE FIRST DAY OF THE MONTH (as early as possible)
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction service handles the business logic for transactions
func NewTransaction ¶
func NewTransaction(db *gorm.DB) *Transaction
NewTransaction creates a new transaction service
func (*Transaction) GetAll ¶
func (t *Transaction) GetAll(ctx context.Context, req *models.TransactionsRequest) ([]*models.Transaction, error)