handlers

package
v0.0.0-...-217dc0b Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRouter

func GetRouter(inCloud bool) *mux.Router

GetRouter get reference to HTTP router

func GetTransactionsHandler

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

GetTransactionsHandler get list of transactions

func SetInCloud

func SetInCloud(isInCloud bool)

func TemplatePageHandler

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

TemplatePageHandler use template collection to produce output

Types

type PageData

type PageData struct {
	Timestamp     time.Time
	LoadStart     time.Time
	LoadTime      time.Duration
	PageLoads     uint64
	Uptime        time.Duration
	CsrfToken     string
	IPAddress     string
	ServerAddress string
}

PageData data for a page's templates Capitalized because it is used in templates and needs to be public

type Transaction

type Transaction struct {
	ID                  int    `json:"id"`
	Amount              int    `json:"amount"`
	MessageType         string `json:"conversation_type"`
	CreatedAt           string `json:"created_at"`
	TransactionID       int    `json:"transaction_id"`
	TransactionCategory string `json:"transaction_category"`
	PostedTimeStamp     string `json:"posted_timestamp"`
	TransactionType     string `json:"transaction_type"`
	SendingAccount      int    `json:"sending_account"`
	ReceivingAccount    int    `json:"receiving_account"`
	TransactionNote     string `json:"transaction_note"`
}

Transaction a transaction with attributes

type TransactionList

type TransactionList struct {
	Transactions []Transaction `json:"transactions"`
}

TransactionList a list of transactions. Allows for JSON list to be read

Jump to

Keyboard shortcuts

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