Documentation ¶
Index ¶
- func AcceptRedeem(id int, adminRollNo string) error
- func AddCoins(rollNo string, coins int, remarks string) (string, error)
- func CalculateTransferTax(fromRollNo string, toRollNo string, numCoins int) (int, error)
- func Create(rollNo string, hashedPasssword string, name string) error
- func DeleteRefreshToken(rollNo string) error
- func GetCoinBalanceByRollNo(rollNo string) (int, error)
- func GetNameByRollNo(rollNo string) (string, error)
- func GetRefreshToken(rollNo string) (string, error)
- func GetStoredPassword(rollNo string) (string, error)
- func GetWalletHistoryByRollNo(rollNo string) ([]interface{}, error)
- func InvalidateAllRefreshTokens() error
- func IsAdmin(rollNo string) (bool, error)
- func NewRedeem(rollNo string, numCoins int, item string) (string, error)
- func RejectRedeem(id int, adminRollNo string) error
- func TransferCoins(fromRollNo string, toRollNo string, numCoins int, remarks string) (string, error)
- func UpdatePassword(rollNo string, hashedPasssword string) error
- func UpdateRefreshToken(token string, rollNo string) error
- func UserExists(rollNo string) (bool, error)
- func ValidatePassword(password string) error
- func ValidateRollNo(rollNo string) error
- type RedeemHistory
- type RedeemRequest
- type RedeemStatus
- type RewardHistory
- type Role
- type TransactionType
- type TransferHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptRedeem ¶
func CalculateTransferTax ¶
func DeleteRefreshToken ¶
func GetCoinBalanceByRollNo ¶
func GetNameByRollNo ¶
func GetRefreshToken ¶
func GetStoredPassword ¶
func InvalidateAllRefreshTokens ¶
func InvalidateAllRefreshTokens() error
func RejectRedeem ¶
func TransferCoins ¶
func UpdatePassword ¶
func UpdateRefreshToken ¶
func UserExists ¶
func ValidatePassword ¶
func ValidateRollNo ¶
Types ¶
type RedeemHistory ¶
type RedeemHistory struct { Type TransactionType `json:"type"` Time int `json:"timeStamp"` Id string `json:"txnID"` Amount int `json:"amount"` Item string `json:"item"` Status RedeemStatus `json:"status"` ActionByRollNo string `json:"actionByRollNo"` Name string `json:"name"` }
type RedeemRequest ¶
type RedeemRequest struct { RollNo string `field:"rollNo"` Id string `field:"id"` NumCoins int `field:"coins"` Time int `field:"time"` Item string `field:"item"` Status RedeemStatus `field:"status"` ActionByRollNo string `field:"actionByRollNo"` }
func GetRedeemListByRollNo ¶
func GetRedeemListByRollNo(rollNo string) ([]RedeemRequest, error)
type RedeemStatus ¶
type RedeemStatus string
const ( Pending RedeemStatus = "PENDING" Cancelled RedeemStatus = "CANCELLED" Approved RedeemStatus = "APPROVED" Rejected RedeemStatus = "REJECTED" )
type RewardHistory ¶
type RewardHistory struct { Type TransactionType `json:"type"` Time int `json:"timeStamp"` Id string `json:"txnID"` Amount int `json:"amount"` Remarks string `json:"remarks"` }
type TransactionType ¶
type TransactionType string
const ( REDEEM TransactionType = "REDEEM" REWARD TransactionType = "REWARD" TRANSFER TransactionType = "TRANSFER" )
type TransferHistory ¶
Click to show internal directories.
Click to hide internal directories.