Documentation ¶
Index ¶
- Constants
- type BasicReq
- type RestContext
- func (ctx RestContext) BasicAuth() (username, password string, ok bool)
- func (ctx RestContext) BlockchainInfo(minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
- func (ctx RestContext) BroadcastMessage(message []byte) ([]byte, error)
- func (ctx RestContext) Codec() *codec.Codec
- func (ctx RestContext) Context() client.CLIContext
- func (ctx RestContext) EncodeAndRespondWithHeight(data interface{}, height int64)
- func (ctx RestContext) GetChainHeight() (int64, error)
- func (ctx RestContext) HandleWriteRequest(msg sdk.Msg)
- func (ctx RestContext) NodeStatus() (*ctypes.ResultStatus, error)
- func (ctx RestContext) ParsePaginationParams() (pagination.PaginationParams, error)
- func (ctx RestContext) PostProcessResponse(body interface{})
- func (ctx RestContext) PostProcessResponseBare(body interface{})
- func (ctx RestContext) QueryList(path string, params interface{})
- func (ctx RestContext) QueryStore(key []byte, storeName string) ([]byte, int64, error)
- func (ctx RestContext) QueryWithData(path string, data interface{}) ([]byte, int64, error)
- func (ctx RestContext) ReadRESTReq(req interface{}) bool
- func (ctx RestContext) Request() *http.Request
- func (ctx RestContext) RespondWithHeight(out interface{}, height int64)
- func (ctx RestContext) ResponseWriter() *http.ResponseWriter
- func (ctx RestContext) SignAndBroadcastMessage(account string, passphrase string, msg []sdk.Msg) ([]byte, error)
- func (ctx RestContext) SignMessage(name string, passphrase string, msg []sdk.Msg) ([]byte, error)
- func (ctx RestContext) Signer() sdk.AccAddress
- func (ctx RestContext) TxnBuilder() (types.TxBuilder, error)
- func (ctx RestContext) Variables() map[string]string
- func (ctx RestContext) WithBaseRequest(baseReq rest.BaseReq) (RestContext, error)
- func (ctx RestContext) WithCodec(cdc *codec.Codec) RestContext
- func (ctx RestContext) WithFormerHeight() (RestContext, error)
- func (ctx RestContext) WithHeight(height int64) RestContext
- func (ctx RestContext) WithNodeURI(nodeURI string) RestContext
- func (ctx RestContext) WithResponseWriter(w http.ResponseWriter) RestContext
- func (ctx RestContext) WithSigner() (RestContext, error)
- func (ctx RestContext) WriteErrorResponse(status int, err string)
Constants ¶
View Source
const (
FlagPreviousHeight = "prev_height" // Query data from previous height to avoid delay linked to state proof verification
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestContext ¶
type RestContext struct {
// contains filtered or unexported fields
}
func NewRestContext ¶
func NewRestContext(w http.ResponseWriter, r *http.Request) RestContext
func (RestContext) BasicAuth ¶
func (ctx RestContext) BasicAuth() (username, password string, ok bool)
func (RestContext) BlockchainInfo ¶
func (ctx RestContext) BlockchainInfo(minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
func (RestContext) BroadcastMessage ¶
func (ctx RestContext) BroadcastMessage(message []byte) ([]byte, error)
func (RestContext) Codec ¶
func (ctx RestContext) Codec() *codec.Codec
func (RestContext) Context ¶
func (ctx RestContext) Context() client.CLIContext
func (RestContext) EncodeAndRespondWithHeight ¶
func (ctx RestContext) EncodeAndRespondWithHeight(data interface{}, height int64)
func (RestContext) GetChainHeight ¶
func (ctx RestContext) GetChainHeight() (int64, error)
func (RestContext) HandleWriteRequest ¶
func (ctx RestContext) HandleWriteRequest(msg sdk.Msg)
func (RestContext) NodeStatus ¶
func (ctx RestContext) NodeStatus() (*ctypes.ResultStatus, error)
func (RestContext) ParsePaginationParams ¶
func (ctx RestContext) ParsePaginationParams() (pagination.PaginationParams, error)
func (RestContext) PostProcessResponse ¶
func (ctx RestContext) PostProcessResponse(body interface{})
func (RestContext) PostProcessResponseBare ¶
func (ctx RestContext) PostProcessResponseBare(body interface{})
func (RestContext) QueryList ¶
func (ctx RestContext) QueryList(path string, params interface{})
func (RestContext) QueryStore ¶
func (RestContext) QueryWithData ¶
func (ctx RestContext) QueryWithData(path string, data interface{}) ([]byte, int64, error)
func (RestContext) ReadRESTReq ¶
func (ctx RestContext) ReadRESTReq(req interface{}) bool
func (RestContext) Request ¶
func (ctx RestContext) Request() *http.Request
func (RestContext) RespondWithHeight ¶
func (ctx RestContext) RespondWithHeight(out interface{}, height int64)
func (RestContext) ResponseWriter ¶
func (ctx RestContext) ResponseWriter() *http.ResponseWriter
func (RestContext) SignAndBroadcastMessage ¶
func (RestContext) SignMessage ¶
func (RestContext) Signer ¶
func (ctx RestContext) Signer() sdk.AccAddress
func (RestContext) TxnBuilder ¶
func (ctx RestContext) TxnBuilder() (types.TxBuilder, error)
func (RestContext) Variables ¶
func (ctx RestContext) Variables() map[string]string
func (RestContext) WithBaseRequest ¶
func (ctx RestContext) WithBaseRequest(baseReq rest.BaseReq) (RestContext, error)
func (RestContext) WithCodec ¶
func (ctx RestContext) WithCodec(cdc *codec.Codec) RestContext
func (RestContext) WithFormerHeight ¶
func (ctx RestContext) WithFormerHeight() (RestContext, error)
func (RestContext) WithHeight ¶
func (ctx RestContext) WithHeight(height int64) RestContext
func (RestContext) WithNodeURI ¶
func (ctx RestContext) WithNodeURI(nodeURI string) RestContext
func (RestContext) WithResponseWriter ¶
func (ctx RestContext) WithResponseWriter(w http.ResponseWriter) RestContext
func (RestContext) WithSigner ¶
func (ctx RestContext) WithSigner() (RestContext, error)
func (RestContext) WriteErrorResponse ¶
func (ctx RestContext) WriteErrorResponse(status int, err string)
Click to show internal directories.
Click to hide internal directories.