db

package
v0.0.0-...-56bdf14 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB

Functions

func AcceptRedeemRequest

func AcceptRedeemRequest(id int) bool

func Add

func Add(user User) bool

func AddAwardLog

func AddAwardLog(from string, to string, amount float64) bool

func AddCoins

func AddCoins(rollno string, amt float64) bool

func AddRedeemRequest

func AddRedeemRequest(roll string, item string) bool

func AddTransferLog

func AddTransferLog(from string, to string, amount float64, tax float64) bool

func Clean

func Clean() bool

func CoinCount

func CoinCount(rollno string) float64

func FindPass

func FindPass(rollno string) (string, bool)

func GetRedeemRequest

func GetRedeemRequest(id int) (roll string, item string, status int)

get rollno and item from RedeemRequests table

func IsAdmin

func IsAdmin(rollno string) bool

func MakeAdmin

func MakeAdmin(rollno string) bool

func RejectPendingRedeemRequests

func RejectPendingRedeemRequests(roll string) bool

func RejectRedeemRequest

func RejectRedeemRequest(id int) bool

func RemoveAdmin

func RemoveAdmin(rollno string) bool

func TransferCoins

func TransferCoins(from string, to string, amt float64) bool

func UserExists

func UserExists(rollno string) bool

Types

type User

type User struct {
	Rollno   string
	Name     string
	Password string
	Coins    int
}

Jump to

Keyboard shortcuts

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