Documentation ¶
Index ¶
Constants ¶
View Source
const MethodAccountBalance = "account_balance"
View Source
const MethodAccountList = "account_list"
View Source
const MethodClaimSearch = "claim_search"
View Source
const MethodFileList = "file_list"
View Source
const MethodGet = "get"
View Source
const MethodResolve = "resolve"
View Source
const MethodStatus = "status"
Variables ¶
This section is empty.
Functions ¶
func EnsureAuthenticated ¶ added in v0.13.3
func EnsureAuthenticated(ar auth.Result, w http.ResponseWriter) bool
func Handle ¶ added in v0.13.3
func Handle(w http.ResponseWriter, r *http.Request)
Handle forwards client JSON-RPC request to proxy.
func HandleCORS ¶ added in v0.13.3
func HandleCORS(w http.ResponseWriter, r *http.Request)
HandleCORS returns necessary CORS headers for pre-flight requests to proxy API
func MethodNeedsAuth ¶ added in v0.13.3
Types ¶
type Caller ¶ added in v0.7.0
type Caller struct { // Preprocessor is applied to query before it's sent to the SDK. Preprocessor func(q *Query) // contains filtered or unexported fields }
Caller patches through JSON-RPC requests from clients, doing pre/post-processing, account processing and validation.
type Query ¶ added in v0.7.0
type Query struct { Request *jsonrpc.RPCRequest WalletID string }
Query is a wrapper around client JSON-RPC query for easier (un)marshaling and processing.
func NewQuery ¶ added in v0.7.0
func NewQuery(req *jsonrpc.RPCRequest) (*Query, error)
NewQuery initializes Query object with JSON-RPC request supplied as bytes. The object is immediately usable and returns an error in case request parsing fails.
func (*Query) Params ¶ added in v0.7.0
func (q *Query) Params() interface{}
Params is a shortcut for query params.
func (*Query) ParamsAsMap ¶ added in v0.7.0
ParamsAsMap returns query params converted to plain map.
type RPCError ¶ added in v0.13.3
type RPCError struct {
// contains filtered or unexported fields
}
func NewAuthRequiredError ¶ added in v0.13.3
func NewForbiddenError ¶ added in v0.13.3
func NewInternalError ¶ added in v0.7.0
func NewInvalidParamsError ¶ added in v0.13.3
func NewJSONParseError ¶ added in v0.13.3
func NewMethodNotAllowedError ¶ added in v0.13.3
func NewSDKError ¶ added in v0.13.3
Click to show internal directories.
Click to hide internal directories.