Documentation
¶
Index ¶
- Constants
- func BlockPayloadToTxIDs(blockPayload interface{}) ([]string, error)
- func GetBlockNum(params map[string]string) (uint64, error)
- func GetBlockNumAndTxIndex(params map[string]string) (uint64, uint64, error)
- func GetStartAndEndBlockNum(params map[string]string) (uint64, uint64, error)
- func GetUintParam(key string, params map[string]string) (uint64, *types.HttpResponseErr)
- func GetVersion(params map[string]string) (*types.Version, error)
- func IsConfigBlock(block *types.Block) bool
- func MarshalJsonOrPanic(o interface{}) []byte
- func MarshalOrPanic(m proto.Message) []byte
- func SendHTTPRedirectServer(w http.ResponseWriter, r *http.Request, hostPort string)
- func SendHTTPResponse(w http.ResponseWriter, code int, payload interface{})
Constants ¶
View Source
const MultiPartFormData = "multipart/form-data"
Variables ¶
This section is empty.
Functions ¶
func BlockPayloadToTxIDs ¶
func GetBlockNumAndTxIndex ¶
func GetStartAndEndBlockNum ¶
func GetUintParam ¶
func IsConfigBlock ¶
func MarshalJsonOrPanic ¶
func MarshalJsonOrPanic(o interface{}) []byte
func MarshalOrPanic ¶
func SendHTTPRedirectServer ¶
func SendHTTPRedirectServer(w http.ResponseWriter, r *http.Request, hostPort string)
SendHTTPRedirectServer replaces the Host in the request URL with hostPort, and redirects using StatusTemporaryRedirect (307).
func SendHTTPResponse ¶
func SendHTTPResponse(w http.ResponseWriter, code int, payload interface{})
SendHTTPResponse writes HTTP response back including HTTP code number and encode payload
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.