Documentation ¶
Index ¶
- type ABCIApp
- func (a ABCIApp) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error)
- func (a ABCIApp) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)
- func (a ABCIApp) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, ...) (*coretypes.ResultABCIQuery, error)
- func (a ABCIApp) BroadcastTx(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (a ABCIApp) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (a ABCIApp) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error)
- func (a ABCIApp) BroadcastTxSync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- type ABCIMock
- func (m ABCIMock) ABCIInfo(_ctx context.Context) (*coretypes.ResultABCIInfo, error)
- func (m ABCIMock) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)
- func (m ABCIMock) ABCIQueryWithOptions(_ctx context.Context, path string, data bytes.HexBytes, ...) (*coretypes.ResultABCIQuery, error)
- func (m ABCIMock) BroadcastTx(_ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (m ABCIMock) BroadcastTxAsync(_ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (m ABCIMock) BroadcastTxCommit(_ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error)
- func (m ABCIMock) BroadcastTxSync(_ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- type ABCIRecorder
- func (r *ABCIRecorder) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error)
- func (r *ABCIRecorder) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)
- func (r *ABCIRecorder) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, ...) (*coretypes.ResultABCIQuery, error)
- func (r *ABCIRecorder) BroadcastTx(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (r *ABCIRecorder) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (r *ABCIRecorder) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error)
- func (r *ABCIRecorder) BroadcastTxSync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- type Call
- type Client
- func (c Client) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error)
- func (c Client) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)
- func (c Client) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, ...) (*coretypes.ResultABCIQuery, error)
- func (c Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)
- func (c Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error)
- func (c Client) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error)
- func (c Client) BroadcastEvidence(ctx context.Context, ev types.Evidence) (*coretypes.ResultBroadcastEvidence, error)
- func (c Client) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (c Client) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error)
- func (c Client) BroadcastTxSync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
- func (c Client) CheckTx(ctx context.Context, tx types.Tx) (*coretypes.ResultCheckTx, error)
- func (c Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error)
- func (c Client) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error)
- func (c Client) ConsensusState(ctx context.Context) (*coretypes.ResultConsensusState, error)
- func (c Client) DumpConsensusState(ctx context.Context) (*coretypes.ResultDumpConsensusState, error)
- func (c Client) Genesis(ctx context.Context) (*coretypes.ResultGenesis, error)
- func (c Client) Health(ctx context.Context) (*coretypes.ResultHealth, error)
- func (c Client) NetInfo(ctx context.Context) (*coretypes.ResultNetInfo, error)
- func (c Client) Status(ctx context.Context) (*coretypes.ResultStatus, error)
- func (c Client) Validators(ctx context.Context, height *int64, page, perPage *int, ...) (*coretypes.ResultValidators, error)
- type QueryArgs
- type StatusMock
- type StatusRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABCIApp ¶
type ABCIApp struct {
App abci.Application
}
ABCIApp will send all abci related request to the named app, so you can test app behavior from a client without needing an entire tendermint node
func (ABCIApp) ABCIQueryWithOptions ¶
func (ABCIApp) BroadcastTx ¶
func (ABCIApp) BroadcastTxAsync ¶
func (ABCIApp) BroadcastTxCommit ¶
func (a ABCIApp) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error)
NOTE: Caller should call a.App.Commit() separately, this function does not actually wait for a commit. TODO: Make it wait for a commit and set res.Height appropriately.
func (ABCIApp) BroadcastTxSync ¶
type ABCIMock ¶
ABCIMock will send all abci related request to the named app, so you can test app behavior from a client without needing an entire tendermint node
func (ABCIMock) ABCIQueryWithOptions ¶
func (ABCIMock) BroadcastTx ¶
func (ABCIMock) BroadcastTxAsync ¶
func (ABCIMock) BroadcastTxCommit ¶
func (ABCIMock) BroadcastTxSync ¶
type ABCIRecorder ¶
type ABCIRecorder struct { Client client.ABCIClient Calls []Call }
ABCIRecorder can wrap another type (ABCIApp, ABCIMock, or Client) and record all ABCI related calls.
func NewABCIRecorder ¶
func NewABCIRecorder(client client.ABCIClient) *ABCIRecorder
func (*ABCIRecorder) ABCIInfo ¶
func (r *ABCIRecorder) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error)
func (*ABCIRecorder) ABCIQuery ¶
func (r *ABCIRecorder) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)
func (*ABCIRecorder) ABCIQueryWithOptions ¶
func (r *ABCIRecorder) ABCIQueryWithOptions( ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)
func (*ABCIRecorder) BroadcastTx ¶
func (r *ABCIRecorder) BroadcastTx(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
func (*ABCIRecorder) BroadcastTxAsync ¶
func (r *ABCIRecorder) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
func (*ABCIRecorder) BroadcastTxCommit ¶
func (r *ABCIRecorder) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error)
func (*ABCIRecorder) BroadcastTxSync ¶
func (r *ABCIRecorder) BroadcastTxSync(ctx context.Context, tx types.Tx) (*coretypes.ResultBroadcastTx, error)
type Call ¶
Call is used by recorders to save a call and response. It can also be used to configure mock responses.
func (Call) GetResponse ¶
GetResponse will generate the apporiate response for us, when using the Call struct to configure a Mock handler.
When configuring a response, if only one of Response or Error is set then that will always be returned. If both are set, then we return Response if the Args match the set args, Error otherwise.
type Client ¶
Client wraps arbitrary implementations of the various interfaces.
func (Client) ABCIQueryWithOptions ¶
func (Client) BlockByHash ¶
func (Client) BlockchainInfo ¶
func (Client) BroadcastEvidence ¶
func (Client) BroadcastTxAsync ¶
func (Client) BroadcastTxCommit ¶
func (Client) BroadcastTxSync ¶
func (Client) ConsensusParams ¶
func (Client) ConsensusState ¶
func (Client) DumpConsensusState ¶
type StatusMock ¶
type StatusMock struct {
Call
}
StatusMock returns the result specified by the Call
func (*StatusMock) Status ¶
func (m *StatusMock) Status(_ctx context.Context) (*coretypes.ResultStatus, error)
type StatusRecorder ¶
type StatusRecorder struct { Client client.StatusClient Calls []Call }
StatusRecorder can wrap another type (StatusMock, full client) and record the status calls
func NewStatusRecorder ¶
func NewStatusRecorder(client client.StatusClient) *StatusRecorder
func (*StatusRecorder) Status ¶
func (r *StatusRecorder) Status(ctx context.Context) (*coretypes.ResultStatus, error)