artifacts

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 24 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

This section is empty.

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

	// GetRequest returns an incoming or outgoing request for an object.
	GetRequest(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, skip []insolar.ID) ([]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)

	// GetPulse returns pulse data for pulse number from request.
	GetPulse(ctx context.Context, pn insolar.PulseNumber) (insolar.Pulse, error)

	// GetObject returns object descriptor for the latest state.
	GetObject(ctx context.Context, head insolar.Reference, request *insolar.Reference) (ObjectDescriptor, error)

	// GetPrototype returns prototype descriptor.
	GetPrototype(ctx context.Context, head insolar.Reference) (PrototypeDescriptor, error)

	// DeployCode creates new code record in storage.
	//
	// Code records are used to activate prototype.
	DeployCode(ctx context.Context, 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

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

Client is a high level storage interface.

func NewClient

func NewClient(sender bus.Sender) Client

NewClient creates new client instance.

type ClientMock

type ClientMock struct {
	ActivatePrototypeMock mClientMockActivatePrototype

	DeployCodeMock mClientMockDeployCode

	GetCodeMock mClientMockGetCode

	GetObjectMock mClientMockGetObject

	GetPendingsMock mClientMockGetPendings

	GetPrototypeMock mClientMockGetPrototype

	GetPulseMock mClientMockGetPulse

	GetRequestMock mClientMockGetRequest

	HasPendingsMock mClientMockHasPendings

	InjectCodeDescriptorMock mClientMockInjectCodeDescriptor

	InjectFinishMock mClientMockInjectFinish

	InjectPrototypeDescriptorMock mClientMockInjectPrototypeDescriptor

	RegisterIncomingRequestMock mClientMockRegisterIncomingRequest

	RegisterOutgoingRequestMock mClientMockRegisterOutgoingRequest

	RegisterResultMock mClientMockRegisterResult
	// 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, 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) 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, request *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, skip []insolar.ID) (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) GetPrototype added in v0.9.11

func (mmGetPrototype *ClientMock) GetPrototype(ctx context.Context, head insolar.Reference) (p1 PrototypeDescriptor, err error)

GetPrototype implements Client

func (*ClientMock) GetPrototypeAfterCounter added in v0.9.11

func (mmGetPrototype *ClientMock) GetPrototypeAfterCounter() uint64

GetPrototypeAfterCounter returns a count of finished ClientMock.GetPrototype invocations

func (*ClientMock) GetPrototypeBeforeCounter added in v0.9.11

func (mmGetPrototype *ClientMock) GetPrototypeBeforeCounter() uint64

GetPrototypeBeforeCounter returns a count of ClientMock.GetPrototype invocations

func (*ClientMock) GetPulse added in v1.1.0

func (mmGetPulse *ClientMock) GetPulse(ctx context.Context, pn insolar.PulseNumber) (p1 insolar.Pulse, err error)

GetPulse implements Client

func (*ClientMock) GetPulseAfterCounter added in v1.1.0

func (mmGetPulse *ClientMock) GetPulseAfterCounter() uint64

GetPulseAfterCounter returns a count of finished ClientMock.GetPulse invocations

func (*ClientMock) GetPulseBeforeCounter added in v1.1.0

func (mmGetPulse *ClientMock) GetPulseBeforeCounter() uint64

GetPulseBeforeCounter returns a count of ClientMock.GetPulse invocations

func (*ClientMock) GetRequest added in v0.9.16

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

GetRequest implements Client

func (*ClientMock) GetRequestAfterCounter added in v0.9.16

func (mmGetRequest *ClientMock) GetRequestAfterCounter() uint64

GetRequestAfterCounter returns a count of finished ClientMock.GetRequest invocations

func (*ClientMock) GetRequestBeforeCounter added in v0.9.16

func (mmGetRequest *ClientMock) GetRequestBeforeCounter() uint64

GetRequestBeforeCounter returns a count of ClientMock.GetRequest 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) InjectPrototypeDescriptor added in v0.9.11

func (mmInjectPrototypeDescriptor *ClientMock) InjectPrototypeDescriptor(r1 insolar.Reference, p1 PrototypeDescriptor)

InjectPrototypeDescriptor implements Client

func (*ClientMock) InjectPrototypeDescriptorAfterCounter added in v0.9.11

func (mmInjectPrototypeDescriptor *ClientMock) InjectPrototypeDescriptorAfterCounter() uint64

InjectPrototypeDescriptorAfterCounter returns a count of finished ClientMock.InjectPrototypeDescriptor invocations

func (*ClientMock) InjectPrototypeDescriptorBeforeCounter added in v0.9.11

func (mmInjectPrototypeDescriptor *ClientMock) InjectPrototypeDescriptorBeforeCounter() uint64

InjectPrototypeDescriptorBeforeCounter returns a count of ClientMock.InjectPrototypeDescriptor 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) 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) MinimockGetPrototypeDone added in v0.9.11

