Documentation ¶
Index ¶
- Variables
- func DbController(settingsJson string) bool
- func GenerateToken(header string, payload map[string]string, secret string) (string, error)
- func InitEndPoints() (success bool)
- func ValidateDebitBalance(amount decimal.Decimal, decBalance decimal.Decimal) (bool, error)
- func ValidatePositiveAmount(amount decimal.Decimal) (bool, error)
- func ValidateToken(token string, secret string) (bool, error)
- type Wallet
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DbConn *gorm.DB
)
View Source
var (
Router *gin.Engine
)
Functions ¶
func DbController ¶
Read stting file specified and openthe DB connection of File or Remote DB If tables do not exist in the DB file provided create them.
func GenerateToken ¶ added in v0.1.7
Function for generating the tokens.
func ValidateDebitBalance ¶
Logic to vlaidate the business logic contratints on the wallet balance and amounts
func ValidatePositiveAmount ¶
Non negative vaules only are allowed by this function
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.