dashboard

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMultiTemplate

func GenerateMultiTemplate() multitemplate.Renderer

func TimeFormatter

func TimeFormatter(t time.Time) string

Types

type Env

type Env struct {
	Db *gorm.DB
}

func (*Env) GetTransactionbyID

func (e *Env) GetTransactionbyID(c *gin.Context)

type MerchantTransactions

type MerchantTransactions struct {
	PurchaseAmount         float32 `json:"purchase_amount"`
	AllTransactions        int     `json:"purchases_count"`
	SuccessfulTransactions int     `json:"successful_transactions"`
	FailedTransactions     int     `json:"failed_transactions"`
}

func (*MerchantTransactions) MarshalBinary

func (p *MerchantTransactions) MarshalBinary() ([]byte, error)

To allow Redis to use this struct directly in marshaling

func (*MerchantTransactions) UnmarshalBinary

func (p *MerchantTransactions) UnmarshalBinary(data []byte) error

To allow Redis to use this struct directly in marshaling

type SearchModel

type SearchModel struct {
	Page       int    `form:"page"`
	TerminalID string `form:"tid" binding:"required"`
}

type Service

type Service struct {
	Redis *redis.Client
	Db    *gorm.DB
}

func (*Service) BrowserDashboard

func (s *Service) BrowserDashboard(c *gin.Context)

func (*Service) DailySettlement

func (s *Service) DailySettlement(c *gin.Context)

This endpoint is highly experimental. It has many security issues and it is only used by us for testing and prototyping only. YOU HAVE TO USE PROPER AUTHENTICATION system if you decide to go with it. See apigateway package if you are interested. DEPRECATED as it is not being used and needs proper maintainance

func (*Service) GetAll

func (s *Service) GetAll(c *gin.Context)

func (*Service) GetID

func (s *Service) GetID(c *gin.Context)

GetID gets a transaction by its database ID.

func (*Service) IndexPage

func (s *Service) IndexPage(c *gin.Context)

func (*Service) MakeDummyTransaction

func (s *Service) MakeDummyTransaction(c *gin.Context)

func (*Service) MerchantTransactionsEndpoint

func (s *Service) MerchantTransactionsEndpoint(c *gin.Context)

func (*Service) MerchantViews

func (s *Service) MerchantViews(c *gin.Context)

MerchantViews deprecated in favor of using the react-based dashboard features.

func (*Service) QRStatus

func (s *Service) QRStatus(c *gin.Context)

func (*Service) ReportIssueEndpoint

func (s *Service) ReportIssueEndpoint(c *gin.Context)

func (*Service) Stream

func (s *Service) Stream(c *gin.Context)

func (*Service) TransactionByTid

func (s *Service) TransactionByTid(c *gin.Context)

func (*Service) TransactionsCount

func (s *Service) TransactionsCount(c *gin.Context)

Jump to

Keyboard shortcuts

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