Documentation ¶
Overview ¶
Package client is a generated GoMock package.
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) GetBalance(ctx context.Context, address string) (int64, error)
- func (c *Client) GetBlockchainHeight(ctx context.Context) (uint32, error)
- func (c *Client) GetBlockchainInfo(ctx context.Context) (*pactus.GetBlockchainInfoResponse, error)
- func (c *Client) GetNetworkInfo(ctx context.Context) (*pactus.GetNetworkInfoResponse, error)
- func (c *Client) GetNodeInfo(ctx context.Context) (*pactus.GetNodeInfoResponse, error)
- func (c *Client) GetPeerInfo(ctx context.Context, address string) (*pactus.PeerInfo, error)
- func (c *Client) GetTransactionData(ctx context.Context, txID string) (*pactus.GetTransactionResponse, error)
- func (c *Client) GetValidatorInfo(ctx context.Context, address string) (*pactus.GetValidatorResponse, error)
- func (c *Client) GetValidatorInfoByNumber(ctx context.Context, num int32) (*pactus.GetValidatorResponse, error)
- func (c *Client) LastBlockTime(ctx context.Context) (uint32, uint32, error)
- func (c *Client) TransactionData(ctx context.Context, hash string) (*pactus.TransactionInfo, error)
- type IClient
- type Mgr
- func (cm *Mgr) AddClient(c IClient)
- func (cm *Mgr) FindPublicKey(address string, firstVal bool) (string, error)
- func (cm *Mgr) GetBalance(addr string) (int64, error)
- func (cm *Mgr) GetBlockchainHeight() (uint32, error)
- func (cm *Mgr) GetBlockchainInfo() (*pactus.GetBlockchainInfoResponse, error)
- func (cm *Mgr) GetCirculatingSupply() (int64, error)
- func (cm *Mgr) GetLastBlockTime() (uint32, uint32)
- func (cm *Mgr) GetNetworkInfo() (*pactus.GetNetworkInfoResponse, error)
- func (cm *Mgr) GetPeerInfo(address string) (*pactus.PeerInfo, error)
- func (cm *Mgr) GetRandomClient() IClient
- func (cm *Mgr) GetTransactionData(txID string) (*pactus.GetTransactionResponse, error)
- func (cm *Mgr) GetValidatorInfo(address string) (*pactus.GetValidatorResponse, error)
- func (cm *Mgr) GetValidatorInfoByNumber(num int32) (*pactus.GetValidatorResponse, error)
- func (cm *Mgr) Start()
- func (cm *Mgr) Stop()
- type MockIClient
- func (m *MockIClient) Close() error
- func (m *MockIClient) EXPECT() *MockIClientMockRecorder
- func (m *MockIClient) GetBalance(arg0 context.Context, arg1 string) (int64, error)
- func (m *MockIClient) GetBlockchainHeight(arg0 context.Context) (uint32, error)
- func (m *MockIClient) GetBlockchainInfo(arg0 context.Context) (*pactus.GetBlockchainInfoResponse, error)
- func (m *MockIClient) GetNetworkInfo(arg0 context.Context) (*pactus.GetNetworkInfoResponse, error)
- func (m *MockIClient) GetTransactionData(arg0 context.Context, arg1 string) (*pactus.GetTransactionResponse, error)
- func (m *MockIClient) GetValidatorInfo(arg0 context.Context, arg1 string) (*pactus.GetValidatorResponse, error)
- func (m *MockIClient) GetValidatorInfoByNumber(arg0 context.Context, arg1 int32) (*pactus.GetValidatorResponse, error)
- func (m *MockIClient) LastBlockTime(arg0 context.Context) (uint32, uint32, error)
- type MockIClientMockRecorder
- func (mr *MockIClientMockRecorder) Close() *gomock.Call
- func (mr *MockIClientMockRecorder) GetBalance(arg0, arg1 any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetBlockchainHeight(arg0 any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetBlockchainInfo(arg0 any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetNetworkInfo(arg0 any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetTransactionData(arg0, arg1 any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetValidatorInfo(arg0, arg1 any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetValidatorInfoByNumber(arg0, arg1 any) *gomock.Call
- func (mr *MockIClientMockRecorder) LastBlockTime(arg0 any) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetBalance ¶
func (*Client) GetBlockchainHeight ¶
func (*Client) GetBlockchainInfo ¶
func (*Client) GetNetworkInfo ¶
func (*Client) GetNodeInfo ¶
func (*Client) GetPeerInfo ¶
func (*Client) GetTransactionData ¶
func (*Client) GetValidatorInfo ¶
func (*Client) GetValidatorInfoByNumber ¶
func (*Client) LastBlockTime ¶
func (*Client) TransactionData ¶
type IClient ¶
type IClient interface { GetBlockchainInfo(context.Context) (*pactus.GetBlockchainInfoResponse, error) GetBlockchainHeight(context.Context) (uint32, error) LastBlockTime(context.Context) (uint32, uint32, error) GetNetworkInfo(context.Context) (*pactus.GetNetworkInfoResponse, error) GetValidatorInfo(context.Context, string) (*pactus.GetValidatorResponse, error) GetValidatorInfoByNumber(context.Context, int32) (*pactus.GetValidatorResponse, error) GetTransactionData(context.Context, string) (*pactus.GetTransactionResponse, error) GetBalance(context.Context, string) (int64, error) Close() error }
type Mgr ¶
type Mgr struct {
// contains filtered or unexported fields
}
func NewClientMgr ¶
func (*Mgr) FindPublicKey ¶
func (*Mgr) GetBlockchainHeight ¶
func (*Mgr) GetBlockchainInfo ¶
func (cm *Mgr) GetBlockchainInfo() (*pactus.GetBlockchainInfoResponse, error)
func (*Mgr) GetCirculatingSupply ¶
func (*Mgr) GetLastBlockTime ¶
func (*Mgr) GetNetworkInfo ¶
func (cm *Mgr) GetNetworkInfo() (*pactus.GetNetworkInfoResponse, error)
func (*Mgr) GetRandomClient ¶
func (*Mgr) GetTransactionData ¶
func (cm *Mgr) GetTransactionData(txID string) (*pactus.GetTransactionResponse, error)
func (*Mgr) GetValidatorInfo ¶
func (cm *Mgr) GetValidatorInfo(address string) (*pactus.GetValidatorResponse, error)
func (*Mgr) GetValidatorInfoByNumber ¶
func (cm *Mgr) GetValidatorInfoByNumber(num int32) (*pactus.GetValidatorResponse, error)
type MockIClient ¶
type MockIClient struct {
// contains filtered or unexported fields
}
MockIClient is a mock of IClient interface.
func NewMockIClient ¶
func NewMockIClient(ctrl *gomock.Controller) *MockIClient
NewMockIClient creates a new mock instance.
func (*MockIClient) EXPECT ¶
func (m *MockIClient) EXPECT() *MockIClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIClient) GetBalance ¶
GetBalance mocks base method.
func (*MockIClient) GetBlockchainHeight ¶
func (m *MockIClient) GetBlockchainHeight(arg0 context.Context) (uint32, error)
GetBlockchainHeight mocks base method.
func (*MockIClient) GetBlockchainInfo ¶
func (m *MockIClient) GetBlockchainInfo(arg0 context.Context) (*pactus.GetBlockchainInfoResponse, error)
GetBlockchainInfo mocks base method.
func (*MockIClient) GetNetworkInfo ¶
func (m *MockIClient) GetNetworkInfo(arg0 context.Context) (*pactus.GetNetworkInfoResponse, error)
GetNetworkInfo mocks base method.
func (*MockIClient) GetTransactionData ¶
func (m *MockIClient) GetTransactionData(arg0 context.Context, arg1 string) (*pactus.GetTransactionResponse, error)
GetTransactionData mocks base method.
func (*MockIClient) GetValidatorInfo ¶
func (m *MockIClient) GetValidatorInfo(arg0 context.Context, arg1 string) (*pactus.GetValidatorResponse, error)
GetValidatorInfo mocks base method.
func (*MockIClient) GetValidatorInfoByNumber ¶
func (m *MockIClient) GetValidatorInfoByNumber(arg0 context.Context, arg1 int32) (*pactus.GetValidatorResponse, error)
GetValidatorInfoByNumber mocks base method.
func (*MockIClient) LastBlockTime ¶
LastBlockTime mocks base method.
type MockIClientMockRecorder ¶
type MockIClientMockRecorder struct {
// contains filtered or unexported fields
}
MockIClientMockRecorder is the mock recorder for MockIClient.
func (*MockIClientMockRecorder) Close ¶
func (mr *MockIClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockIClientMockRecorder) GetBalance ¶
func (mr *MockIClientMockRecorder) GetBalance(arg0, arg1 any) *gomock.Call
GetBalance indicates an expected call of GetBalance.
func (*MockIClientMockRecorder) GetBlockchainHeight ¶
func (mr *MockIClientMockRecorder) GetBlockchainHeight(arg0 any) *gomock.Call
GetBlockchainHeight indicates an expected call of GetBlockchainHeight.
func (*MockIClientMockRecorder) GetBlockchainInfo ¶
func (mr *MockIClientMockRecorder) GetBlockchainInfo(arg0 any) *gomock.Call
GetBlockchainInfo indicates an expected call of GetBlockchainInfo.
func (*MockIClientMockRecorder) GetNetworkInfo ¶
func (mr *MockIClientMockRecorder) GetNetworkInfo(arg0 any) *gomock.Call
GetNetworkInfo indicates an expected call of GetNetworkInfo.
func (*MockIClientMockRecorder) GetTransactionData ¶
func (mr *MockIClientMockRecorder) GetTransactionData(arg0, arg1 any) *gomock.Call
GetTransactionData indicates an expected call of GetTransactionData.
func (*MockIClientMockRecorder) GetValidatorInfo ¶
func (mr *MockIClientMockRecorder) GetValidatorInfo(arg0, arg1 any) *gomock.Call
GetValidatorInfo indicates an expected call of GetValidatorInfo.
func (*MockIClientMockRecorder) GetValidatorInfoByNumber ¶
func (mr *MockIClientMockRecorder) GetValidatorInfoByNumber(arg0, arg1 any) *gomock.Call
GetValidatorInfoByNumber indicates an expected call of GetValidatorInfoByNumber.
func (*MockIClientMockRecorder) LastBlockTime ¶
func (mr *MockIClientMockRecorder) LastBlockTime(arg0 any) *gomock.Call
LastBlockTime indicates an expected call of LastBlockTime.