func (m *ClientMock) MinimockGetPrototypeDone() bool

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

func (*ClientMock) MinimockGetPrototypeInspect added in v0.9.11

func (m *ClientMock) MinimockGetPrototypeInspect()

MinimockGetPrototypeInspect logs each unmet expectation

func (*ClientMock) MinimockGetPulseDone added in v1.1.0

func (m *ClientMock) MinimockGetPulseDone() bool

MinimockGetPulseDone returns true if the count of the GetPulse invocations corresponds the number of defined expectations

func (*ClientMock) MinimockGetPulseInspect added in v1.1.0

func (m *ClientMock) MinimockGetPulseInspect()

MinimockGetPulseInspect logs each unmet expectation

func (*ClientMock) MinimockGetRequestDone added in v0.9.16

func (m *ClientMock) MinimockGetRequestDone() bool

MinimockGetRequestDone returns true if the count of the GetRequest invocations corresponds the number of defined expectations

func (*ClientMock) MinimockGetRequestInspect added in v0.9.16

func (m *ClientMock) MinimockGetRequestInspect()

MinimockGetRequestInspect 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) MinimockInjectPrototypeDescriptorDone added in v0.9.11

func (m *ClientMock) MinimockInjectPrototypeDescriptorDone() bool

MinimockInjectPrototypeDescriptorDone returns true if the count of the InjectPrototypeDescriptor invocations corresponds the number of defined expectations

func (*ClientMock) MinimockInjectPrototypeDescriptorInspect added in v0.9.11

func (m *ClientMock) MinimockInjectPrototypeDescriptorInspect()

MinimockInjectPrototypeDescriptorInspect 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) 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

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 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 ClientMockGetPrototypeExpectation added in v0.9.11

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

ClientMockGetPrototypeExpectation specifies expectation struct of the Client.GetPrototype

func (*ClientMockGetPrototypeExpectation) Then added in v0.9.11

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

type ClientMockGetPrototypeParams added in v0.9.11

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

ClientMockGetPrototypeParams contains parameters of the Client.GetPrototype

type ClientMockGetPrototypeResults added in v0.9.11

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

ClientMockGetPrototypeResults contains results of the Client.GetPrototype

type ClientMockGetPulseExpectation added in v1.1.0

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

ClientMockGetPulseExpectation specifies expectation struct of the Client.GetPulse

func (*ClientMockGetPulseExpectation) Then added in v1.1.0

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

type ClientMockGetPulseParams added in v1.1.0

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

ClientMockGetPulseParams contains parameters of the Client.GetPulse

type ClientMockGetPulseResults added in v1.1.0

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

ClientMockGetPulseResults contains results of the Client.GetPulse

type ClientMockGetRequestExpectation added in v0.9.16

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

ClientMockGetRequestExpectation specifies expectation struct of the Client.GetRequest

func (*ClientMockGetRequestExpectation) Then added in v0.9.16

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

type ClientMockGetRequestParams added in v0.9.16

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

ClientMockGetRequestParams contains parameters of the Client.GetRequest

type ClientMockGetRequestResults added in v0.9.16

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

ClientMockGetRequestResults contains results of the Client.GetRequest

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 ClientMockInjectPrototypeDescriptorExpectation added in v0.9.11

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

ClientMockInjectPrototypeDescriptorExpectation specifies expectation struct of the Client.InjectPrototypeDescriptor

type ClientMockInjectPrototypeDescriptorParams added in v0.9.11

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

