apiv1

package
v0.0.0-...-91c277e Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SigningKey = []byte("AllYourBase")

Functions

func CreateAccountType

func CreateAccountType(w http.ResponseWriter, r *http.Request)

func GetAccountTypes

func GetAccountTypes(w http.ResponseWriter, r *http.Request)

func GetAccounts

func GetAccounts(w http.ResponseWriter, r *http.Request)

func GetCategories

func GetCategories(w http.ResponseWriter, r *http.Request)

func GetToken

func GetToken(w http.ResponseWriter, r *http.Request)

func GetTransactions

func GetTransactions(w http.ResponseWriter, r *http.Request)

func GetUsers

func GetUsers(w http.ResponseWriter, r *http.Request)

func WireUpRoutes

func WireUpRoutes(router *mux.Router)

Types

type AccountTypeRequest

type AccountTypeRequest struct {
	Label    string `json:"label"`
	IsGlobal bool   `json:"is_global"`
}

type ApiClaims

type ApiClaims struct {
	Username string `json:"user"`
	UserID   uint   `json:"user_id"`
	jwt.StandardClaims
}

type LoginMessage

type LoginMessage struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Response

type Response struct {
	Success     bool        `json:"success"`
	ErrMsg      string      `json:"err_msg"`
	ApiEndpoint string      `json:"api_endpoint"`
	Payload     interface{} `json:"payload"`
}

type ReturnToken

type ReturnToken struct {
	Token  string `json:"token"`
	Expiry int64  `json:"expiry"`
}

Jump to

Keyboard shortcuts

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