Documentation ¶
Index ¶
- type AccountTxsResponse
- type Block
- type BlockResponse
- type Header
- type HeightResponse
- type MockPocketClient
- func (_m *MockPocketClient) EXPECT() *MockPocketClient_Expecter
- func (_m *MockPocketClient) GetAccountTxsByHeight(address string, height int64) ([]*TxResponse, error)
- func (_m *MockPocketClient) GetBlock() (*BlockResponse, error)
- func (_m *MockPocketClient) GetHeight() (*HeightResponse, error)
- func (_m *MockPocketClient) GetTx(hash string) (*TxResponse, error)
- func (_m *MockPocketClient) SubmitRawTx(params rpc.SendRawTxParams) (*SubmitRawTxResponse, error)
- func (_m *MockPocketClient) ValidateNetwork()
- type MockPocketClient_Expecter
- func (_e *MockPocketClient_Expecter) GetAccountTxsByHeight(address interface{}, height interface{}) *MockPocketClient_GetAccountTxsByHeight_Call
- func (_e *MockPocketClient_Expecter) GetBlock() *MockPocketClient_GetBlock_Call
- func (_e *MockPocketClient_Expecter) GetHeight() *MockPocketClient_GetHeight_Call
- func (_e *MockPocketClient_Expecter) GetTx(hash interface{}) *MockPocketClient_GetTx_Call
- func (_e *MockPocketClient_Expecter) SubmitRawTx(params interface{}) *MockPocketClient_SubmitRawTx_Call
- func (_e *MockPocketClient_Expecter) ValidateNetwork() *MockPocketClient_ValidateNetwork_Call
- type MockPocketClient_GetAccountTxsByHeight_Call
- func (_c *MockPocketClient_GetAccountTxsByHeight_Call) Return(_a0 []*TxResponse, _a1 error) *MockPocketClient_GetAccountTxsByHeight_Call
- func (_c *MockPocketClient_GetAccountTxsByHeight_Call) Run(run func(address string, height int64)) *MockPocketClient_GetAccountTxsByHeight_Call
- func (_c *MockPocketClient_GetAccountTxsByHeight_Call) RunAndReturn(run func(string, int64) ([]*TxResponse, error)) *MockPocketClient_GetAccountTxsByHeight_Call
- type MockPocketClient_GetBlock_Call
- func (_c *MockPocketClient_GetBlock_Call) Return(_a0 *BlockResponse, _a1 error) *MockPocketClient_GetBlock_Call
- func (_c *MockPocketClient_GetBlock_Call) Run(run func()) *MockPocketClient_GetBlock_Call
- func (_c *MockPocketClient_GetBlock_Call) RunAndReturn(run func() (*BlockResponse, error)) *MockPocketClient_GetBlock_Call
- type MockPocketClient_GetHeight_Call
- func (_c *MockPocketClient_GetHeight_Call) Return(_a0 *HeightResponse, _a1 error) *MockPocketClient_GetHeight_Call
- func (_c *MockPocketClient_GetHeight_Call) Run(run func()) *MockPocketClient_GetHeight_Call
- func (_c *MockPocketClient_GetHeight_Call) RunAndReturn(run func() (*HeightResponse, error)) *MockPocketClient_GetHeight_Call
- type MockPocketClient_GetTx_Call
- func (_c *MockPocketClient_GetTx_Call) Return(_a0 *TxResponse, _a1 error) *MockPocketClient_GetTx_Call
- func (_c *MockPocketClient_GetTx_Call) Run(run func(hash string)) *MockPocketClient_GetTx_Call
- func (_c *MockPocketClient_GetTx_Call) RunAndReturn(run func(string) (*TxResponse, error)) *MockPocketClient_GetTx_Call
- type MockPocketClient_SubmitRawTx_Call
- func (_c *MockPocketClient_SubmitRawTx_Call) Return(_a0 *SubmitRawTxResponse, _a1 error) *MockPocketClient_SubmitRawTx_Call
- func (_c *MockPocketClient_SubmitRawTx_Call) Run(run func(params rpc.SendRawTxParams)) *MockPocketClient_SubmitRawTx_Call
- func (_c *MockPocketClient_SubmitRawTx_Call) RunAndReturn(run func(rpc.SendRawTxParams) (*SubmitRawTxResponse, error)) *MockPocketClient_SubmitRawTx_Call
- type MockPocketClient_ValidateNetwork_Call
- func (_c *MockPocketClient_ValidateNetwork_Call) Return() *MockPocketClient_ValidateNetwork_Call
- func (_c *MockPocketClient_ValidateNetwork_Call) Run(run func()) *MockPocketClient_ValidateNetwork_Call
- func (_c *MockPocketClient_ValidateNetwork_Call) RunAndReturn(run func()) *MockPocketClient_ValidateNetwork_Call
- type Msg
- type PocketClient
- type StdTx
- type SubmitRawTxResponse
- type TxResponse
- type TxResult
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountTxsResponse ¶
type AccountTxsResponse struct { PageCount uint32 `json:"page_count"` TotalTxs uint32 `json:"total_txs"` Txs []*TxResponse `json:"txs"` }
type BlockResponse ¶
type BlockResponse struct {
Block Block `json:"block"`
}
type HeightResponse ¶
type HeightResponse struct {
Height int64 `json:"height"`
}
type MockPocketClient ¶ added in v0.1.9
MockPocketClient is an autogenerated mock type for the PocketClient type
func NewMockPocketClient ¶ added in v0.1.9
func NewMockPocketClient(t interface { mock.TestingT Cleanup(func()) }) *MockPocketClient
NewMockPocketClient creates a new instance of MockPocketClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockPocketClient) EXPECT ¶ added in v0.1.9
func (_m *MockPocketClient) EXPECT() *MockPocketClient_Expecter
func (*MockPocketClient) GetAccountTxsByHeight ¶ added in v0.1.9
func (_m *MockPocketClient) GetAccountTxsByHeight(address string, height int64) ([]*TxResponse, error)
GetAccountTxsByHeight provides a mock function with given fields: address, height
func (*MockPocketClient) GetBlock ¶ added in v0.1.9
func (_m *MockPocketClient) GetBlock() (*BlockResponse, error)
GetBlock provides a mock function with given fields:
func (*MockPocketClient) GetHeight ¶ added in v0.1.9
func (_m *MockPocketClient) GetHeight() (*HeightResponse, error)
GetHeight provides a mock function with given fields:
func (*MockPocketClient) GetTx ¶ added in v0.1.9
func (_m *MockPocketClient) GetTx(hash string) (*TxResponse, error)
GetTx provides a mock function with given fields: hash
func (*MockPocketClient) SubmitRawTx ¶ added in v0.1.9
func (_m *MockPocketClient) SubmitRawTx(params rpc.SendRawTxParams) (*SubmitRawTxResponse, error)
SubmitRawTx provides a mock function with given fields: params
func (*MockPocketClient) ValidateNetwork ¶ added in v0.1.9
func (_m *MockPocketClient) ValidateNetwork()
ValidateNetwork provides a mock function with given fields:
type MockPocketClient_Expecter ¶ added in v0.1.9
type MockPocketClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockPocketClient_Expecter) GetAccountTxsByHeight ¶ added in v0.1.9
func (_e *MockPocketClient_Expecter) GetAccountTxsByHeight(address interface{}, height interface{}) *MockPocketClient_GetAccountTxsByHeight_Call
GetAccountTxsByHeight is a helper method to define mock.On call
- address string
- height int64
func (*MockPocketClient_Expecter) GetBlock ¶ added in v0.1.9
func (_e *MockPocketClient_Expecter) GetBlock() *MockPocketClient_GetBlock_Call
GetBlock is a helper method to define mock.On call
func (*MockPocketClient_Expecter) GetHeight ¶ added in v0.1.9
func (_e *MockPocketClient_Expecter) GetHeight() *MockPocketClient_GetHeight_Call
GetHeight is a helper method to define mock.On call
func (*MockPocketClient_Expecter) GetTx ¶ added in v0.1.9
func (_e *MockPocketClient_Expecter) GetTx(hash interface{}) *MockPocketClient_GetTx_Call
GetTx is a helper method to define mock.On call
- hash string
func (*MockPocketClient_Expecter) SubmitRawTx ¶ added in v0.1.9
func (_e *MockPocketClient_Expecter) SubmitRawTx(params interface{}) *MockPocketClient_SubmitRawTx_Call
SubmitRawTx is a helper method to define mock.On call
- params rpc.SendRawTxParams
func (*MockPocketClient_Expecter) ValidateNetwork ¶ added in v0.1.9
func (_e *MockPocketClient_Expecter) ValidateNetwork() *MockPocketClient_ValidateNetwork_Call
ValidateNetwork is a helper method to define mock.On call
type MockPocketClient_GetAccountTxsByHeight_Call ¶ added in v0.1.9
MockPocketClient_GetAccountTxsByHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAccountTxsByHeight'
func (*MockPocketClient_GetAccountTxsByHeight_Call) Return ¶ added in v0.1.9
func (_c *MockPocketClient_GetAccountTxsByHeight_Call) Return(_a0 []*TxResponse, _a1 error) *MockPocketClient_GetAccountTxsByHeight_Call
func (*MockPocketClient_GetAccountTxsByHeight_Call) Run ¶ added in v0.1.9
func (_c *MockPocketClient_GetAccountTxsByHeight_Call) Run(run func(address string, height int64)) *MockPocketClient_GetAccountTxsByHeight_Call
func (*MockPocketClient_GetAccountTxsByHeight_Call) RunAndReturn ¶ added in v0.1.9
func (_c *MockPocketClient_GetAccountTxsByHeight_Call) RunAndReturn(run func(string, int64) ([]*TxResponse, error)) *MockPocketClient_GetAccountTxsByHeight_Call
type MockPocketClient_GetBlock_Call ¶ added in v0.1.9
MockPocketClient_GetBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlock'
func (*MockPocketClient_GetBlock_Call) Return ¶ added in v0.1.9
func (_c *MockPocketClient_GetBlock_Call) Return(_a0 *BlockResponse, _a1 error) *MockPocketClient_GetBlock_Call
func (*MockPocketClient_GetBlock_Call) Run ¶ added in v0.1.9
func (_c *MockPocketClient_GetBlock_Call) Run(run func()) *MockPocketClient_GetBlock_Call
func (*MockPocketClient_GetBlock_Call) RunAndReturn ¶ added in v0.1.9
func (_c *MockPocketClient_GetBlock_Call) RunAndReturn(run func() (*BlockResponse, error)) *MockPocketClient_GetBlock_Call
type MockPocketClient_GetHeight_Call ¶ added in v0.1.9
MockPocketClient_GetHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHeight'
func (*MockPocketClient_GetHeight_Call) Return ¶ added in v0.1.9
func (_c *MockPocketClient_GetHeight_Call) Return(_a0 *HeightResponse, _a1 error) *MockPocketClient_GetHeight_Call
func (*MockPocketClient_GetHeight_Call) Run ¶ added in v0.1.9
func (_c *MockPocketClient_GetHeight_Call) Run(run func()) *MockPocketClient_GetHeight_Call
func (*MockPocketClient_GetHeight_Call) RunAndReturn ¶ added in v0.1.9
func (_c *MockPocketClient_GetHeight_Call) RunAndReturn(run func() (*HeightResponse, error)) *MockPocketClient_GetHeight_Call
type MockPocketClient_GetTx_Call ¶ added in v0.1.9
MockPocketClient_GetTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTx'
func (*MockPocketClient_GetTx_Call) Return ¶ added in v0.1.9
func (_c *MockPocketClient_GetTx_Call) Return(_a0 *TxResponse, _a1 error) *MockPocketClient_GetTx_Call
func (*MockPocketClient_GetTx_Call) Run ¶ added in v0.1.9
func (_c *MockPocketClient_GetTx_Call) Run(run func(hash string)) *MockPocketClient_GetTx_Call
func (*MockPocketClient_GetTx_Call) RunAndReturn ¶ added in v0.1.9
func (_c *MockPocketClient_GetTx_Call) RunAndReturn(run func(string) (*TxResponse, error)) *MockPocketClient_GetTx_Call
type MockPocketClient_SubmitRawTx_Call ¶ added in v0.1.9
MockPocketClient_SubmitRawTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubmitRawTx'
func (*MockPocketClient_SubmitRawTx_Call) Return ¶ added in v0.1.9
func (_c *MockPocketClient_SubmitRawTx_Call) Return(_a0 *SubmitRawTxResponse, _a1 error) *MockPocketClient_SubmitRawTx_Call
func (*MockPocketClient_SubmitRawTx_Call) Run ¶ added in v0.1.9
func (_c *MockPocketClient_SubmitRawTx_Call) Run(run func(params rpc.SendRawTxParams)) *MockPocketClient_SubmitRawTx_Call
func (*MockPocketClient_SubmitRawTx_Call) RunAndReturn ¶ added in v0.1.9
func (_c *MockPocketClient_SubmitRawTx_Call) RunAndReturn(run func(rpc.SendRawTxParams) (*SubmitRawTxResponse, error)) *MockPocketClient_SubmitRawTx_Call
type MockPocketClient_ValidateNetwork_Call ¶ added in v0.1.9
MockPocketClient_ValidateNetwork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateNetwork'
func (*MockPocketClient_ValidateNetwork_Call) Return ¶ added in v0.1.9
func (_c *MockPocketClient_ValidateNetwork_Call) Return() *MockPocketClient_ValidateNetwork_Call
func (*MockPocketClient_ValidateNetwork_Call) Run ¶ added in v0.1.9
func (_c *MockPocketClient_ValidateNetwork_Call) Run(run func()) *MockPocketClient_ValidateNetwork_Call
func (*MockPocketClient_ValidateNetwork_Call) RunAndReturn ¶ added in v0.1.9
func (_c *MockPocketClient_ValidateNetwork_Call) RunAndReturn(run func()) *MockPocketClient_ValidateNetwork_Call
type PocketClient ¶
type PocketClient interface { GetBlock() (*BlockResponse, error) GetHeight() (*HeightResponse, error) SubmitRawTx(params rpc.SendRawTxParams) (*SubmitRawTxResponse, error) GetTx(hash string) (*TxResponse, error) GetAccountTxsByHeight(address string, height int64) ([]*TxResponse, error) ValidateNetwork() }
var (
Client PocketClient = &pocketClient{}
)
func NewClient ¶
func NewClient() PocketClient
type SubmitRawTxResponse ¶
type SubmitRawTxResponse struct {
TransactionHash string `json:"txhash"`
}