Documentation ¶
Index ¶
- func GetLightHeader(chain *collactor.Chain, opts ...string) (*tmclient.Header, error)
- func InitLight(chain *collactor.Chain, force bool) (string, error)
- func SuccessJSONResponse(status int, v interface{}, w http.ResponseWriter)
- func WriteErrorResponse(statusCode int, err error, w http.ResponseWriter)
- func WriteSuccessResponse(statusCode int, data interface{}, w http.ResponseWriter)
- type KeyOutput
- type RespStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLightHeader ¶
GetLightHeader returns header with chain and optional height as inputs
func SuccessJSONResponse ¶
func SuccessJSONResponse(status int, v interface{}, w http.ResponseWriter)
SuccessJSONResponse prepares data and writes a HTTP success
func WriteErrorResponse ¶
func WriteErrorResponse(statusCode int, err error, w http.ResponseWriter)
WriteErrorResponse writes a HTTP error given a status code and an error message
func WriteSuccessResponse ¶
func WriteSuccessResponse(statusCode int, data interface{}, w http.ResponseWriter)
WriteSuccessResponse writes a HTTP success given a status code and data
Types ¶
type KeyOutput ¶
type KeyOutput struct { PrivateKey string `json:"privatekey" yaml:"privatekey"` Address string `json:"address" yaml:"address"` }
KeyOutput contains mnemonic and address of key
func KeyAddOrRestore ¶
KeyAddOrRestore is a helper function for add key and restores key when mnemonic is passed
type RespStruct ¶
Click to show internal directories.
Click to hide internal directories.