Versions in this module Expand all Collapse all v0 v0.4.0 Apr 4, 2024 Changes in this version + func StartAdminApiServer(t *testing.T, service *AdminServiceMock) string + func StartServer(t *testing.T, services map[string]interface{}) string + func StartStateApiServer(t *testing.T, service *StateServiceMock) string + type AdminServiceMock struct + InfoResponse *abrpc.NodeInfoResponse + func NewAdminServiceMock(opts ...Option) *AdminServiceMock + func (s *AdminServiceMock) GetNodeInfo() (*abrpc.NodeInfoResponse, error) + type Option func(*Options) + func WithError(err error) Option + func WithInfoResponse(infoResponse *abrpc.NodeInfoResponse) Option + func WithOwnerUnit(unit *abrpc.Unit[any]) Option + func WithRoundNumber(roundNumber uint64) Option + func WithTxProof(txHash []byte, txProof *abrpc.TransactionRecordAndProof) Option + func WithUnit(unit *abrpc.Unit[any]) Option + func WithUnits(units ...*abrpc.Unit[any]) Option + type Options struct + Err error + InfoResponse *abrpc.NodeInfoResponse + OwnerUnits map[string][]types.UnitID + RoundNumber uint64 + TxProofs map[string]*abrpc.TransactionRecordAndProof + Units map[string]*abrpc.Unit[any] + type StateServiceMock struct + Block types.Bytes + Err error + OwnerUnitIDs map[string][]types.UnitID + RoundNumber uint64 + SentTxs map[string]*types.TransactionOrder + TxProofs map[string]*abrpc.TransactionRecordAndProof + Units map[string]*abrpc.Unit[any] + func NewStateServiceMock(opts ...Option) *StateServiceMock + func (s *StateServiceMock) GetBlock(ctx context.Context, roundNumber types.Uint64) (types.Bytes, error) + func (s *StateServiceMock) GetRoundNumber(ctx context.Context) (types.Uint64, error) + func (s *StateServiceMock) GetTransactionProof(ctx context.Context, txHash types.Bytes) (*abrpc.TransactionRecordAndProof, error) + func (s *StateServiceMock) GetUnit(unitID types.UnitID, includeStateProof bool) (*abrpc.Unit[any], error) + func (s *StateServiceMock) GetUnitsByOwnerID(ownerID types.Bytes) ([]types.UnitID, error) + func (s *StateServiceMock) Reset() + func (s *StateServiceMock) SendTransaction(ctx context.Context, tx types.Bytes) (types.Bytes, error)