routes

package
v0.0.0-...-5fc34b3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddItems

func AddItems(rw http.ResponseWriter, req *http.Request)

AH-GenSec Only Endpoint to insert Items POST: name-string, value-int & Authentication Bearer Header

func ApproveRedeemRequest

func ApproveRedeemRequest(rw http.ResponseWriter, req *http.Request)

AH-GenSec Only Endpoint to Accept request post: id-int & Authentication Bearer Header

func ForgotPass

func ForgotPass(rw http.ResponseWriter, req *http.Request)

Endpoint to signup POST: Roll-int, OTP-string, Password-string

func ForgotPassOTP

func ForgotPassOTP(rw http.ResponseWriter, req *http.Request)

Endpoint to get OTP for Password POST: Roll-int, Email-string

func GetClaims

func GetClaims(reqToken string, rw http.ResponseWriter) (*c.Claims, bool)

func Hello

func Hello(res http.ResponseWriter, req *http.Request)

Greeting page on homepage

func ListItems

func ListItems(rw http.ResponseWriter, _ *http.Request)

Endpoint to View all Items GET aiwehi

func ListRedeemRequest

func ListRedeemRequest(rw http.ResponseWriter, req *http.Request)

AH-GenSec Only Endpoint to View Req GET: Authentication Bearer Header

func Login

func Login(rw http.ResponseWriter, req *http.Request)

Endpoint to signin POST: Roll-int, Password-string

func OTPforRedeem

func OTPforRedeem(rw http.ResponseWriter, req *http.Request)

Endpoint accessible by all to get otp for Redeeming coins POST: Authentication Bearer Header

func OTPforTransfer

func OTPforTransfer(rw http.ResponseWriter, req *http.Request)

Endpoint accessible by all to get otp for transfering coins POST: Authentication Bearer Header

func RedeemRequest

func RedeemRequest(rw http.ResponseWriter, req *http.Request)

Endpoint to Request a Redeem POST: itemNo-int & Authentication Bearer Header

func RejectRedeemRequest

func RejectRedeemRequest(rw http.ResponseWriter, req *http.Request)

AH-GenSec Only Endpoint to reject request post: id-int & Authentication Bearer Header

func RemoveItems

func RemoveItems(rw http.ResponseWriter, req *http.Request)

AH-GenSec Only Endpoint to Delete Items POST: itemNo-int & Authentication Bearer Header

func Reward

func Reward(rw http.ResponseWriter, req *http.Request)

Endpoint only accessible by Gensec AH POST: Roll-int, Coins-int & Authentication Bearer Header

func Rsp

func Rsp(err string, message string) []byte

Write a response in JSON format

func RspToken

func RspToken(err string, message string, jwt string) []byte

Write json with a token

func SecretPage

func SecretPage(rw http.ResponseWriter, r *http.Request)

Endpoint to verify Login GET: Authentication Bearer Header

func SignUp

func SignUp(rw http.ResponseWriter, req *http.Request)

Endpoint to signup POST: Roll-int, Name-string, Email-string, OTP-string, Password-string, Batch-int

func SignUpOTP

func SignUpOTP(rw http.ResponseWriter, req *http.Request)

Endpoint to get OTP for signup POST: Roll-int, Name-string, Email-string

func Transfer

func Transfer(rw http.ResponseWriter, req *http.Request)

Endpoint accessible by all to transfer coins POST: roll-int, coins-int, otp-string & Authentication Bearer Header

func ValidateTransfer

func ValidateTransfer(x *c.Wallet) string

func View

func View(rw http.ResponseWriter, r *http.Request)

Endpoint to get User's Info GET: Authentication Bearer Header

func ViewRedeem

func ViewRedeem(rw http.ResponseWriter, r *http.Request)

Endpoint to get User's Redeem GET: Authentication Bearer Header

func ViewReward

func ViewReward(rw http.ResponseWriter, r *http.Request)

Endpoint to get User's Reward GET: Authentication Bearer Header

func ViewTransaction

func ViewTransaction(rw http.ResponseWriter, r *http.Request)

Endpoint to get User's Transaction GET: Authentication Bearer Header

Types

This section is empty.

Jump to

Keyboard shortcuts

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