standardapi

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: LGPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Package standardapi defines the summercash-wallet-server API.

Package standardapi defines the summercash-wallet-server API.

Package standardapi defines the summercash-wallet-server API.

Package standardapi defines the summercash-wallet-server API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONHTTPAPI

type JSONHTTPAPI struct {
	BaseURI string `json:"base_uri"` // Base URI

	Provider string `json:"provider"` // Node provider

	Router *fasthttprouter.Router `json:"-"` // Router

	ContentRouter *fasthttprouter.Router `json:"-"` // Content router

	AccountsDatabase *accounts.DB `json:"-"` // Accounts database

	Faucet *faucet.Faucet `json:"-"` // Faucet

	ContentDir string `json:"content_dir"` // Static content directory
}

JSONHTTPAPI is an instance of an API providing the standard API set via https/2 JSON.

func NewJSONHTTPAPI

func NewJSONHTTPAPI(baseURI string, provider string, accountsDB *accounts.DB, faucet *faucet.Faucet, contentDir string) *JSONHTTPAPI

NewJSONHTTPAPI initializes a new JSONHTTPAPI instance.

func (*JSONHTTPAPI) AuthenticateUser added in v0.5.2

func (api *JSONHTTPAPI) AuthenticateUser(ctx *fasthttp.RequestCtx)

AuthenticateUser handles an AuthenticateUser request.

func (*JSONHTTPAPI) AuthenticateUserToken added in v0.5.9

func (api *JSONHTTPAPI) AuthenticateUserToken(ctx *fasthttp.RequestCtx)

AuthenticateUserToken handles an AuthenticateUserToken request.

func (*JSONHTTPAPI) CalculateAccountBalance

func (api *JSONHTTPAPI) CalculateAccountBalance(ctx *fasthttp.RequestCtx)

CalculateAccountBalance handles a CalculateAccountBalance request.

func (*JSONHTTPAPI) Claim added in v0.5.8

func (api *JSONHTTPAPI) Claim(ctx *fasthttp.RequestCtx)

Claim handles a Claim request.

func (*JSONHTTPAPI) DeleteUser added in v0.5.8

func (api *JSONHTTPAPI) DeleteUser(ctx *fasthttp.RequestCtx)

DeleteUser handles a DeleteUser request.

func (*JSONHTTPAPI) GetAvailableAPIs

func (api *JSONHTTPAPI) GetAvailableAPIs() []string

GetAvailableAPIs gets the available APIs.

func (*JSONHTTPAPI) GetInputType

func (api *JSONHTTPAPI) GetInputType() string

GetInputType gets the input type.

func (*JSONHTTPAPI) GetLastUserTxHash added in v0.5.8

func (api *JSONHTTPAPI) GetLastUserTxHash(ctx *fasthttp.RequestCtx)

GetLastUserTxHash handles a GetLastUserTxHash request.

func (*JSONHTTPAPI) GetResponseType

func (api *JSONHTTPAPI) GetResponseType() string

GetResponseType gets the response type.

func (*JSONHTTPAPI) GetServingProtocol

func (api *JSONHTTPAPI) GetServingProtocol() string

GetServingProtocol gets the serving protocol.

func (*JSONHTTPAPI) GetUserTransactions

func (api *JSONHTTPAPI) GetUserTransactions(ctx *fasthttp.RequestCtx)

GetUserTransactions handles a GetUserTransactions request.

func (*JSONHTTPAPI) HandlePanic

func (api *JSONHTTPAPI) HandlePanic(ctx *fasthttp.RequestCtx, panic interface{})

HandlePanic handles a panic.

func (*JSONHTTPAPI) IssueAccountToken added in v0.5.9

func (api *JSONHTTPAPI) IssueAccountToken(ctx *fasthttp.RequestCtx)

IssueAccountToken handles an IssueAccountToken request.

func (*JSONHTTPAPI) NewAccount

func (api *JSONHTTPAPI) NewAccount(ctx *fasthttp.RequestCtx)

NewAccount handles a NewAccount request.

func (*JSONHTTPAPI) NewTransaction

func (api *JSONHTTPAPI) NewTransaction(ctx *fasthttp.RequestCtx)

NewTransaction handles a NewTransaction request.

func (*JSONHTTPAPI) NextClaim added in v0.5.8

func (api *JSONHTTPAPI) NextClaim(ctx *fasthttp.RequestCtx)

NextClaim handles a NextClaim request.

func (*JSONHTTPAPI) NextClaimAmount added in v0.5.8

func (api *JSONHTTPAPI) NextClaimAmount(ctx *fasthttp.RequestCtx)

NextClaimAmount handles a NextClaimAmount request.

func (*JSONHTTPAPI) OauthCallback added in v0.6.1

func (api *JSONHTTPAPI) OauthCallback(ctx *fasthttp.RequestCtx)

OauthCallback handles an OauthCallback request.

func (*JSONHTTPAPI) OauthLogin added in v0.6.1

func (api *JSONHTTPAPI) OauthLogin(ctx *fasthttp.RequestCtx)

OauthLogin handles an OauthLogin request.

func (*JSONHTTPAPI) QueryAccount

func (api *JSONHTTPAPI) QueryAccount(ctx *fasthttp.RequestCtx)

QueryAccount handles a QueryAccount request.

func (*JSONHTTPAPI) ResolveAddress added in v0.5.8

func (api *JSONHTTPAPI) ResolveAddress(ctx *fasthttp.RequestCtx)

ResolveAddress handles a ResolveAddress request.

func (*JSONHTTPAPI) RestAccountPassword

func (api *JSONHTTPAPI) RestAccountPassword(ctx *fasthttp.RequestCtx)

RestAccountPassword handles a ResetAccountPassword request.

func (*JSONHTTPAPI) SetAccountPushToken added in v0.5.9

func (api *JSONHTTPAPI) SetAccountPushToken(ctx *fasthttp.RequestCtx)

SetAccountPushToken handles a SetAccountPushToken request.

func (*JSONHTTPAPI) SetupAccountRoutes

func (api *JSONHTTPAPI) SetupAccountRoutes() error

SetupAccountRoutes sets up all account api-related routes.

func (*JSONHTTPAPI) SetupFaucetRoutes added in v0.5.8

func (api *JSONHTTPAPI) SetupFaucetRoutes() error

SetupFaucetRoutes sets up all the faucet api-related routes.

func (*JSONHTTPAPI) SetupTransactionsRoutes

func (api *JSONHTTPAPI) SetupTransactionsRoutes() error

SetupTransactionsRoutes sets up all the transactions api-related routes.

func (*JSONHTTPAPI) StartServing

func (api *JSONHTTPAPI) StartServing() error

StartServing starts serving the API.

Jump to

Keyboard shortcuts

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