ClientMockInjectPrototypeDescriptorParams contains parameters of the Client.InjectPrototypeDescriptor

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 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) (PrototypeDescriptor, CodeDescriptor, error)
	ByObjectDescriptor(ctx context.Context, obj ObjectDescriptor) (PrototypeDescriptor, CodeDescriptor, error)
	GetPrototype(ctx context.Context, ref insolar.Reference) (PrototypeDescriptor, 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) (p1 PrototypeDescriptor, 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) (p1 PrototypeDescriptor, 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) (p1 PrototypeDescriptor, 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

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

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

	// EarliestRequestID returns latest requestID for this object
	EarliestRequestID() *insolar.ID
}

ObjectDescriptor represents meta info required to fetch all object data.

type ObjectDescriptorMock

type ObjectDescriptorMock struct {
	EarliestRequestIDMock mObjectDescriptorMockEarliestRequestID

	HeadRefMock mObjectDescriptorMockHeadRef

	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) EarliestRequestID added in v0.9.11

func (mmEarliestRequestID *ObjectDescriptorMock) EarliestRequestID() (ip1 *insolar.ID)

EarliestRequestID implements ObjectDescriptor

func (*ObjectDescriptorMock) EarliestRequestIDAfterCounter added in v0.9.11

func (mmEarliestRequestID *ObjectDescriptorMock) EarliestRequestIDAfterCounter() uint64

EarliestRequestIDAfterCounter returns a count of finished ObjectDescriptorMock.EarliestRequestID invocations

func (*ObjectDescriptorMock) EarliestRequestIDBeforeCounter added in v0.9.11

func (mmEarliestRequestID *ObjectDescriptorMock) EarliestRequestIDBeforeCounter() uint64

EarliestRequestIDBeforeCounter returns a count of ObjectDescriptorMock.EarliestRequestID 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) 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) MinimockEarliestRequestIDDone added in v0.9.11

func (m *ObjectDescriptorMock) MinimockEarliestRequestIDDone() bool

MinimockEarliestRequestIDDone returns true if the count of the EarliestRequestID invocations corresponds the number of defined expectations

func (*ObjectDescriptorMock) MinimockEarliestRequestIDInspect added in v0.9.11

func (m *ObjectDescriptorMock) MinimockEarliestRequestIDInspect()

MinimockEarliestRequestIDInspect 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) 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 ObjectDescriptorMockEarliestRequestIDExpectation added in v0.9.11

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

ObjectDescriptorMockEarliestRequestIDExpectation specifies expectation struct of the ObjectDescriptor.EarliestRequestID

type ObjectDescriptorMockEarliestRequestIDResults added in v0.9.11

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

ObjectDescriptorMockEarliestRequestIDResults contains results of the ObjectDescriptor.EarliestRequestID

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 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 PrototypeDescriptor added in v0.9.11

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

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

	// Code returns code reference.
	Code() *insolar.Reference
}

PrototypeDescriptor represents meta info required to fetch all prototype data.

func NewPrototypeDescriptor added in v0.9.11

func NewPrototypeDescriptor(
	head insolar.Reference, state insolar.ID, code insolar.Reference,
) PrototypeDescriptor

type PrototypeDescriptorMock added in v0.9.11

type PrototypeDescriptorMock struct {
	CodeMock mPrototypeDescriptorMockCode

	HeadRefMock mPrototypeDescriptorMockHeadRef

	StateIDMock mPrototypeDescriptorMockStateID
	// contains filtered or unexported fields
}

PrototypeDescriptorMock implements PrototypeDescriptor

func NewPrototypeDescriptorMock added in v0.9.11

func NewPrototypeDescriptorMock(t minimock.Tester) *PrototypeDescriptorMock

NewPrototypeDescriptorMock returns a mock for PrototypeDescriptor

func (*PrototypeDescriptorMock) Code added in v0.9.11

func (mmCode *PrototypeDescriptorMock) Code() (rp1 *insolar.Reference)

Code implements PrototypeDescriptor

func (*PrototypeDescriptorMock) CodeAfterCounter added in v0.9.11

func (mmCode *PrototypeDescriptorMock) CodeAfterCounter() uint64

CodeAfterCounter returns a count of finished PrototypeDescriptorMock.Code invocations

func (*PrototypeDescriptorMock) CodeBeforeCounter added in v0.9.11

func (mmCode *PrototypeDescriptorMock) CodeBeforeCounter() uint64

CodeBeforeCounter returns a count of PrototypeDescriptorMock.Code invocations

func (*PrototypeDescriptorMock) HeadRef added in v0.9.11

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

HeadRef implements PrototypeDescriptor

