controllers

package
v0.0.0-...-8678cf8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BAD_REQUEST_CUSTOM = 422

Variables

This section is empty.

Functions

func AddAmount

func AddAmount(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

http handler AddAmount

func GetBalance

func GetBalance(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

http handler GetBalance

func TransferAmount

func TransferAmount(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

http handler TransferAmount

func WithdrawAmount

func WithdrawAmount(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

http handler WithdrawAmount

Types

type BalanceResponse

type BalanceResponse struct {
	Balance int `json:"balance"`
}

type InputRequest

type InputRequest struct {
	Amount  int `json:"amount"`
	UserId  int `json:"user"`
	FromUid int `json:"from"`
	ToUid   int `json:"to"`
}

type UserBalanceController

type UserBalanceController struct {
	Request  *http.Request
	Response http.ResponseWriter
	HttpLib
}

Jump to

Keyboard shortcuts

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