Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(store mock.GlobalStorer, corsOrigins []string) (handler http.Handler)
NewHandler constructs an http.Handler with router that servers requests required by chunk explorer.
/api/has-key/{node}/{key} /api/keys?start={key}&node={node}&limit={int[0..1000]} /api/nodes?start={node}&key={key}&limit={int[0..1000]}
Data from global store will be served and appropriate CORS headers will be sent if allowed origins are provided.
Types ¶
type KeysResponse ¶
KeysResponse is a JSON-encoded response for global store Keys and NodeKeys methods.
type NodesResponse ¶
NodesResponse is a JSON-encoded response for global store Nodes and KeyNodes methods.
type StatusResponse ¶
StatusResponse is a standardized JSON-encoded response that contains information about HTTP response code for easier status identification.
Click to show internal directories.
Click to hide internal directories.