mock

package
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressContainerMock

type AddressContainerMock struct {
	BytesField []byte
}

func (*AddressContainerMock) Bytes

func (adr *AddressContainerMock) Bytes() []byte

type AddressConverterStub

type AddressConverterStub struct {
	CreateAddressFromPublicKeyBytesCalled func(pubKey []byte) (state.AddressContainer, error)
	ConvertToHexCalled                    func(addressContainer state.AddressContainer) (string, error)
	CreateAddressFromHexCalled            func(hexAddress string) (state.AddressContainer, error)
	PrepareAddressBytesCalled             func(addressBytes []byte) ([]byte, error)
}

func (*AddressConverterStub) ConvertToHex

func (acs *AddressConverterStub) ConvertToHex(addressContainer state.AddressContainer) (string, error)

func (*AddressConverterStub) CreateAddressFromHex

func (acs *AddressConverterStub) CreateAddressFromHex(hexAddress string) (state.AddressContainer, error)

func (*AddressConverterStub) CreateAddressFromPublicKeyBytes

func (acs *AddressConverterStub) CreateAddressFromPublicKeyBytes(pubKey []byte) (state.AddressContainer, error)

func (*AddressConverterStub) PrepareAddressBytes

func (acs *AddressConverterStub) PrepareAddressBytes(addressBytes []byte) ([]byte, error)

type ProcessorStub

type ProcessorStub struct {
	ApplyConfigCalled          func(cfg *config.Config) error
	GetObserversCalled         func(shardId uint32) ([]*data.Observer, error)
	ComputeShardIdCalled       func(addressBuff []byte) (uint32, error)
	CallGetRestEndPointCalled  func(address string, path string, value interface{}) error
	CallPostRestEndPointCalled func(address string, path string, data interface{}, response interface{}) error
}

func (*ProcessorStub) ApplyConfig

func (ps *ProcessorStub) ApplyConfig(cfg *config.Config) error

func (*ProcessorStub) CallGetRestEndPoint

func (ps *ProcessorStub) CallGetRestEndPoint(address string, path string, value interface{}) error

func (*ProcessorStub) CallPostRestEndPoint

func (ps *ProcessorStub) CallPostRestEndPoint(address string, path string, data interface{}, response interface{}) error

func (*ProcessorStub) ComputeShardId

func (ps *ProcessorStub) ComputeShardId(addressBuff []byte) (uint32, error)

func (*ProcessorStub) GetObservers

func (ps *ProcessorStub) GetObservers(shardId uint32) ([]*data.Observer, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL