artifacts

package
v0.9.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 22 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrObjectDeactivated = errors.New("object is deactivated")
	ErrNotFound          = errors.New("object not found")
	ErrNoReply           = errors.New("timeout while awaiting reply from watermill")
)

Custom errors possibly useful to check by artifact manager callers.

Functions

func NewClient

func NewClient(sender bus.Sender) *client

NewClient creates new client instance.

Types

type CacheMock

type CacheMock struct {
	// contains filtered or unexported fields
}

CacheMock implements cache

func NewCacheMock

func NewCacheMock(t minimock.Tester) *CacheMock

NewCacheMock returns a mock for cache

func (*CacheMock) MinimockFinish

func (m *CacheMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*CacheMock) MinimockWait

func (m *CacheMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*CacheMock) MinimockgetDone

func (m *CacheMock) MinimockgetDone() bool

MinimockgetDone returns true if the count of the get invocations corresponds the number of defined expectations

func (*CacheMock) MinimockgetInspect

func (m *CacheMock) MinimockgetInspect()

MinimockgetInspect logs each unmet expectation

type CacheMockgetExpectation

type CacheMockgetExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

CacheMockgetExpectation specifies expectation struct of the cache.get

func (*CacheMockgetExpectation) Then

func (e *CacheMockgetExpectation) Then(val interface{}, err error) *CacheMock

Then sets up cache.get return parameters for the expectation previously defined by the When method

type CacheMockgetParams

type CacheMockgetParams struct {
	// contains filtered or unexported fields
}

CacheMockgetParams contains parameters of the cache.get

type CacheMockgetResults

type CacheMockgetResults struct {
	// contains filtered or unexported fields
}

CacheMockgetResults contains results of the cache.get

type Client

type Client interface {
	// RegisterIncomingRequest creates an incoming request record in storage.
	RegisterIncomingRequest(ctx context.Context, request *record.IncomingRequest) (*payload.RequestInfo, error)
	// RegisterIncomingRequest creates an outgoing request record in storage.
	RegisterOutgoingRequest(ctx context.Context, request *record.OutgoingRequest) (*payload.RequestInfo, error)

	// RegisterResult saves VM method call result and side-effect
	RegisterResult(ctx context.Context, request insolar.Reference, result RequestResult) error

	// GetAbandonedRequest returns an incoming or outgoing request for an object.
	GetAbandonedRequest(ctx context.Context, objectRef, reqRef insolar.Reference) (record.Request, error)

	// GetPendings returns pending request IDs of an object.
	GetPendings(ctx context.Context, objectRef insolar.Reference) ([]insolar.Reference, error)

	// HasPendings returns true if object has unclosed requests.
	HasPendings(ctx context.Context, object insolar.Reference) (bool, error)

	// GetCode returns code from code record by provided reference according to provided machine preference.
	//
	// This method is used by VM to fetch code for execution.
	GetCode(ctx context.Context, ref insolar.Reference) (CodeDescriptor, error)

	// GetObject returns descriptor for provided state.
	//
	// If provided state is nil, the latest state will be returned (with deactivation check). Returned descriptor will
	// provide methods for fetching all related data.
	GetObject(ctx context.Context, head insolar.Reference) (ObjectDescriptor, error)

	// DeployCode creates new code record in storage.
	//
	// Code records are used to activate prototype.
	DeployCode(ctx context.Context, domain, request insolar.Reference, code []byte, machineType insolar.MachineType) (*insolar.ID, error)

	// ActivatePrototype creates activate object record in storage. Provided prototype reference will be used as objects prototype
	// memory as memory of created object. If memory is not provided, the prototype default memory will be used.
	//
	// Request reference will be this object's identifier and referred as "object head".
	ActivatePrototype(
		ctx context.Context,
		request, parent, code insolar.Reference,
		memory []byte,
	) error

	// State returns hash state for artifact manager.
	State() []byte

	// InjectCodeDescriptor injects code descriptor needed by builtin contracts
	InjectCodeDescriptor(insolar.Reference, CodeDescriptor)
	// InjectObjectDescriptor injects object descriptor needed by builtin contracts (to store prototypes)
	InjectObjectDescriptor(insolar.Reference, ObjectDescriptor)
	// InjectFinish finalizes all injects, all next injects will panic
	InjectFinish()
}

Client is a high level storage interface.

type ClientMock

type ClientMock struct {
	ActivatePrototypeMock mClientMockActivatePrototype

	DeployCodeMock mClientMockDeployCode

	GetAbandonedRequestMock mClientMockGetAbandonedRequest

	GetCodeMock mClientMockGetCode

	GetObjectMock mClientMockGetObject

	GetPendingsMock mClientMockGetPendings

	HasPendingsMock mClientMockHasPendings

	InjectCodeDescriptorMock mClientMockInjectCodeDescriptor

	InjectFinishMock mClientMockInjectFinish

	InjectObjectDescriptorMock mClientMockInjectObjectDescriptor

	RegisterIncomingRequestMock mClientMockRegisterIncomingRequest

	RegisterOutgoingRequestMock mClientMockRegisterOutgoingRequest

	RegisterResultMock mClientMockRegisterResult

	StateMock mClientMockState
	// contains filtered or unexported fields
}

ClientMock implements Client

func NewClientMock

func NewClientMock(t minimock.Tester) *ClientMock

NewClientMock returns a mock for Client

func (*ClientMock) ActivatePrototype

func (mmActivatePrototype *ClientMock) ActivatePrototype(ctx context.Context, request insolar.Reference, parent insolar.Reference, code insolar.Reference, memory []byte) (err error)

ActivatePrototype implements Client

func (*ClientMock) ActivatePrototypeAfterCounter

func (mmActivatePrototype *ClientMock) ActivatePrototypeAfterCounter() uint64

ActivatePrototypeAfterCounter returns a count of finished ClientMock.ActivatePrototype invocations

func (*ClientMock) ActivatePrototypeBeforeCounter

func (mmActivatePrototype *ClientMock) ActivatePrototypeBeforeCounter() uint64

ActivatePrototypeBeforeCounter returns a count of ClientMock.ActivatePrototype invocations

func (*ClientMock) DeployCode

func (mmDeployCode *ClientMock) DeployCode(ctx context.Context, domain insolar.Reference, request insolar.Reference, code []byte, machineType insolar.MachineType) (ip1 *insolar.ID, err error)

DeployCode implements Client

func (*ClientMock) DeployCodeAfterCounter

func (mmDeployCode *ClientMock) DeployCodeAfterCounter() uint64

DeployCodeAfterCounter returns a count of finished ClientMock.DeployCode invocations

func (*ClientMock) DeployCodeBeforeCounter

func (mmDeployCode *ClientMock) DeployCodeBeforeCounter() uint64

DeployCodeBeforeCounter returns a count of ClientMock.DeployCode invocations

func (*ClientMock) GetAbandonedRequest

func (mmGetAbandonedRequest *ClientMock) GetAbandonedRequest(ctx context.Context, objectRef insolar.Reference, reqRef insolar.Reference) (r1 record.Request, err error)

GetAbandonedRequest implements Client

func (*ClientMock) GetAbandonedRequestAfterCounter

func (mmGetAbandonedRequest *ClientMock) GetAbandonedRequestAfterCounter() uint64

GetAbandonedRequestAfterCounter returns a count of finished ClientMock.GetAbandonedRequest invocations

func (*ClientMock) GetAbandonedRequestBeforeCounter

func (mmGetAbandonedRequest *ClientMock) GetAbandonedRequestBeforeCounter() uint64

GetAbandonedRequestBeforeCounter returns a count of ClientMock.GetAbandonedRequest invocations

func (*ClientMock) GetCode

func (mmGetCode *ClientMock) GetCode(ctx context.Context, ref insolar.Reference) (c2 CodeDescriptor, err error)

GetCode implements Client

func (*ClientMock) GetCodeAfterCounter

func (mmGetCode *ClientMock) GetCodeAfterCounter() uint64

GetCodeAfterCounter returns a count of finished ClientMock.GetCode invocations

func (*ClientMock) GetCodeBeforeCounter

func (mmGetCode *ClientMock) GetCodeBeforeCounter() uint64

GetCodeBeforeCounter returns a count of ClientMock.GetCode invocations

func (*ClientMock) GetObject

func (mmGetObject *ClientMock) GetObject(ctx context.Context, head insolar.Reference) (o1 ObjectDescriptor, err error)

GetObject implements Client

func (*ClientMock) GetObjectAfterCounter

func (mmGetObject *ClientMock) GetObjectAfterCounter() uint64

GetObjectAfterCounter returns a count of finished ClientMock.GetObject invocations

func (*ClientMock) GetObjectBeforeCounter

func (mmGetObject *ClientMock) GetObjectBeforeCounter() uint64

GetObjectBeforeCounter returns a count of ClientMock.GetObject invocations

func (*ClientMock) GetPendings

func (mmGetPendings *ClientMock) GetPendings(ctx context.Context, objectRef insolar.Reference) (ra1 []insolar.Reference, err error)

GetPendings implements Client

func (*ClientMock) GetPendingsAfterCounter

func (mmGetPendings *ClientMock) GetPendingsAfterCounter() uint64

GetPendingsAfterCounter returns a count of finished ClientMock.GetPendings invocations

func (*ClientMock) GetPendingsBeforeCounter

func (mmGetPendings *ClientMock) GetPendingsBeforeCounter() uint64

GetPendingsBeforeCounter returns a count of ClientMock.GetPendings invocations

func (*ClientMock) HasPendings

func (mmHasPendings *ClientMock) HasPendings(ctx context.Context, object insolar.Reference) (b1 bool, err error)

HasPendings implements Client

func (*ClientMock) HasPendingsAfterCounter

func (mmHasPendings *ClientMock) HasPendingsAfterCounter() uint64

HasPendingsAfterCounter returns a count of finished ClientMock.HasPendings invocations

func (*ClientMock) HasPendingsBeforeCounter

func (mmHasPendings *ClientMock) HasPendingsBeforeCounter() uint64

HasPendingsBeforeCounter returns a count of ClientMock.HasPendings invocations

func (*ClientMock) InjectCodeDescriptor

func (mmInjectCodeDescriptor *ClientMock) InjectCodeDescriptor(r1 insolar.Reference, c1 CodeDescriptor)

InjectCodeDescriptor implements Client

func (*ClientMock) InjectCodeDescriptorAfterCounter

func (mmInjectCodeDescriptor *ClientMock) InjectCodeDescriptorAfterCounter() uint64

InjectCodeDescriptorAfterCounter returns a count of finished ClientMock.InjectCodeDescriptor invocations

func (*ClientMock) InjectCodeDescriptorBeforeCounter

func (mmInjectCodeDescriptor *ClientMock) InjectCodeDescriptorBeforeCounter() uint64

InjectCodeDescriptorBeforeCounter returns a count of ClientMock.InjectCodeDescriptor invocations

func (*ClientMock) InjectFinish

func (mmInjectFinish *ClientMock) InjectFinish()

InjectFinish implements Client

func (*ClientMock) InjectFinishAfterCounter

func (mmInjectFinish *ClientMock) InjectFinishAfterCounter() uint64

InjectFinishAfterCounter returns a count of finished ClientMock.InjectFinish invocations

func (*ClientMock) InjectFinishBeforeCounter

func (mmInjectFinish *ClientMock) InjectFinishBeforeCounter() uint64

InjectFinishBeforeCounter returns a count of ClientMock.InjectFinish invocations

func (*ClientMock) InjectObjectDescriptor

func (mmInjectObjectDescriptor *ClientMock) InjectObjectDescriptor(r1 insolar.Reference, o1 ObjectDescriptor)

InjectObjectDescriptor implements Client

func (*ClientMock) InjectObjectDescriptorAfterCounter

func (mmInjectObjectDescriptor *ClientMock) InjectObjectDescriptorAfterCounter() uint64

InjectObjectDescriptorAfterCounter returns a count of finished ClientMock.InjectObjectDescriptor invocations

func (*ClientMock) InjectObjectDescriptorBeforeCounter

func (mmInjectObjectDescriptor *ClientMock) InjectObjectDescriptorBeforeCounter() uint64

InjectObjectDescriptorBeforeCounter returns a count of ClientMock.InjectObjectDescriptor invocations

func (*ClientMock) MinimockActivatePrototypeDone

func (m *ClientMock) MinimockActivatePrototypeDone() bool

MinimockActivatePrototypeDone returns true if the count of the ActivatePrototype invocations corresponds the number of defined expectations

func (*ClientMock) MinimockActivatePrototypeInspect

func (m *ClientMock) MinimockActivatePrototypeInspect()

MinimockActivatePrototypeInspect logs each unmet expectation

func (*ClientMock) MinimockDeployCodeDone

func (m *ClientMock) MinimockDeployCodeDone() bool

MinimockDeployCodeDone returns true if the count of the DeployCode invocations corresponds the number of defined expectations

func (*ClientMock) MinimockDeployCodeInspect

func (m *ClientMock) MinimockDeployCodeInspect()

MinimockDeployCodeInspect logs each unmet expectation

func (*ClientMock) MinimockFinish

func (m *ClientMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ClientMock) MinimockGetAbandonedRequestDone

func (m *ClientMock) MinimockGetAbandonedRequestDone() bool

MinimockGetAbandonedRequestDone returns true if the count of the GetAbandonedRequest invocations corresponds the number of defined expectations

func (*ClientMock) MinimockGetAbandonedRequestInspect

func (m *ClientMock) MinimockGetAbandonedRequestInspect()

MinimockGetAbandonedRequestInspect logs each unmet expectation

func (*ClientMock) MinimockGetCodeDone

func (m *ClientMock) MinimockGetCodeDone() bool

MinimockGetCodeDone returns true if the count of the GetCode invocations corresponds the number of defined expectations

func (*ClientMock) MinimockGetCodeInspect

func (m *ClientMock) MinimockGetCodeInspect()

MinimockGetCodeInspect logs each unmet expectation

func (*ClientMock) MinimockGetObjectDone

func (m *ClientMock) MinimockGetObjectDone() bool

MinimockGetObjectDone returns true if the count of the GetObject invocations corresponds the number of defined expectations

func (*ClientMock) MinimockGetObjectInspect

func (m *ClientMock) MinimockGetObjectInspect()

MinimockGetObjectInspect logs each unmet expectation

func (*ClientMock) MinimockGetPendingsDone

func (m *ClientMock) MinimockGetPendingsDone() bool

MinimockGetPendingsDone returns true if the count of the GetPendings invocations corresponds the number of defined expectations

func (*ClientMock) MinimockGetPendingsInspect

func (m *ClientMock) MinimockGetPendingsInspect()

MinimockGetPendingsInspect logs each unmet expectation

func (*ClientMock) MinimockHasPendingsDone

func (m *ClientMock) MinimockHasPendingsDone() bool

MinimockHasPendingsDone returns true if the count of the HasPendings invocations corresponds the number of defined expectations

func (*ClientMock) MinimockHasPendingsInspect

func (m *ClientMock) MinimockHasPendingsInspect()

MinimockHasPendingsInspect logs each unmet expectation

func (*ClientMock) MinimockInjectCodeDescriptorDone

func (m *ClientMock) MinimockInjectCodeDescriptorDone() bool

MinimockInjectCodeDescriptorDone returns true if the count of the InjectCodeDescriptor invocations corresponds the number of defined expectations

func (*ClientMock) MinimockInjectCodeDescriptorInspect

func (m *ClientMock) MinimockInjectCodeDescriptorInspect()

MinimockInjectCodeDescriptorInspect logs each unmet expectation

func (*ClientMock) MinimockInjectFinishDone

func (m *ClientMock) MinimockInjectFinishDone() bool

MinimockInjectFinishDone returns true if the count of the InjectFinish invocations corresponds the number of defined expectations

func (*ClientMock) MinimockInjectFinishInspect

func (m *ClientMock) MinimockInjectFinishInspect()

MinimockInjectFinishInspect logs each unmet expectation

func (*ClientMock) MinimockInjectObjectDescriptorDone

func (m *ClientMock) MinimockInjectObjectDescriptorDone() bool

MinimockInjectObjectDescriptorDone returns true if the count of the InjectObjectDescriptor invocations corresponds the number of defined expectations

func (*ClientMock) MinimockInjectObjectDescriptorInspect

func (m *ClientMock) MinimockInjectObjectDescriptorInspect()

MinimockInjectObjectDescriptorInspect logs each unmet expectation

func (*ClientMock) MinimockRegisterIncomingRequestDone

func (m *ClientMock) MinimockRegisterIncomingRequestDone() bool

MinimockRegisterIncomingRequestDone returns true if the count of the RegisterIncomingRequest invocations corresponds the number of defined expectations

func (*ClientMock) MinimockRegisterIncomingRequestInspect

func (m *ClientMock) MinimockRegisterIncomingRequestInspect()

MinimockRegisterIncomingRequestInspect logs each unmet expectation

func (*ClientMock) MinimockRegisterOutgoingRequestDone

func (m *ClientMock) MinimockRegisterOutgoingRequestDone() bool

MinimockRegisterOutgoingRequestDone returns true if the count of the RegisterOutgoingRequest invocations corresponds the number of defined expectations

func (*ClientMock) MinimockRegisterOutgoingRequestInspect

func (m *ClientMock) MinimockRegisterOutgoingRequestInspect()

MinimockRegisterOutgoingRequestInspect logs each unmet expectation

func (*ClientMock) MinimockRegisterResultDone

func (m *ClientMock) MinimockRegisterResultDone() bool

MinimockRegisterResultDone returns true if the count of the RegisterResult invocations corresponds the number of defined expectations

func (*ClientMock) MinimockRegisterResultInspect

func (m *ClientMock) MinimockRegisterResultInspect()

MinimockRegisterResultInspect logs each unmet expectation

func (*ClientMock) MinimockStateDone

func (m *ClientMock) MinimockStateDone() bool

MinimockStateDone returns true if the count of the State invocations corresponds the number of defined expectations

func (*ClientMock) MinimockStateInspect

func (m *ClientMock) MinimockStateInspect()

MinimockStateInspect logs each unmet expectation

func (*ClientMock) MinimockWait

func (m *ClientMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*ClientMock) RegisterIncomingRequest

func (mmRegisterIncomingRequest *ClientMock) RegisterIncomingRequest(ctx context.Context, request *record.IncomingRequest) (rp1 *payload.RequestInfo, err error)

RegisterIncomingRequest implements Client

func (*ClientMock) RegisterIncomingRequestAfterCounter

func (mmRegisterIncomingRequest *ClientMock) RegisterIncomingRequestAfterCounter() uint64

RegisterIncomingRequestAfterCounter returns a count of finished ClientMock.RegisterIncomingRequest invocations

func (*ClientMock) RegisterIncomingRequestBeforeCounter

func (mmRegisterIncomingRequest *ClientMock) RegisterIncomingRequestBeforeCounter() uint64

RegisterIncomingRequestBeforeCounter returns a count of ClientMock.RegisterIncomingRequest invocations

func (*ClientMock) RegisterOutgoingRequest

func (mmRegisterOutgoingRequest *ClientMock) RegisterOutgoingRequest(ctx context.Context, request *record.OutgoingRequest) (rp1 *payload.RequestInfo, err error)

RegisterOutgoingRequest implements Client

func (*ClientMock) RegisterOutgoingRequestAfterCounter

func (mmRegisterOutgoingRequest *ClientMock) RegisterOutgoingRequestAfterCounter() uint64

RegisterOutgoingRequestAfterCounter returns a count of finished ClientMock.RegisterOutgoingRequest invocations

func (*ClientMock) RegisterOutgoingRequestBeforeCounter

func (mmRegisterOutgoingRequest *ClientMock) RegisterOutgoingRequestBeforeCounter() uint64

RegisterOutgoingRequestBeforeCounter returns a count of ClientMock.RegisterOutgoingRequest invocations

func (*ClientMock) RegisterResult

func (mmRegisterResult *ClientMock) RegisterResult(ctx context.Context, request insolar.Reference, result RequestResult) (err error)

RegisterResult implements Client

func (*ClientMock) RegisterResultAfterCounter

func (mmRegisterResult *ClientMock) RegisterResultAfterCounter() uint64

RegisterResultAfterCounter returns a count of finished ClientMock.RegisterResult invocations

func (*ClientMock) RegisterResultBeforeCounter

func (mmRegisterResult *ClientMock) RegisterResultBeforeCounter() uint64

RegisterResultBeforeCounter returns a count of ClientMock.RegisterResult invocations

func (*ClientMock) State

func (mmState *ClientMock) State() (ba1 []byte)

State implements Client

func (*ClientMock) StateAfterCounter

func (mmState *ClientMock) StateAfterCounter() uint64

StateAfterCounter returns a count of finished ClientMock.State invocations

func (*ClientMock) StateBeforeCounter

func (mmState *ClientMock) StateBeforeCounter() uint64

StateBeforeCounter returns a count of ClientMock.State invocations

type ClientMockActivatePrototypeExpectation

type ClientMockActivatePrototypeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockActivatePrototypeExpectation specifies expectation struct of the Client.ActivatePrototype

func (*ClientMockActivatePrototypeExpectation) Then

Then sets up Client.ActivatePrototype return parameters for the expectation previously defined by the When method

type ClientMockActivatePrototypeParams

type ClientMockActivatePrototypeParams struct {
	// contains filtered or unexported fields
}

ClientMockActivatePrototypeParams contains parameters of the Client.ActivatePrototype

type ClientMockActivatePrototypeResults

type ClientMockActivatePrototypeResults struct {
	// contains filtered or unexported fields
}

ClientMockActivatePrototypeResults contains results of the Client.ActivatePrototype

type ClientMockDeployCodeExpectation

type ClientMockDeployCodeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockDeployCodeExpectation specifies expectation struct of the Client.DeployCode

func (*ClientMockDeployCodeExpectation) Then

Then sets up Client.DeployCode return parameters for the expectation previously defined by the When method

type ClientMockDeployCodeParams

type ClientMockDeployCodeParams struct {
	// contains filtered or unexported fields
}

ClientMockDeployCodeParams contains parameters of the Client.DeployCode

type ClientMockDeployCodeResults

type ClientMockDeployCodeResults struct {
	// contains filtered or unexported fields
}

ClientMockDeployCodeResults contains results of the Client.DeployCode

type ClientMockGetAbandonedRequestExpectation

type ClientMockGetAbandonedRequestExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockGetAbandonedRequestExpectation specifies expectation struct of the Client.GetAbandonedRequest

func (*ClientMockGetAbandonedRequestExpectation) Then

Then sets up Client.GetAbandonedRequest return parameters for the expectation previously defined by the When method

type ClientMockGetAbandonedRequestParams

type ClientMockGetAbandonedRequestParams struct {
	// contains filtered or unexported fields
}

ClientMockGetAbandonedRequestParams contains parameters of the Client.GetAbandonedRequest

type ClientMockGetAbandonedRequestResults

type ClientMockGetAbandonedRequestResults struct {
	// contains filtered or unexported fields
}

ClientMockGetAbandonedRequestResults contains results of the Client.GetAbandonedRequest

type ClientMockGetCodeExpectation

type ClientMockGetCodeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockGetCodeExpectation specifies expectation struct of the Client.GetCode

func (*ClientMockGetCodeExpectation) Then

Then sets up Client.GetCode return parameters for the expectation previously defined by the When method

type ClientMockGetCodeParams

type ClientMockGetCodeParams struct {
	// contains filtered or unexported fields
}

ClientMockGetCodeParams contains parameters of the Client.GetCode

type ClientMockGetCodeResults

type ClientMockGetCodeResults struct {
	// contains filtered or unexported fields
}

ClientMockGetCodeResults contains results of the Client.GetCode

type ClientMockGetObjectExpectation

type ClientMockGetObjectExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockGetObjectExpectation specifies expectation struct of the Client.GetObject

func (*ClientMockGetObjectExpectation) Then

Then sets up Client.GetObject return parameters for the expectation previously defined by the When method

type ClientMockGetObjectParams

type ClientMockGetObjectParams struct {
	// contains filtered or unexported fields
}

ClientMockGetObjectParams contains parameters of the Client.GetObject

type ClientMockGetObjectResults

type ClientMockGetObjectResults struct {
	// contains filtered or unexported fields
}

ClientMockGetObjectResults contains results of the Client.GetObject

type ClientMockGetPendingsExpectation

type ClientMockGetPendingsExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockGetPendingsExpectation specifies expectation struct of the Client.GetPendings

func (*ClientMockGetPendingsExpectation) Then

Then sets up Client.GetPendings return parameters for the expectation previously defined by the When method

type ClientMockGetPendingsParams

type ClientMockGetPendingsParams struct {
	// contains filtered or unexported fields
}

ClientMockGetPendingsParams contains parameters of the Client.GetPendings

type ClientMockGetPendingsResults

type ClientMockGetPendingsResults struct {
	// contains filtered or unexported fields
}

ClientMockGetPendingsResults contains results of the Client.GetPendings

type ClientMockHasPendingsExpectation

type ClientMockHasPendingsExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockHasPendingsExpectation specifies expectation struct of the Client.HasPendings

func (*ClientMockHasPendingsExpectation) Then

Then sets up Client.HasPendings return parameters for the expectation previously defined by the When method

type ClientMockHasPendingsParams

type ClientMockHasPendingsParams struct {
	// contains filtered or unexported fields
}

ClientMockHasPendingsParams contains parameters of the Client.HasPendings

type ClientMockHasPendingsResults

type ClientMockHasPendingsResults struct {
	// contains filtered or unexported fields
}

ClientMockHasPendingsResults contains results of the Client.HasPendings

type ClientMockInjectCodeDescriptorExpectation

type ClientMockInjectCodeDescriptorExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockInjectCodeDescriptorExpectation specifies expectation struct of the Client.InjectCodeDescriptor

type ClientMockInjectCodeDescriptorParams

type ClientMockInjectCodeDescriptorParams struct {
	// contains filtered or unexported fields
}

ClientMockInjectCodeDescriptorParams contains parameters of the Client.InjectCodeDescriptor

type ClientMockInjectFinishExpectation

type ClientMockInjectFinishExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockInjectFinishExpectation specifies expectation struct of the Client.InjectFinish

type ClientMockInjectObjectDescriptorExpectation

type ClientMockInjectObjectDescriptorExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockInjectObjectDescriptorExpectation specifies expectation struct of the Client.InjectObjectDescriptor

type ClientMockInjectObjectDescriptorParams

type ClientMockInjectObjectDescriptorParams struct {
	// contains filtered or unexported fields
}

ClientMockInjectObjectDescriptorParams contains parameters of the Client.InjectObjectDescriptor

type ClientMockRegisterIncomingRequestExpectation

type ClientMockRegisterIncomingRequestExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockRegisterIncomingRequestExpectation specifies expectation struct of the Client.RegisterIncomingRequest

func (*ClientMockRegisterIncomingRequestExpectation) Then

Then sets up Client.RegisterIncomingRequest return parameters for the expectation previously defined by the When method

type ClientMockRegisterIncomingRequestParams

type ClientMockRegisterIncomingRequestParams struct {
	// contains filtered or unexported fields
}

ClientMockRegisterIncomingRequestParams contains parameters of the Client.RegisterIncomingRequest

type ClientMockRegisterIncomingRequestResults

type ClientMockRegisterIncomingRequestResults struct {
	// contains filtered or unexported fields
}

ClientMockRegisterIncomingRequestResults contains results of the Client.RegisterIncomingRequest

type ClientMockRegisterOutgoingRequestExpectation

type ClientMockRegisterOutgoingRequestExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockRegisterOutgoingRequestExpectation specifies expectation struct of the Client.RegisterOutgoingRequest

func (*ClientMockRegisterOutgoingRequestExpectation) Then

Then sets up Client.RegisterOutgoingRequest return parameters for the expectation previously defined by the When method

type ClientMockRegisterOutgoingRequestParams

type ClientMockRegisterOutgoingRequestParams struct {
	// contains filtered or unexported fields
}

ClientMockRegisterOutgoingRequestParams contains parameters of the Client.RegisterOutgoingRequest

type ClientMockRegisterOutgoingRequestResults

type ClientMockRegisterOutgoingRequestResults struct {
	// contains filtered or unexported fields
}

ClientMockRegisterOutgoingRequestResults contains results of the Client.RegisterOutgoingRequest

type ClientMockRegisterResultExpectation

type ClientMockRegisterResultExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockRegisterResultExpectation specifies expectation struct of the Client.RegisterResult

func (*ClientMockRegisterResultExpectation) Then

Then sets up Client.RegisterResult return parameters for the expectation previously defined by the When method

type ClientMockRegisterResultParams

type ClientMockRegisterResultParams struct {
	// contains filtered or unexported fields
}

ClientMockRegisterResultParams contains parameters of the Client.RegisterResult

type ClientMockRegisterResultResults

type ClientMockRegisterResultResults struct {
	// contains filtered or unexported fields
}

ClientMockRegisterResultResults contains results of the Client.RegisterResult

type ClientMockStateExpectation

type ClientMockStateExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ClientMockStateExpectation specifies expectation struct of the Client.State

type ClientMockStateResults

type ClientMockStateResults struct {
	// contains filtered or unexported fields
}

ClientMockStateResults contains results of the Client.State

type CodeDescriptor

type CodeDescriptor interface {
	// Ref returns reference to represented code record.
	Ref() *insolar.Reference

	// MachineType returns code machine type for represented code.
	MachineType() insolar.MachineType

	// Code returns code data.
	Code() ([]byte, error)
}

CodeDescriptor represents meta info required to fetch all code data.

func NewCodeDescriptor

func NewCodeDescriptor(code []byte, machineType insolar.MachineType, ref insolar.Reference) CodeDescriptor

type CodeDescriptorMock

type CodeDescriptorMock struct {
	CodeMock mCodeDescriptorMockCode

	MachineTypeMock mCodeDescriptorMockMachineType

	RefMock mCodeDescriptorMockRef
	// contains filtered or unexported fields
}

CodeDescriptorMock implements CodeDescriptor

func NewCodeDescriptorMock

func NewCodeDescriptorMock(t minimock.Tester) *CodeDescriptorMock

NewCodeDescriptorMock returns a mock for CodeDescriptor

func (*CodeDescriptorMock) Code

func (mmCode *CodeDescriptorMock) Code() (ba1 []byte, err error)

Code implements CodeDescriptor

func (*CodeDescriptorMock) CodeAfterCounter

func (mmCode *CodeDescriptorMock) CodeAfterCounter() uint64

CodeAfterCounter returns a count of finished CodeDescriptorMock.Code invocations

func (*CodeDescriptorMock) CodeBeforeCounter

func (mmCode *CodeDescriptorMock) CodeBeforeCounter() uint64

CodeBeforeCounter returns a count of CodeDescriptorMock.Code invocations

func (*CodeDescriptorMock) MachineType

func (mmMachineType *CodeDescriptorMock) MachineType() (m1 insolar.MachineType)

MachineType implements CodeDescriptor

func (*CodeDescriptorMock) MachineTypeAfterCounter

func (mmMachineType *CodeDescriptorMock) MachineTypeAfterCounter() uint64

MachineTypeAfterCounter returns a count of finished CodeDescriptorMock.MachineType invocations

func (*CodeDescriptorMock) MachineTypeBeforeCounter

func (mmMachineType *CodeDescriptorMock) MachineTypeBeforeCounter() uint64

MachineTypeBeforeCounter returns a count of CodeDescriptorMock.MachineType invocations

func (*CodeDescriptorMock) MinimockCodeDone

func (m *CodeDescriptorMock) MinimockCodeDone() bool

MinimockCodeDone returns true if the count of the Code invocations corresponds the number of defined expectations

func (*CodeDescriptorMock) MinimockCodeInspect

func (m *CodeDescriptorMock) MinimockCodeInspect()

MinimockCodeInspect logs each unmet expectation

func (*CodeDescriptorMock) MinimockFinish

func (m *CodeDescriptorMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*CodeDescriptorMock) MinimockMachineTypeDone

func (m *CodeDescriptorMock) MinimockMachineTypeDone() bool

MinimockMachineTypeDone returns true if the count of the MachineType invocations corresponds the number of defined expectations

func (*CodeDescriptorMock) MinimockMachineTypeInspect

func (m *CodeDescriptorMock) MinimockMachineTypeInspect()

MinimockMachineTypeInspect logs each unmet expectation

func (*CodeDescriptorMock) MinimockRefDone

func (m *CodeDescriptorMock) MinimockRefDone() bool

MinimockRefDone returns true if the count of the Ref invocations corresponds the number of defined expectations

func (*CodeDescriptorMock) MinimockRefInspect

func (m *CodeDescriptorMock) MinimockRefInspect()

MinimockRefInspect logs each unmet expectation

func (*CodeDescriptorMock) MinimockWait

func (m *CodeDescriptorMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*CodeDescriptorMock) Ref

func (mmRef *CodeDescriptorMock) Ref() (rp1 *insolar.Reference)

Ref implements CodeDescriptor

func (*CodeDescriptorMock) RefAfterCounter

func (mmRef *CodeDescriptorMock) RefAfterCounter() uint64

RefAfterCounter returns a count of finished CodeDescriptorMock.Ref invocations

func (*CodeDescriptorMock) RefBeforeCounter

func (mmRef *CodeDescriptorMock) RefBeforeCounter() uint64

RefBeforeCounter returns a count of CodeDescriptorMock.Ref invocations

type CodeDescriptorMockCodeExpectation

type CodeDescriptorMockCodeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

CodeDescriptorMockCodeExpectation specifies expectation struct of the CodeDescriptor.Code

type CodeDescriptorMockCodeResults

type CodeDescriptorMockCodeResults struct {
	// contains filtered or unexported fields
}

CodeDescriptorMockCodeResults contains results of the CodeDescriptor.Code

type CodeDescriptorMockMachineTypeExpectation

type CodeDescriptorMockMachineTypeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

CodeDescriptorMockMachineTypeExpectation specifies expectation struct of the CodeDescriptor.MachineType

type CodeDescriptorMockMachineTypeResults

type CodeDescriptorMockMachineTypeResults struct {
	// contains filtered or unexported fields
}

CodeDescriptorMockMachineTypeResults contains results of the CodeDescriptor.MachineType

type CodeDescriptorMockRefExpectation

type CodeDescriptorMockRefExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

CodeDescriptorMockRefExpectation specifies expectation struct of the CodeDescriptor.Ref

type CodeDescriptorMockRefResults

type CodeDescriptorMockRefResults struct {
	// contains filtered or unexported fields
}

CodeDescriptorMockRefResults contains results of the CodeDescriptor.Ref

type DescriptorsCache

type DescriptorsCache interface {
	ByPrototypeRef(ctx context.Context, protoRef insolar.Reference) (ObjectDescriptor, CodeDescriptor, error)
	ByObjectDescriptor(ctx context.Context, obj ObjectDescriptor) (ObjectDescriptor, CodeDescriptor, error)
	GetPrototype(ctx context.Context, ref insolar.Reference) (ObjectDescriptor, error)
	GetCode(ctx context.Context, ref insolar.Reference) (CodeDescriptor, error)
}

DescriptorsCache provides convenient way to get prototype and code descriptors of objects without fetching them twice

func NewDescriptorsCache

func NewDescriptorsCache() DescriptorsCache

type DescriptorsCacheMock

type DescriptorsCacheMock struct {
	ByObjectDescriptorMock mDescriptorsCacheMockByObjectDescriptor

	ByPrototypeRefMock mDescriptorsCacheMockByPrototypeRef

	GetCodeMock mDescriptorsCacheMockGetCode

	GetPrototypeMock mDescriptorsCacheMockGetPrototype
	// contains filtered or unexported fields
}

DescriptorsCacheMock implements DescriptorsCache

func NewDescriptorsCacheMock

func NewDescriptorsCacheMock(t minimock.Tester) *DescriptorsCacheMock

NewDescriptorsCacheMock returns a mock for DescriptorsCache

func (*DescriptorsCacheMock) ByObjectDescriptor

func (mmByObjectDescriptor *DescriptorsCacheMock) ByObjectDescriptor(ctx context.Context, obj ObjectDescriptor) (o1 ObjectDescriptor, c2 CodeDescriptor, err error)

ByObjectDescriptor implements DescriptorsCache

func (*DescriptorsCacheMock) ByObjectDescriptorAfterCounter

func (mmByObjectDescriptor *DescriptorsCacheMock) ByObjectDescriptorAfterCounter() uint64

ByObjectDescriptorAfterCounter returns a count of finished DescriptorsCacheMock.ByObjectDescriptor invocations

func (*DescriptorsCacheMock) ByObjectDescriptorBeforeCounter

func (mmByObjectDescriptor *DescriptorsCacheMock) ByObjectDescriptorBeforeCounter() uint64

ByObjectDescriptorBeforeCounter returns a count of DescriptorsCacheMock.ByObjectDescriptor invocations

func (*DescriptorsCacheMock) ByPrototypeRef

func (mmByPrototypeRef *DescriptorsCacheMock) ByPrototypeRef(ctx context.Context, protoRef insolar.Reference) (o1 ObjectDescriptor, c2 CodeDescriptor, err error)

ByPrototypeRef implements DescriptorsCache

func (*DescriptorsCacheMock) ByPrototypeRefAfterCounter

func (mmByPrototypeRef *DescriptorsCacheMock) ByPrototypeRefAfterCounter() uint64

ByPrototypeRefAfterCounter returns a count of finished DescriptorsCacheMock.ByPrototypeRef invocations

func (*DescriptorsCacheMock) ByPrototypeRefBeforeCounter

func (mmByPrototypeRef *DescriptorsCacheMock) ByPrototypeRefBeforeCounter() uint64

ByPrototypeRefBeforeCounter returns a count of DescriptorsCacheMock.ByPrototypeRef invocations

func (*DescriptorsCacheMock) GetCode

func (mmGetCode *DescriptorsCacheMock) GetCode(ctx context.Context, ref insolar.Reference) (c2 CodeDescriptor, err error)

GetCode implements DescriptorsCache

func (*DescriptorsCacheMock) GetCodeAfterCounter

func (mmGetCode *DescriptorsCacheMock) GetCodeAfterCounter() uint64

GetCodeAfterCounter returns a count of finished DescriptorsCacheMock.GetCode invocations

func (*DescriptorsCacheMock) GetCodeBeforeCounter

func (mmGetCode *DescriptorsCacheMock) GetCodeBeforeCounter() uint64

GetCodeBeforeCounter returns a count of DescriptorsCacheMock.GetCode invocations

func (*DescriptorsCacheMock) GetPrototype

func (mmGetPrototype *DescriptorsCacheMock) GetPrototype(ctx context.Context, ref insolar.Reference) (o1 ObjectDescriptor, err error)

GetPrototype implements DescriptorsCache

func (*DescriptorsCacheMock) GetPrototypeAfterCounter

func (mmGetPrototype *DescriptorsCacheMock) GetPrototypeAfterCounter() uint64

GetPrototypeAfterCounter returns a count of finished DescriptorsCacheMock.GetPrototype invocations

func (*DescriptorsCacheMock) GetPrototypeBeforeCounter

func (mmGetPrototype *DescriptorsCacheMock) GetPrototypeBeforeCounter() uint64

GetPrototypeBeforeCounter returns a count of DescriptorsCacheMock.GetPrototype invocations

func (*DescriptorsCacheMock) MinimockByObjectDescriptorDone

func (m *DescriptorsCacheMock) MinimockByObjectDescriptorDone() bool

MinimockByObjectDescriptorDone returns true if the count of the ByObjectDescriptor invocations corresponds the number of defined expectations

func (*DescriptorsCacheMock) MinimockByObjectDescriptorInspect

func (m *DescriptorsCacheMock) MinimockByObjectDescriptorInspect()

MinimockByObjectDescriptorInspect logs each unmet expectation

func (*DescriptorsCacheMock) MinimockByPrototypeRefDone

func (m *DescriptorsCacheMock) MinimockByPrototypeRefDone() bool

MinimockByPrototypeRefDone returns true if the count of the ByPrototypeRef invocations corresponds the number of defined expectations

func (*DescriptorsCacheMock) MinimockByPrototypeRefInspect

func (m *DescriptorsCacheMock) MinimockByPrototypeRefInspect()

MinimockByPrototypeRefInspect logs each unmet expectation

func (*DescriptorsCacheMock) MinimockFinish

func (m *DescriptorsCacheMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*DescriptorsCacheMock) MinimockGetCodeDone

func (m *DescriptorsCacheMock) MinimockGetCodeDone() bool

MinimockGetCodeDone returns true if the count of the GetCode invocations corresponds the number of defined expectations

func (*DescriptorsCacheMock) MinimockGetCodeInspect

func (m *DescriptorsCacheMock) MinimockGetCodeInspect()

MinimockGetCodeInspect logs each unmet expectation

func (*DescriptorsCacheMock) MinimockGetPrototypeDone

func (m *DescriptorsCacheMock) MinimockGetPrototypeDone() bool

MinimockGetPrototypeDone returns true if the count of the GetPrototype invocations corresponds the number of defined expectations

func (*DescriptorsCacheMock) MinimockGetPrototypeInspect

func (m *DescriptorsCacheMock) MinimockGetPrototypeInspect()

MinimockGetPrototypeInspect logs each unmet expectation

func (*DescriptorsCacheMock) MinimockWait