func (*PrototypeDescriptorMock) HeadRefAfterCounter added in v0.9.11

func (mmHeadRef *PrototypeDescriptorMock) HeadRefAfterCounter() uint64

HeadRefAfterCounter returns a count of finished PrototypeDescriptorMock.HeadRef invocations

func (*PrototypeDescriptorMock) HeadRefBeforeCounter added in v0.9.11

func (mmHeadRef *PrototypeDescriptorMock) HeadRefBeforeCounter() uint64

HeadRefBeforeCounter returns a count of PrototypeDescriptorMock.HeadRef invocations

func (*PrototypeDescriptorMock) MinimockCodeDone added in v0.9.11

func (m *PrototypeDescriptorMock) MinimockCodeDone() bool

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

func (*PrototypeDescriptorMock) MinimockCodeInspect added in v0.9.11

func (m *PrototypeDescriptorMock) MinimockCodeInspect()

MinimockCodeInspect logs each unmet expectation

func (*PrototypeDescriptorMock) MinimockFinish added in v0.9.11

func (m *PrototypeDescriptorMock) MinimockFinish()

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

func (*PrototypeDescriptorMock) MinimockHeadRefDone added in v0.9.11

func (m *PrototypeDescriptorMock) MinimockHeadRefDone() bool

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

func (*PrototypeDescriptorMock) MinimockHeadRefInspect added in v0.9.11

func (m *PrototypeDescriptorMock) MinimockHeadRefInspect()

MinimockHeadRefInspect logs each unmet expectation

func (*PrototypeDescriptorMock) MinimockStateIDDone added in v0.9.11

func (m *PrototypeDescriptorMock) MinimockStateIDDone() bool

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

func (*PrototypeDescriptorMock) MinimockStateIDInspect added in v0.9.11

func (m *PrototypeDescriptorMock) MinimockStateIDInspect()

MinimockStateIDInspect logs each unmet expectation

func (*PrototypeDescriptorMock) MinimockWait added in v0.9.11

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

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

func (*PrototypeDescriptorMock) StateID added in v0.9.11

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

StateID implements PrototypeDescriptor

func (*PrototypeDescriptorMock) StateIDAfterCounter added in v0.9.11

func (mmStateID *PrototypeDescriptorMock) StateIDAfterCounter() uint64

StateIDAfterCounter returns a count of finished PrototypeDescriptorMock.StateID invocations

func (*PrototypeDescriptorMock) StateIDBeforeCounter added in v0.9.11

func (mmStateID *PrototypeDescriptorMock) StateIDBeforeCounter() uint64

StateIDBeforeCounter returns a count of PrototypeDescriptorMock.StateID invocations

type PrototypeDescriptorMockCodeExpectation added in v0.9.11

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

PrototypeDescriptorMockCodeExpectation specifies expectation struct of the PrototypeDescriptor.Code

type PrototypeDescriptorMockCodeResults added in v0.9.11

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

PrototypeDescriptorMockCodeResults contains results of the PrototypeDescriptor.Code

type PrototypeDescriptorMockHeadRefExpectation added in v0.9.11

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

PrototypeDescriptorMockHeadRefExpectation specifies expectation struct of the PrototypeDescriptor.HeadRef

type PrototypeDescriptorMockHeadRefResults added in v0.9.11

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

PrototypeDescriptorMockHeadRefResults contains results of the PrototypeDescriptor.HeadRef

type PrototypeDescriptorMockStateIDExpectation added in v0.9.11

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

PrototypeDescriptorMockStateIDExpectation specifies expectation struct of the PrototypeDescriptor.StateID

type PrototypeDescriptorMockStateIDResults added in v0.9.11

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

PrototypeDescriptorMockStateIDResults contains results of the PrototypeDescriptor.StateID

type PulseAccessorLRU added in v1.1.0

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

func NewPulseAccessorLRU added in v1.1.0

func NewPulseAccessorLRU(pulses pulse.Accessor, client Client, size int) *PulseAccessorLRU

func (*PulseAccessorLRU) ForPulseNumber added in v1.1.0

func (p *PulseAccessorLRU) ForPulseNumber(ctx context.Context, pn insolar.PulseNumber) (insolar.Pulse, error)

func (*PulseAccessorLRU) Latest added in v1.1.0

func (p *PulseAccessorLRU) Latest(ctx context.Context) (insolar.Pulse, error)

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