Documentation
¶
Index ¶
- func NewMockBCClient(t *testing.T) bcclientgo.BCClient
- type MockBCClient
- func (c *MockBCClient) Account() (bcgo.Account, error)
- func (c *MockBCClient) Block(channel string, hash []byte) (*bcgo.Block, error)
- func (c *MockBCClient) Cache() (bcgo.Cache, error)
- func (c *MockBCClient) Chain(channel string, callback func([]byte, *bcgo.Block) error) error
- func (c *MockBCClient) ExportKeys(peer, alias string, password []byte) (string, error)
- func (c *MockBCClient) HasAccount() bool
- func (c *MockBCClient) HasCache() bool
- func (c *MockBCClient) HasNetwork() bool
- func (c *MockBCClient) HasNode() bool
- func (c *MockBCClient) Head(channel string) ([]byte, error)
- func (c *MockBCClient) ImportKeys(peer, alias, accessCode string) error
- func (c *MockBCClient) Mine(channel string, threshold uint64, listener bcgo.MiningListener) ([]byte, error)
- func (c *MockBCClient) Network() (bcgo.Network, error)
- func (c *MockBCClient) Node() (bcgo.Node, error)
- func (c *MockBCClient) Peers() []string
- func (c *MockBCClient) PublicKey(alias string) (cryptogo.PublicKeyFormat, []byte, error)
- func (c *MockBCClient) Pull(channel string) error
- func (c *MockBCClient) Purge() error
- func (c *MockBCClient) Push(channel string) error
- func (c *MockBCClient) Read(channel string, blockHash []byte, recordHash []byte, output io.Writer) error
- func (c *MockBCClient) ReadKey(channel string, blockHash []byte, recordHash []byte, output io.Writer) error
- func (c *MockBCClient) ReadPayload(channel string, blockHash []byte, recordHash []byte, output io.Writer) error
- func (c *MockBCClient) Record(channel string, hash []byte) (*bcgo.Record, error)
- func (c *MockBCClient) Root() (string, error)
- func (c *MockBCClient) SetAccount(account bcgo.Account)
- func (c *MockBCClient) SetCache(cache bcgo.Cache)
- func (c *MockBCClient) SetNetwork(network bcgo.Network)
- func (c *MockBCClient) SetNode(node bcgo.Node)
- func (c *MockBCClient) SetPeers(peers ...string)
- func (c *MockBCClient) SetRoot(root string)
- func (c *MockBCClient) Write(channel string, accesses []string, input io.Reader) (int, error)
- type MockBlockCallbackResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockBCClient ¶
func NewMockBCClient(t *testing.T) bcclientgo.BCClient
Types ¶
type MockBCClient ¶
type MockBCClient struct { MockRoot string MockPeers []string MockCache bcgo.Cache MockNetwork bcgo.Network MockAccount bcgo.Account MockNode bcgo.Node MockListener bcgo.MiningListener MockAlias string MockPeer string MockHasCache, MockHasNetwork, MockHasAccount, MockHasNode bool MockPublicKeyBytes []byte MockPublicKeyFormat cryptogo.PublicKeyFormat MockChannel string MockHeadHash, MockBlockHash, MockRecordHash []byte MockBlockCallback func([]byte, *bcgo.Block) error MockBlockCallbackResults []*MockBlockCallbackResult MockBlock *bcgo.Block MockRecord *bcgo.Record MockWriter io.Writer MockAccesses []string MockReader io.Reader MockWriteCount int MockThreshold uint64 MockPassword []byte MockAccessCode string MockRootError, MockCacheError, MockNetworkError, MockAccountError, MockNodeError, MockPublicKeyError error MockHeadError, MockChainError, MockBlockError, MockRecordError, MockPushError, MockPullError error MockPurgeError, MockImportError, MockExportError, MockReadError, MockReadKeyError, MockReadPayloadError, MockWriteError, MockMineError error }
func (*MockBCClient) Account ¶ added in v1.2.2
func (c *MockBCClient) Account() (bcgo.Account, error)
func (*MockBCClient) ExportKeys ¶
func (c *MockBCClient) ExportKeys(peer, alias string, password []byte) (string, error)
func (*MockBCClient) HasAccount ¶ added in v1.2.2
func (c *MockBCClient) HasAccount() bool
func (*MockBCClient) HasCache ¶ added in v1.2.2
func (c *MockBCClient) HasCache() bool
func (*MockBCClient) HasNetwork ¶ added in v1.2.2
func (c *MockBCClient) HasNetwork() bool
func (*MockBCClient) HasNode ¶ added in v1.2.2
func (c *MockBCClient) HasNode() bool
func (*MockBCClient) ImportKeys ¶
func (c *MockBCClient) ImportKeys(peer, alias, accessCode string) error
func (*MockBCClient) Mine ¶
func (c *MockBCClient) Mine(channel string, threshold uint64, listener bcgo.MiningListener) ([]byte, error)
func (*MockBCClient) Peers ¶
func (c *MockBCClient) Peers() []string
func (*MockBCClient) PublicKey ¶
func (c *MockBCClient) PublicKey(alias string) (cryptogo.PublicKeyFormat, []byte, error)
func (*MockBCClient) Pull ¶
func (c *MockBCClient) Pull(channel string) error
func (*MockBCClient) Purge ¶
func (c *MockBCClient) Purge() error
func (*MockBCClient) Push ¶
func (c *MockBCClient) Push(channel string) error
func (*MockBCClient) ReadPayload ¶
func (*MockBCClient) Root ¶
func (c *MockBCClient) Root() (string, error)
func (*MockBCClient) SetAccount ¶ added in v1.2.2
func (c *MockBCClient) SetAccount(account bcgo.Account)
func (*MockBCClient) SetCache ¶
func (c *MockBCClient) SetCache(cache bcgo.Cache)
func (*MockBCClient) SetNetwork ¶
func (c *MockBCClient) SetNetwork(network bcgo.Network)
func (*MockBCClient) SetNode ¶
func (c *MockBCClient) SetNode(node bcgo.Node)
func (*MockBCClient) SetPeers ¶
func (c *MockBCClient) SetPeers(peers ...string)
func (*MockBCClient) SetRoot ¶
func (c *MockBCClient) SetRoot(root string)
type MockBlockCallbackResult ¶
Click to show internal directories.
Click to hide internal directories.