handlers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Code generated for package handlers by go-bindata DO NOT EDIT. (@generated) sources: delete_account.cyp delete_tx.cyp get_account.cyp get_accounts_tree.cyp get_tx.cyp get_tx_list.cyp patch_account.cyp patch_tx.cyp post_account.cyp post_tx.cyp put_account.cyp put_tx.cyp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func CreateAccount

func CreateAccount() http.HandlerFunc

func CreateTransaction

func CreateTransaction() http.HandlerFunc

func DeleteAccount

func DeleteAccount() http.HandlerFunc

func DeleteNode

func DeleteNode(w http.ResponseWriter, r *http.Request, deleteQuery string, params map[string]interface{})

func DeleteRelationship

func DeleteRelationship(w http.ResponseWriter, r *http.Request, deleteQuery string, params map[string]interface{})

func DeleteTransaction

func DeleteTransaction() http.HandlerFunc

func GetAccount

func GetAccount() http.HandlerFunc

func GetAccountTree

func GetAccountTree() http.HandlerFunc

func GetNode

func GetNode(w http.ResponseWriter, r *http.Request, getQuery string, params map[string]interface{}, nodeToResponseMapper func(neo4j.Record) (interface{}, error))

func GetTransaction

func GetTransaction() http.HandlerFunc

func GetTransactionList

func GetTransactionList() http.HandlerFunc

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func PatchAccount

func PatchAccount() http.HandlerFunc

func PatchNode

func PatchNode(w http.ResponseWriter, r *http.Request, patchQuery string, params map[string]interface{}, nodeToResponseMapper func(neo4j.Record) (interface{}, error))

func PatchTransaction

func PatchTransaction() http.HandlerFunc

func PostNode

func PostNode(w http.ResponseWriter, r *http.Request, postQuery string, params map[string]interface{}, nodeToResponseMapper func(neo4j.Record) (interface{}, error))

func PutNode

func PutNode(w http.ResponseWriter, r *http.Request, patchQuery string, params map[string]interface{}, nodeToResponseMapper func(neo4j.Record) (interface{}, error))

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func UpdateAccount

func UpdateAccount() http.HandlerFunc

func UpdateTransaction

func UpdateTransaction() http.HandlerFunc

Types

type DeleteAccountRequest

type DeleteAccountRequest struct {
	ID string `path:"ID,required"`
}

type DeleteTransactionRequest

type DeleteTransactionRequest struct {
	ID string `path:"ID,required"`
}

type GetAccountData

type GetAccountData struct {
	ID        string     `json:"id" yaml:"id"`
	CreatedOn time.Time  `json:"createdOn" yaml:"createdOn"`
	UpdatedOn *time.Time `json:"updatedOn" yaml:"updatedOn"`
	Name      string     `json:"name" yaml:"name"`
}

type GetAccountRequest

type GetAccountRequest struct {
	ID string `path:"ID,required"`
}

type GetAccountResponse

type GetAccountResponse struct {
	Account GetAccountData `json:"data"`
}

type GetAccountTreeData

type GetAccountTreeData struct {
	GetAccountData
	IncomingTx float64               `json:"incomingTx" yaml:"incomingTx"`
	OutgoingTx float64               `json:"outgoingTx" yaml:"outgoingTx"`
	Balance    float64               `json:"balance" yaml:"balance"`
	Children   []*GetAccountTreeData `json:"children" yaml:"children"`
}

type GetAccountTreeRequest

type GetAccountTreeRequest struct{}

type GetAccountTreeResponse

type GetAccountTreeResponse struct {
	Accounts []*GetAccountTreeData `json:"data"`
}

type GetTransactionListItemData

type GetTransactionListItemData struct {
	ID              string     `json:"id" yaml:"id"`
	CreatedOn       time.Time  `json:"createdOn" yaml:"createdOn"`
	UpdatedOn       *time.Time `json:"updatedOn" yaml:"updatedOn"`
	IssuedOn        time.Time  `json:"issuedOn" yaml:"issuedOn"`
	Origin          string     `json:"origin" yaml:"origin"`
	SourceAccountID string     `json:"sourceAccountId" yaml:"sourceAccountId"`
	TargetAccountID string     `json:"targetAccountId" yaml:"targetAccountId"`
	Amount          float64    `json:"amount" yaml:"amount"`
	Comment         string     `json:"comment" yaml:"comment"`
}

type GetTransactionListRequest

type GetTransactionListRequest struct {
	util.Paging
}