func (m *DescriptorsCacheMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

type DescriptorsCacheMockByObjectDescriptorExpectation

type DescriptorsCacheMockByObjectDescriptorExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DescriptorsCacheMockByObjectDescriptorExpectation specifies expectation struct of the DescriptorsCache.ByObjectDescriptor

func (*DescriptorsCacheMockByObjectDescriptorExpectation) Then

Then sets up DescriptorsCache.ByObjectDescriptor return parameters for the expectation previously defined by the When method

type DescriptorsCacheMockByObjectDescriptorParams

type DescriptorsCacheMockByObjectDescriptorParams struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockByObjectDescriptorParams contains parameters of the DescriptorsCache.ByObjectDescriptor

type DescriptorsCacheMockByObjectDescriptorResults

type DescriptorsCacheMockByObjectDescriptorResults struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockByObjectDescriptorResults contains results of the DescriptorsCache.ByObjectDescriptor

type DescriptorsCacheMockByPrototypeRefExpectation

type DescriptorsCacheMockByPrototypeRefExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DescriptorsCacheMockByPrototypeRefExpectation specifies expectation struct of the DescriptorsCache.ByPrototypeRef

func (*DescriptorsCacheMockByPrototypeRefExpectation) Then

Then sets up DescriptorsCache.ByPrototypeRef return parameters for the expectation previously defined by the When method

type DescriptorsCacheMockByPrototypeRefParams

type DescriptorsCacheMockByPrototypeRefParams struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockByPrototypeRefParams contains parameters of the DescriptorsCache.ByPrototypeRef

type DescriptorsCacheMockByPrototypeRefResults

type DescriptorsCacheMockByPrototypeRefResults struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockByPrototypeRefResults contains results of the DescriptorsCache.ByPrototypeRef

type DescriptorsCacheMockGetCodeExpectation

type DescriptorsCacheMockGetCodeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DescriptorsCacheMockGetCodeExpectation specifies expectation struct of the DescriptorsCache.GetCode

func (*DescriptorsCacheMockGetCodeExpectation) Then

Then sets up DescriptorsCache.GetCode return parameters for the expectation previously defined by the When method

type DescriptorsCacheMockGetCodeParams

type DescriptorsCacheMockGetCodeParams struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockGetCodeParams contains parameters of the DescriptorsCache.GetCode

type DescriptorsCacheMockGetCodeResults

type DescriptorsCacheMockGetCodeResults struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockGetCodeResults contains results of the DescriptorsCache.GetCode

type DescriptorsCacheMockGetPrototypeExpectation

type DescriptorsCacheMockGetPrototypeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DescriptorsCacheMockGetPrototypeExpectation specifies expectation struct of the DescriptorsCache.GetPrototype

func (*DescriptorsCacheMockGetPrototypeExpectation) Then

Then sets up DescriptorsCache.GetPrototype return parameters for the expectation previously defined by the When method

type DescriptorsCacheMockGetPrototypeParams

type DescriptorsCacheMockGetPrototypeParams struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockGetPrototypeParams contains parameters of the DescriptorsCache.GetPrototype

type DescriptorsCacheMockGetPrototypeResults

type DescriptorsCacheMockGetPrototypeResults struct {
	// contains filtered or unexported fields
}

DescriptorsCacheMockGetPrototypeResults contains results of the DescriptorsCache.GetPrototype

type ObjectDescriptor

type ObjectDescriptor interface {
	// HeadRef returns head reference to represented object record.
	HeadRef() *insolar.Reference

	// StateID returns reference to object state record.
	StateID() *insolar.ID

	// Memory fetches object memory from storage.
	Memory() []byte

	// IsPrototype determines if the object is a prototype.
	IsPrototype() bool

	// Code returns code reference.
	Code() (*insolar.Reference, error)

	// Prototype returns prototype reference.
	Prototype() (*insolar.Reference, error)

	// ChildPointer returns the latest child for this object.
	ChildPointer() *insolar.ID

	// Parent returns object's parent.
	Parent() *insolar.Reference
}

ObjectDescriptor represents meta info required to fetch all object data.

func NewObjectDescriptor

func NewObjectDescriptor(head insolar.Reference, state insolar.ID, prototype *insolar.Reference, isPrototype bool,
	childPointer *insolar.ID, memory []byte, parent insolar.Reference) ObjectDescriptor

type ObjectDescriptorMock

type ObjectDescriptorMock struct {
	ChildPointerMock mObjectDescriptorMockChildPointer

	CodeMock mObjectDescriptorMockCode

	HeadRefMock mObjectDescriptorMockHeadRef

	IsPrototypeMock mObjectDescriptorMockIsPrototype

	MemoryMock mObjectDescriptorMockMemory

	ParentMock mObjectDescriptorMockParent

	PrototypeMock mObjectDescriptorMockPrototype

	StateIDMock mObjectDescriptorMockStateID
	// contains filtered or unexported fields
}

ObjectDescriptorMock implements ObjectDescriptor

func NewObjectDescriptorMock

func NewObjectDescriptorMock(t minimock.Tester) *ObjectDescriptorMock

NewObjectDescriptorMock returns a mock for ObjectDescriptor

func (*ObjectDescriptorMock) ChildPointer

func (mmChildPointer *ObjectDescriptorMock) ChildPointer() (ip1 *insolar.ID)

ChildPointer implements ObjectDescriptor

func (*ObjectDescriptorMock) ChildPointerAfterCounter

func (mmChildPointer *ObjectDescriptorMock) ChildPointerAfterCounter() uint64

ChildPointerAfterCounter returns a count of finished ObjectDescriptorMock.ChildPointer invocations

func (*ObjectDescriptorMock) ChildPointerBeforeCounter

func (mmChildPointer *ObjectDescriptorMock) ChildPointerBeforeCounter() uint64

ChildPointerBeforeCounter returns a count of ObjectDescriptorMock.ChildPointer invocations

func (*ObjectDescriptorMock) Code

func (mmCode *ObjectDescriptorMock) Code() (rp1 *insolar.Reference, err error)

Code implements ObjectDescriptor

func (*ObjectDescriptorMock) CodeAfterCounter

func (mmCode *ObjectDescriptorMock) CodeAfterCounter() uint64

CodeAfterCounter returns a count of finished ObjectDescriptorMock.Code invocations

func (*ObjectDescriptorMock) CodeBeforeCounter

func (mmCode *ObjectDescriptorMock) CodeBeforeCounter() uint64

CodeBeforeCounter returns a count of ObjectDescriptorMock.Code invocations

func (*ObjectDescriptorMock) HeadRef

func (mmHeadRef *ObjectDescriptorMock) HeadRef() (rp1 *insolar.Reference)

HeadRef implements ObjectDescriptor

func (*ObjectDescriptorMock) HeadRefAfterCounter

func (mmHeadRef *ObjectDescriptorMock) HeadRefAfterCounter() uint64

HeadRefAfterCounter returns a count of finished ObjectDescriptorMock.HeadRef invocations

func (*ObjectDescriptorMock) HeadRefBeforeCounter

func (mmHeadRef *ObjectDescriptorMock) HeadRefBeforeCounter() uint64

HeadRefBeforeCounter returns a count of ObjectDescriptorMock.HeadRef invocations

func (*ObjectDescriptorMock) IsPrototype

func (mmIsPrototype *ObjectDescriptorMock) IsPrototype() (b1 bool)

IsPrototype implements ObjectDescriptor

func (*ObjectDescriptorMock) IsPrototypeAfterCounter

func (mmIsPrototype *ObjectDescriptorMock) IsPrototypeAfterCounter() uint64

IsPrototypeAfterCounter returns a count of finished ObjectDescriptorMock.IsPrototype invocations

func (*ObjectDescriptorMock) IsPrototypeBeforeCounter

func (mmIsPrototype *ObjectDescriptorMock) IsPrototypeBeforeCounter() uint64

IsPrototypeBeforeCounter returns a count of ObjectDescriptorMock.IsPrototype invocations

func (*ObjectDescriptorMock) Memory

func (mmMemory *ObjectDescriptorMock) Memory() (ba1 []byte)

Memory implements ObjectDescriptor

func (*ObjectDescriptorMock) MemoryAfterCounter

func (mmMemory *ObjectDescriptorMock) MemoryAfterCounter() uint64

MemoryAfterCounter returns a count of finished ObjectDescriptorMock.Memory invocations

func (*ObjectDescriptorMock) MemoryBeforeCounter

func (mmMemory *ObjectDescriptorMock) MemoryBeforeCounter() uint64

MemoryBeforeCounter returns a count of ObjectDescriptorMock.Memory invocations

func (*ObjectDescriptorMock) MinimockChildPointerDone

func (m *ObjectDescriptorMock) MinimockChildPointerDone() bool

MinimockChildPointerDone returns true if the count of the ChildPointer invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockChildPointerInspect

func (m *ObjectDescriptorMock) MinimockChildPointerInspect()

MinimockChildPointerInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockCodeDone

func (m *ObjectDescriptorMock) MinimockCodeDone() bool

MinimockCodeDone returns true if the count of the Code invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockCodeInspect

func (m *ObjectDescriptorMock) MinimockCodeInspect()

MinimockCodeInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockFinish

func (m *ObjectDescriptorMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ObjectDescriptorMock) MinimockHeadRefDone

func (m *ObjectDescriptorMock) MinimockHeadRefDone() bool

MinimockHeadRefDone returns true if the count of the HeadRef invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockHeadRefInspect

func (m *ObjectDescriptorMock) MinimockHeadRefInspect()

MinimockHeadRefInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockIsPrototypeDone

func (m *ObjectDescriptorMock) MinimockIsPrototypeDone() bool

MinimockIsPrototypeDone returns true if the count of the IsPrototype invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockIsPrototypeInspect

func (m *ObjectDescriptorMock) MinimockIsPrototypeInspect()

MinimockIsPrototypeInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockMemoryDone

func (m *ObjectDescriptorMock) MinimockMemoryDone() bool

MinimockMemoryDone returns true if the count of the Memory invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockMemoryInspect

func (m *ObjectDescriptorMock) MinimockMemoryInspect()

MinimockMemoryInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockParentDone

func (m *ObjectDescriptorMock) MinimockParentDone() bool

MinimockParentDone returns true if the count of the Parent invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockParentInspect

func (m *ObjectDescriptorMock) MinimockParentInspect()

MinimockParentInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockPrototypeDone

func (m *ObjectDescriptorMock) MinimockPrototypeDone() bool

MinimockPrototypeDone returns true if the count of the Prototype invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockPrototypeInspect

func (m *ObjectDescriptorMock) MinimockPrototypeInspect()

MinimockPrototypeInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockStateIDDone

func (m *ObjectDescriptorMock) MinimockStateIDDone() bool

MinimockStateIDDone returns true if the count of the StateID invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockStateIDInspect

func (m *ObjectDescriptorMock) MinimockStateIDInspect()

MinimockStateIDInspect logs each unmet expectation

func (*ObjectDescriptorMock) MinimockWait

func (m *ObjectDescriptorMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*ObjectDescriptorMock) Parent

func (mmParent *ObjectDescriptorMock) Parent() (rp1 *insolar.Reference)

Parent implements ObjectDescriptor

func (*ObjectDescriptorMock) ParentAfterCounter

func (mmParent *ObjectDescriptorMock) ParentAfterCounter() uint64

ParentAfterCounter returns a count of finished ObjectDescriptorMock.Parent invocations

func (*ObjectDescriptorMock) ParentBeforeCounter

func (mmParent *ObjectDescriptorMock) ParentBeforeCounter() uint64

ParentBeforeCounter returns a count of ObjectDescriptorMock.Parent invocations

func (*ObjectDescriptorMock) Prototype

func (mmPrototype *ObjectDescriptorMock) Prototype() (rp1 *insolar.Reference, err error)

Prototype implements ObjectDescriptor

func (*ObjectDescriptorMock) PrototypeAfterCounter

func (mmPrototype *ObjectDescriptorMock) PrototypeAfterCounter() uint64

PrototypeAfterCounter returns a count of finished ObjectDescriptorMock.Prototype invocations

func (*ObjectDescriptorMock) PrototypeBeforeCounter

func (mmPrototype *ObjectDescriptorMock) PrototypeBeforeCounter() uint64

PrototypeBeforeCounter returns a count of ObjectDescriptorMock.Prototype invocations

func (*ObjectDescriptorMock) StateID

func (mmStateID *ObjectDescriptorMock) StateID() (ip1 *insolar.ID)

StateID implements ObjectDescriptor

func (*ObjectDescriptorMock) StateIDAfterCounter

func (mmStateID *ObjectDescriptorMock) StateIDAfterCounter() uint64

StateIDAfterCounter returns a count of finished ObjectDescriptorMock.StateID invocations

func (*ObjectDescriptorMock) StateIDBeforeCounter

func (mmStateID *ObjectDescriptorMock) StateIDBeforeCounter() uint64

StateIDBeforeCounter returns a count of ObjectDescriptorMock.StateID invocations

type ObjectDescriptorMockChildPointerExpectation

type ObjectDescriptorMockChildPointerExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockChildPointerExpectation specifies expectation struct of the ObjectDescriptor.ChildPointer

type ObjectDescriptorMockChildPointerResults

type ObjectDescriptorMockChildPointerResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockChildPointerResults contains results of the ObjectDescriptor.ChildPointer

type ObjectDescriptorMockCodeExpectation

type ObjectDescriptorMockCodeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockCodeExpectation specifies expectation struct of the ObjectDescriptor.Code

type ObjectDescriptorMockCodeResults

type ObjectDescriptorMockCodeResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockCodeResults contains results of the ObjectDescriptor.Code

type ObjectDescriptorMockHeadRefExpectation

type ObjectDescriptorMockHeadRefExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockHeadRefExpectation specifies expectation struct of the ObjectDescriptor.HeadRef

type ObjectDescriptorMockHeadRefResults

type ObjectDescriptorMockHeadRefResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockHeadRefResults contains results of the ObjectDescriptor.HeadRef

type ObjectDescriptorMockIsPrototypeExpectation

type ObjectDescriptorMockIsPrototypeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockIsPrototypeExpectation specifies expectation struct of the ObjectDescriptor.IsPrototype

type ObjectDescriptorMockIsPrototypeResults

type ObjectDescriptorMockIsPrototypeResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockIsPrototypeResults contains results of the ObjectDescriptor.IsPrototype

type ObjectDescriptorMockMemoryExpectation

type ObjectDescriptorMockMemoryExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockMemoryExpectation specifies expectation struct of the ObjectDescriptor.Memory

type ObjectDescriptorMockMemoryResults

type ObjectDescriptorMockMemoryResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockMemoryResults contains results of the ObjectDescriptor.Memory

type ObjectDescriptorMockParentExpectation

type ObjectDescriptorMockParentExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockParentExpectation specifies expectation struct of the ObjectDescriptor.Parent

type ObjectDescriptorMockParentResults

type ObjectDescriptorMockParentResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockParentResults contains results of the ObjectDescriptor.Parent

type ObjectDescriptorMockPrototypeExpectation

type ObjectDescriptorMockPrototypeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockPrototypeExpectation specifies expectation struct of the ObjectDescriptor.Prototype

type ObjectDescriptorMockPrototypeResults

type ObjectDescriptorMockPrototypeResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockPrototypeResults contains results of the ObjectDescriptor.Prototype

type ObjectDescriptorMockStateIDExpectation

type ObjectDescriptorMockStateIDExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ObjectDescriptorMockStateIDExpectation specifies expectation struct of the ObjectDescriptor.StateID

type ObjectDescriptorMockStateIDResults

type ObjectDescriptorMockStateIDResults struct {
	// contains filtered or unexported fields
}

ObjectDescriptorMockStateIDResults contains results of the ObjectDescriptor.StateID

type RefIterator

type RefIterator interface {
	Next() (*insolar.Reference, error)
	HasNext() bool
}

RefIterator is used for iteration over affined children(parts) of container.

type RequestResult

type RequestResult interface {
	Type() RequestResultType

	Activate() (insolar.Reference, insolar.Reference, []byte)
	Amend() (insolar.ID, insolar.Reference, []byte)
	Deactivate() insolar.ID

	Result() []byte
	ObjectReference() insolar.Reference
}

type RequestResultType

type RequestResultType uint8
const (
	RequestSideEffectNone RequestResultType = iota
	RequestSideEffectActivate
	RequestSideEffectAmend
	RequestSideEffectDeactivate
)

func (RequestResultType) String

func (t RequestResultType) String() string

Jump to

Keyboard shortcuts

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