type GetTransactionListResponse

type GetTransactionListResponse struct {
	Transactions []GetTransactionListItemData `json:"data"`
}

type GetTransactionRequest

type GetTransactionRequest struct {
	ID string `path:"ID,required"`
}

type GetTransactionResponse

type GetTransactionResponse struct {
	Tx Transaction `json:"data"`
}

type PatchAccountData

type PatchAccountData struct{ GetAccountData }

type PatchAccountRequest

type PatchAccountRequest struct {
	ID   string `path:"ID,required"`
	Body struct {
		Name     *string `json:"name" yaml:"name"`
		ParentID *string `json:"parentId" yaml:"parentId"`
	} `body:""`
}

type PatchAccountResponse

type PatchAccountResponse struct {
	Account PatchAccountData `json:"data"`
}

type PatchTransactionRequest

type PatchTransactionRequest struct {
	ID   string `path:"ID,required"`
	Body struct {
		IssuedOn *time.Time `json:"issuedOn" yaml:"issuedOn"`
		Origin   *string    `json:"origin" yaml:"origin"`
		Amount   *float64   `json:"amount" yaml:"amount"`
		Comment  *string    `json:"comment" yaml:"comment"`
	} `body:""`
}

type PatchTransactionResponse

type PatchTransactionResponse struct {
	Transaction Transaction `json:"data"`
}

type PostAccountData

type PostAccountData struct{ GetAccountData }

type PostAccountRequest

type PostAccountRequest struct {
	Body struct {
		Name     string  `json:"name" yaml:"name"`
		ParentID *string `json:"parentId" yaml:"parentId"`
	} `body:""`
}

type PostAccountResponse

type PostAccountResponse struct {
	Account PostAccountData `json:"data"`
}

type PostTransactionRequest

type PostTransactionRequest struct {
	Body struct {
		IssuedOn        time.Time `json:"issuedOn" yaml:"issuedOn"`
		Origin          string    `json:"origin" yaml:"origin"`
		SourceAccountID string    `json:"sourceAccountId" yaml:"sourceAccountId"`
		TargetAccountID string    `json:"targetAccountId" yaml:"targetAccountId"`
		Amount          float64   `json:"amount" yaml:"amount"`
		Comment         string    `json:"comment" yaml:"comment"`
	} `body:""`
}

type PostTransactionResponse

type PostTransactionResponse struct {
	Transaction Transaction `json:"data"`
}

type PutAccountData

type PutAccountData struct{ GetAccountData }

type PutAccountRequest

type PutAccountRequest struct {
	ID   string `path:"ID,required"`
	Body struct {
		Name     string  `json:"name" yaml:"name"`
		ParentID *string `json:"parentId" yaml:"parentId"`
	} `body:""`
}

type PutAccountResponse

type PutAccountResponse struct {
	Account PutAccountData `json:"data"`
}

type PutTransactionRequest

type PutTransactionRequest struct {
	ID   string `path:"ID,required"`
	Body struct {
		IssuedOn        time.Time `json:"issuedOn" yaml:"issuedOn"`
		Origin          string    `json:"origin" yaml:"origin"`
		SourceAccountID string    `json:"sourceAccountId" yaml:"sourceAccountId"`
		TargetAccountID string    `json:"targetAccountId" yaml:"targetAccountId"`
		Amount          float64   `json:"amount" yaml:"amount"`
		Comment         string    `json:"comment" yaml:"comment"`
	} `body:""`
}

type PutTransactionResponse

type PutTransactionResponse struct {
	Transaction Transaction `json:"data"`
}

type Routes

type Routes func(chi.Router)

func NewRoutes

func NewRoutes(neo4jDriver neo4j.Driver) Routes

type Transaction

type Transaction struct {
	ID              string     `json:"id" yaml:"id"`
	CreatedOn       time.Time  `json:"createdOn" yaml:"createdOn"`
	UpdatedOn       *time.Time `json:"updatedOn" yaml:"updatedOn"`
	IssuedOn        time.Time  `json:"issuedOn" yaml:"issuedOn"`
	Origin          string     `json:"origin" yaml:"origin"`
	SourceAccountID string     `json:"sourceAccountId" yaml:"sourceAccountId"`
	TargetAccountID string     `json:"targetAccountId" yaml:"targetAccountId"`
	Amount          float64    `json:"amount" yaml:"amount"`
	Comment         string     `json:"comment" yaml:"comment"`
}

Jump to

Keyboard shortcuts

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