Documentation ¶
Overview ¶
artifact contains tools for managing ledger artifacts without network, that required by genesis and other bootstrap stuff
Index ¶
- type Manager
- type ManagerMock
- func (mmActivateObject *ManagerMock) ActivateObject(ctx context.Context, domain insolar.Reference, obj insolar.Reference, ...) (err error)
- func (mmActivateObject *ManagerMock) ActivateObjectAfterCounter() uint64
- func (mmActivateObject *ManagerMock) ActivateObjectBeforeCounter() uint64
- func (mmDeployCode *ManagerMock) DeployCode(ctx context.Context, domain insolar.Reference, request insolar.Reference, ...) (ip1 *insolar.ID, err error)
- func (mmDeployCode *ManagerMock) DeployCodeAfterCounter() uint64
- func (mmDeployCode *ManagerMock) DeployCodeBeforeCounter() uint64
- func (mmGetObject *ManagerMock) GetObject(ctx context.Context, head insolar.Reference) (o1 ObjectDescriptor, err error)
- func (mmGetObject *ManagerMock) GetObjectAfterCounter() uint64
- func (mmGetObject *ManagerMock) GetObjectBeforeCounter() uint64
- func (m *ManagerMock) MinimockActivateObjectDone() bool
- func (m *ManagerMock) MinimockActivateObjectInspect()
- func (m *ManagerMock) MinimockDeployCodeDone() bool
- func (m *ManagerMock) MinimockDeployCodeInspect()
- func (m *ManagerMock) MinimockFinish()
- func (m *ManagerMock) MinimockGetObjectDone() bool
- func (m *ManagerMock) MinimockGetObjectInspect()
- func (m *ManagerMock) MinimockRegisterRequestDone() bool
- func (m *ManagerMock) MinimockRegisterRequestInspect()
- func (m *ManagerMock) MinimockRegisterResultDone() bool
- func (m *ManagerMock) MinimockRegisterResultInspect()
- func (m *ManagerMock) MinimockUpdateObjectDone() bool
- func (m *ManagerMock) MinimockUpdateObjectInspect()
- func (m *ManagerMock) MinimockWait(timeout mm_time.Duration)
- func (mmRegisterRequest *ManagerMock) RegisterRequest(ctx context.Context, req record.IncomingRequest) (ip1 *insolar.ID, err error)
- func (mmRegisterRequest *ManagerMock) RegisterRequestAfterCounter() uint64
- func (mmRegisterRequest *ManagerMock) RegisterRequestBeforeCounter() uint64
- func (mmRegisterResult *ManagerMock) RegisterResult(ctx context.Context, obj insolar.Reference, request insolar.Reference, ...) (ip1 *insolar.ID, err error)
- func (mmRegisterResult *ManagerMock) RegisterResultAfterCounter() uint64
- func (mmRegisterResult *ManagerMock) RegisterResultBeforeCounter() uint64
- func (mmUpdateObject *ManagerMock) UpdateObject(ctx context.Context, domain insolar.Reference, request insolar.Reference, ...) (err error)
- func (mmUpdateObject *ManagerMock) UpdateObjectAfterCounter() uint64
- func (mmUpdateObject *ManagerMock) UpdateObjectBeforeCounter() uint64
- type ManagerMockActivateObjectExpectation
- type ManagerMockActivateObjectParams
- type ManagerMockActivateObjectResults
- type ManagerMockDeployCodeExpectation
- type ManagerMockDeployCodeParams
- type ManagerMockDeployCodeResults
- type ManagerMockGetObjectExpectation
- type ManagerMockGetObjectParams
- type ManagerMockGetObjectResults
- type ManagerMockRegisterRequestExpectation
- type ManagerMockRegisterRequestParams
- type ManagerMockRegisterRequestResults
- type ManagerMockRegisterResultExpectation
- type ManagerMockRegisterResultParams
- type ManagerMockRegisterResultResults
- type ManagerMockUpdateObjectExpectation
- type ManagerMockUpdateObjectParams
- type ManagerMockUpdateObjectResults
- type ObjectDescriptor
- type ObjectDescriptorMock
- func (mmChildPointer *ObjectDescriptorMock) ChildPointer() (ip1 *insolar.ID)
- func (mmChildPointer *ObjectDescriptorMock) ChildPointerAfterCounter() uint64
- func (mmChildPointer *ObjectDescriptorMock) ChildPointerBeforeCounter() uint64
- func (mmCode *ObjectDescriptorMock) Code() (rp1 *insolar.Reference, err error)
- func (mmCode *ObjectDescriptorMock) CodeAfterCounter() uint64
- func (mmCode *ObjectDescriptorMock) CodeBeforeCounter() uint64
- func (mmHeadRef *ObjectDescriptorMock) HeadRef() (rp1 *insolar.Reference)
- func (mmHeadRef *ObjectDescriptorMock) HeadRefAfterCounter() uint64
- func (mmHeadRef *ObjectDescriptorMock) HeadRefBeforeCounter() uint64
- func (mmIsPrototype *ObjectDescriptorMock) IsPrototype() (b1 bool)
- func (mmIsPrototype *ObjectDescriptorMock) IsPrototypeAfterCounter() uint64
- func (mmIsPrototype *ObjectDescriptorMock) IsPrototypeBeforeCounter() uint64
- func (mmMemory *ObjectDescriptorMock) Memory() (ba1 []byte)
- func (mmMemory *ObjectDescriptorMock) MemoryAfterCounter() uint64
- func (mmMemory *ObjectDescriptorMock) MemoryBeforeCounter() uint64
- func (m *ObjectDescriptorMock) MinimockChildPointerDone() bool
- func (m *ObjectDescriptorMock) MinimockChildPointerInspect()
- func (m *ObjectDescriptorMock) MinimockCodeDone() bool
- func (m *ObjectDescriptorMock) MinimockCodeInspect()
- func (m *ObjectDescriptorMock) MinimockFinish()
- func (m *ObjectDescriptorMock) MinimockHeadRefDone() bool
- func (m *ObjectDescriptorMock) MinimockHeadRefInspect()
- func (m *ObjectDescriptorMock) MinimockIsPrototypeDone() bool
- func (m *ObjectDescriptorMock) MinimockIsPrototypeInspect()
- func (m *ObjectDescriptorMock) MinimockMemoryDone() bool
- func (m *ObjectDescriptorMock) MinimockMemoryInspect()
- func (m *ObjectDescriptorMock) MinimockParentDone() bool
- func (m *ObjectDescriptorMock) MinimockParentInspect()
- func (m *ObjectDescriptorMock) MinimockPrototypeDone() bool
- func (m *ObjectDescriptorMock) MinimockPrototypeInspect()
- func (m *ObjectDescriptorMock) MinimockStateIDDone() bool
- func (m *ObjectDescriptorMock) MinimockStateIDInspect()
- func (m *ObjectDescriptorMock) MinimockWait(timeout mm_time.Duration)
- func (mmParent *ObjectDescriptorMock) Parent() (rp1 *insolar.Reference)
- func (mmParent *ObjectDescriptorMock) ParentAfterCounter() uint64
- func (mmParent *ObjectDescriptorMock) ParentBeforeCounter() uint64
- func (mmPrototype *ObjectDescriptorMock) Prototype() (rp1 *insolar.Reference, err error)
- func (mmPrototype *ObjectDescriptorMock) PrototypeAfterCounter() uint64
- func (mmPrototype *ObjectDescriptorMock) PrototypeBeforeCounter() uint64
- func (mmStateID *ObjectDescriptorMock) StateID() (ip1 *insolar.ID)
- func (mmStateID *ObjectDescriptorMock) StateIDAfterCounter() uint64
- func (mmStateID *ObjectDescriptorMock) StateIDBeforeCounter() uint64
- type ObjectDescriptorMockChildPointerExpectation
- type ObjectDescriptorMockChildPointerResults
- type ObjectDescriptorMockCodeExpectation
- type ObjectDescriptorMockCodeResults
- type ObjectDescriptorMockHeadRefExpectation
- type ObjectDescriptorMockHeadRefResults
- type ObjectDescriptorMockIsPrototypeExpectation
- type ObjectDescriptorMockIsPrototypeResults
- type ObjectDescriptorMockMemoryExpectation
- type ObjectDescriptorMockMemoryResults
- type ObjectDescriptorMockParentExpectation
- type ObjectDescriptorMockParentResults
- type ObjectDescriptorMockPrototypeExpectation
- type ObjectDescriptorMockPrototypeResults
- type ObjectDescriptorMockStateIDExpectation
- type ObjectDescriptorMockStateIDResults
- type RefIterator
- type Scope
- func (m *Scope) ActivateObject(ctx context.Context, domain, obj, parent, prototype insolar.Reference, ...) error
- func (m *Scope) DeployCode(ctx context.Context, domain insolar.Reference, request insolar.Reference, ...) (*insolar.ID, error)
- func (m *Scope) GetObject(ctx context.Context, head insolar.Reference) (ObjectDescriptor, error)
- func (m *Scope) RegisterRequest(ctx context.Context, req record.IncomingRequest) (*insolar.ID, error)
- func (m *Scope) RegisterResult(ctx context.Context, obj, request insolar.Reference, payload []byte) (*insolar.ID, error)
- func (m *Scope) UpdateObject(ctx context.Context, domain, request insolar.Reference, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // GetObject returns descriptor for provided state. // // If provided state is nil, the latest state will be returned (w/o deactivation check). GetObject(ctx context.Context, head insolar.Reference) (ObjectDescriptor, error) // RegisterRequest creates request record in storage. RegisterRequest(ctx context.Context, req record.IncomingRequest) (*insolar.ID, error) // RegisterResult saves payload result in storage (emulates of save call result by VM). RegisterResult(ctx context.Context, obj, request insolar.Reference, payload []byte) (*insolar.ID, error) // ActivateObject creates activate object record in storage. // 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". ActivateObject( ctx context.Context, domain, obj, parent, prototype insolar.Reference, memory []byte, ) error // UpdateObject creates amend object record in storage. // Provided reference should be a reference to the head of the object. // Provided memory well be the new object memory. // // Returned descriptor is the latest object state (exact) reference. UpdateObject(ctx context.Context, domain, request insolar.Reference, obj ObjectDescriptor, memory []byte) error // DeployCode creates new code record in storage (code records are used to activate prototypes). DeployCode( ctx context.Context, domain insolar.Reference, request insolar.Reference, code []byte, machineType insolar.MachineType, ) (*insolar.ID, error) }
Manager implements methods required for direct ledger access.
type ManagerMock ¶
type ManagerMock struct { ActivateObjectMock mManagerMockActivateObject DeployCodeMock mManagerMockDeployCode GetObjectMock mManagerMockGetObject RegisterRequestMock mManagerMockRegisterRequest RegisterResultMock mManagerMockRegisterResult UpdateObjectMock mManagerMockUpdateObject // contains filtered or unexported fields }
ManagerMock implements Manager
func NewManagerMock ¶
func NewManagerMock(t minimock.Tester) *ManagerMock
NewManagerMock returns a mock for Manager
func (*ManagerMock) ActivateObject ¶
func (mmActivateObject *ManagerMock) ActivateObject(ctx context.Context, domain insolar.Reference, obj insolar.Reference, parent insolar.Reference, prototype insolar.Reference, memory []byte) (err error)
ActivateObject implements Manager
func (*ManagerMock) ActivateObjectAfterCounter ¶
func (mmActivateObject *ManagerMock) ActivateObjectAfterCounter() uint64
ActivateObjectAfterCounter returns a count of finished ManagerMock.ActivateObject invocations
func (*ManagerMock) ActivateObjectBeforeCounter ¶
func (mmActivateObject *ManagerMock) ActivateObjectBeforeCounter() uint64
ActivateObjectBeforeCounter returns a count of ManagerMock.ActivateObject invocations
func (*ManagerMock) DeployCode ¶
func (mmDeployCode *ManagerMock) DeployCode(ctx context.Context, domain insolar.Reference, request insolar.Reference, code []byte, machineType insolar.MachineType) (ip1 *insolar.ID, err error)
DeployCode implements Manager
func (*ManagerMock) DeployCodeAfterCounter ¶
func (mmDeployCode *ManagerMock) DeployCodeAfterCounter() uint64
DeployCodeAfterCounter returns a count of finished ManagerMock.DeployCode invocations
func (*ManagerMock) DeployCodeBeforeCounter ¶
func (mmDeployCode *ManagerMock) DeployCodeBeforeCounter() uint64
DeployCodeBeforeCounter returns a count of ManagerMock.DeployCode invocations
func (*ManagerMock) GetObject ¶
func (mmGetObject *ManagerMock) GetObject(ctx context.Context, head insolar.Reference) (o1 ObjectDescriptor, err error)
GetObject implements Manager
func (*ManagerMock) GetObjectAfterCounter ¶
func (mmGetObject *ManagerMock) GetObjectAfterCounter() uint64
GetObjectAfterCounter returns a count of finished ManagerMock.GetObject invocations
func (*ManagerMock) GetObjectBeforeCounter ¶
func (mmGetObject *ManagerMock) GetObjectBeforeCounter() uint64
GetObjectBeforeCounter returns a count of ManagerMock.GetObject invocations
func (*ManagerMock) MinimockActivateObjectDone ¶
func (m *ManagerMock) MinimockActivateObjectDone() bool
MinimockActivateObjectDone returns true if the count of the ActivateObject invocations corresponds the number of defined expectations
func (*ManagerMock) MinimockActivateObjectInspect ¶
func (m *ManagerMock) MinimockActivateObjectInspect()
MinimockActivateObjectInspect logs each unmet expectation
func (*ManagerMock) MinimockDeployCodeDone ¶
func (m *ManagerMock) MinimockDeployCodeDone() bool
MinimockDeployCodeDone returns true if the count of the DeployCode invocations corresponds the number of defined expectations
func (*ManagerMock) MinimockDeployCodeInspect ¶
func (m *ManagerMock) MinimockDeployCodeInspect()
MinimockDeployCodeInspect logs each unmet expectation
func (*ManagerMock) MinimockFinish ¶
func (m *ManagerMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*ManagerMock) MinimockGetObjectDone ¶
func (m *ManagerMock) MinimockGetObjectDone() bool
MinimockGetObjectDone returns true if the count of the GetObject invocations corresponds the number of defined expectations
func (*ManagerMock) MinimockGetObjectInspect ¶
func (m *ManagerMock) MinimockGetObjectInspect()
MinimockGetObjectInspect logs each unmet expectation
func (*ManagerMock) MinimockRegisterRequestDone ¶
func (m *ManagerMock) MinimockRegisterRequestDone() bool
MinimockRegisterRequestDone returns true if the count of the RegisterRequest invocations corresponds the number of defined expectations
func (*ManagerMock) MinimockRegisterRequestInspect ¶
func (m *ManagerMock) MinimockRegisterRequestInspect()
MinimockRegisterRequestInspect logs each unmet expectation
func (*ManagerMock) MinimockRegisterResultDone ¶
func (m *ManagerMock) MinimockRegisterResultDone() bool
MinimockRegisterResultDone returns true if the count of the RegisterResult invocations corresponds the number of defined expectations
func (*ManagerMock) MinimockRegisterResultInspect ¶
func (m *ManagerMock) MinimockRegisterResultInspect()
MinimockRegisterResultInspect logs each unmet expectation
func (*ManagerMock) MinimockUpdateObjectDone ¶
func (m *ManagerMock) MinimockUpdateObjectDone() bool
MinimockUpdateObjectDone returns true if the count of the UpdateObject invocations corresponds the number of defined expectations
func (*ManagerMock) MinimockUpdateObjectInspect ¶
func (m *ManagerMock) MinimockUpdateObjectInspect()
MinimockUpdateObjectInspect logs each unmet expectation
func (*ManagerMock) MinimockWait ¶
func (m *ManagerMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*ManagerMock) RegisterRequest ¶
func (mmRegisterRequest *ManagerMock) RegisterRequest(ctx context.Context, req record.IncomingRequest) (ip1 *insolar.ID, err error)
RegisterRequest implements Manager
func (*ManagerMock) RegisterRequestAfterCounter ¶
func (mmRegisterRequest *ManagerMock) RegisterRequestAfterCounter() uint64
RegisterRequestAfterCounter returns a count of finished ManagerMock.RegisterRequest invocations
func (*ManagerMock) RegisterRequestBeforeCounter ¶
func (mmRegisterRequest *ManagerMock) RegisterRequestBeforeCounter() uint64
RegisterRequestBeforeCounter returns a count of ManagerMock.RegisterRequest invocations
func (*ManagerMock) RegisterResult ¶
func (mmRegisterResult *ManagerMock) RegisterResult(ctx context.Context, obj insolar.Reference, request insolar.Reference, payload []byte) (ip1 *insolar.ID, err error)
RegisterResult implements Manager
func (*ManagerMock) RegisterResultAfterCounter ¶
func (mmRegisterResult *ManagerMock) RegisterResultAfterCounter() uint64
RegisterResultAfterCounter returns a count of finished ManagerMock.RegisterResult invocations
func (*ManagerMock) RegisterResultBeforeCounter ¶
func (mmRegisterResult *ManagerMock) RegisterResultBeforeCounter() uint64
RegisterResultBeforeCounter returns a count of ManagerMock.RegisterResult invocations
func (*ManagerMock) UpdateObject ¶
func (mmUpdateObject *ManagerMock) UpdateObject(ctx context.Context, domain insolar.Reference, request insolar.Reference, obj ObjectDescriptor, memory []byte) (err error)
UpdateObject implements Manager
func (*ManagerMock) UpdateObjectAfterCounter ¶
func (mmUpdateObject *ManagerMock) UpdateObjectAfterCounter() uint64
UpdateObjectAfterCounter returns a count of finished ManagerMock.UpdateObject invocations
func (*ManagerMock) UpdateObjectBeforeCounter ¶
func (mmUpdateObject *ManagerMock) UpdateObjectBeforeCounter() uint64
UpdateObjectBeforeCounter returns a count of ManagerMock.UpdateObject invocations
type ManagerMockActivateObjectExpectation ¶
type ManagerMockActivateObjectExpectation struct { Counter uint64 // contains filtered or unexported fields }
ManagerMockActivateObjectExpectation specifies expectation struct of the Manager.ActivateObject
func (*ManagerMockActivateObjectExpectation) Then ¶
func (e *ManagerMockActivateObjectExpectation) Then(err error) *ManagerMock
Then sets up Manager.ActivateObject return parameters for the expectation previously defined by the When method
type ManagerMockActivateObjectParams ¶
type ManagerMockActivateObjectParams struct {
// contains filtered or unexported fields
}
ManagerMockActivateObjectParams contains parameters of the Manager.ActivateObject
type ManagerMockActivateObjectResults ¶
type ManagerMockActivateObjectResults struct {
// contains filtered or unexported fields
}
ManagerMockActivateObjectResults contains results of the Manager.ActivateObject
type ManagerMockDeployCodeExpectation ¶
type ManagerMockDeployCodeExpectation struct { Counter uint64 // contains filtered or unexported fields }
ManagerMockDeployCodeExpectation specifies expectation struct of the Manager.DeployCode
func (*ManagerMockDeployCodeExpectation) Then ¶
func (e *ManagerMockDeployCodeExpectation) Then(ip1 *insolar.ID, err error) *ManagerMock
Then sets up Manager.DeployCode return parameters for the expectation previously defined by the When method
type ManagerMockDeployCodeParams ¶
type ManagerMockDeployCodeParams struct {
// contains filtered or unexported fields
}
ManagerMockDeployCodeParams contains parameters of the Manager.DeployCode
type ManagerMockDeployCodeResults ¶
type ManagerMockDeployCodeResults struct {
// contains filtered or unexported fields
}
ManagerMockDeployCodeResults contains results of the Manager.DeployCode
type ManagerMockGetObjectExpectation ¶
type ManagerMockGetObjectExpectation struct { Counter uint64 // contains filtered or unexported fields }
ManagerMockGetObjectExpectation specifies expectation struct of the Manager.GetObject
func (*ManagerMockGetObjectExpectation) Then ¶
func (e *ManagerMockGetObjectExpectation) Then(o1 ObjectDescriptor, err error) *ManagerMock
Then sets up Manager.GetObject return parameters for the expectation previously defined by the When method
type ManagerMockGetObjectParams ¶
type ManagerMockGetObjectParams struct {
// contains filtered or unexported fields
}
ManagerMockGetObjectParams contains parameters of the Manager.GetObject
type ManagerMockGetObjectResults ¶
type ManagerMockGetObjectResults struct {
// contains filtered or unexported fields
}
ManagerMockGetObjectResults contains results of the Manager.GetObject
type ManagerMockRegisterRequestExpectation ¶
type ManagerMockRegisterRequestExpectation struct { Counter uint64 // contains filtered or unexported fields }
ManagerMockRegisterRequestExpectation specifies expectation struct of the Manager.RegisterRequest
func (*ManagerMockRegisterRequestExpectation) Then ¶
func (e *ManagerMockRegisterRequestExpectation) Then(ip1 *insolar.ID, err error) *ManagerMock
Then sets up Manager.RegisterRequest return parameters for the expectation previously defined by the When method
type ManagerMockRegisterRequestParams ¶
type ManagerMockRegisterRequestParams struct {
// contains filtered or unexported fields
}
ManagerMockRegisterRequestParams contains parameters of the Manager.RegisterRequest
type ManagerMockRegisterRequestResults ¶
type ManagerMockRegisterRequestResults struct {
// contains filtered or unexported fields
}
ManagerMockRegisterRequestResults contains results of the Manager.RegisterRequest
type ManagerMockRegisterResultExpectation ¶
type ManagerMockRegisterResultExpectation struct { Counter uint64 // contains filtered or unexported fields }
ManagerMockRegisterResultExpectation specifies expectation struct of the Manager.RegisterResult
func (*ManagerMockRegisterResultExpectation) Then ¶
func (e *ManagerMockRegisterResultExpectation) Then(ip1 *insolar.ID, err error) *ManagerMock
Then sets up Manager.RegisterResult return parameters for the expectation previously defined by the When method
type ManagerMockRegisterResultParams ¶
type ManagerMockRegisterResultParams struct {
// contains filtered or unexported fields
}
ManagerMockRegisterResultParams contains parameters of the Manager.RegisterResult
type ManagerMockRegisterResultResults ¶
type ManagerMockRegisterResultResults struct {
// contains filtered or unexported fields
}
ManagerMockRegisterResultResults contains results of the Manager.RegisterResult
type ManagerMockUpdateObjectExpectation ¶
type ManagerMockUpdateObjectExpectation struct { Counter uint64 // contains filtered or unexported fields }
ManagerMockUpdateObjectExpectation specifies expectation struct of the Manager.UpdateObject
func (*ManagerMockUpdateObjectExpectation) Then ¶
func (e *ManagerMockUpdateObjectExpectation) Then(err error) *ManagerMock
Then sets up Manager.UpdateObject return parameters for the expectation previously defined by the When method
type ManagerMockUpdateObjectParams ¶
type ManagerMockUpdateObjectParams struct {
// contains filtered or unexported fields
}
ManagerMockUpdateObjectParams contains parameters of the Manager.UpdateObject
type ManagerMockUpdateObjectResults ¶
type ManagerMockUpdateObjectResults struct {
// contains filtered or unexported fields
}
ManagerMockUpdateObjectResults contains results of the Manager.UpdateObject
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.
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 ¶
RefIterator is used for iteration over affined children(parts) of container.
type Scope ¶
type Scope struct { PulseNumber insolar.PulseNumber PCS insolar.PlatformCryptographyScheme RecordModifier object.RecordModifier RecordAccessor object.RecordAccessor IndexAccessor object.IndexAccessor IndexModifier object.IndexModifier }
Scope implements Manager interface.
func (*Scope) ActivateObject ¶
func (m *Scope) ActivateObject( ctx context.Context, domain, obj, parent, prototype insolar.Reference, memory []byte, ) error
ActivateObject creates activate object record in storage. 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".
func (*Scope) DeployCode ¶
func (m *Scope) DeployCode( ctx context.Context, domain insolar.Reference, request insolar.Reference, code []byte, machineType insolar.MachineType, ) (*insolar.ID, error)
DeployCode creates new code record in storage (code records are used to activate prototypes).
func (*Scope) GetObject ¶
GetObject returns descriptor for provided state.
If provided state is nil, the latest state will be returned (w/o deactivation check).
func (*Scope) RegisterRequest ¶
func (m *Scope) RegisterRequest(ctx context.Context, req record.IncomingRequest) (*insolar.ID, error)
RegisterRequest creates request record in storage.
func (*Scope) RegisterResult ¶
func (m *Scope) RegisterResult( ctx context.Context, obj, request insolar.Reference, payload []byte, ) (*insolar.ID, error)
RegisterResult saves payload result in storage (emulates of save call result by VM).
func (*Scope) UpdateObject ¶
func (m *Scope) UpdateObject( ctx context.Context, domain, request insolar.Reference, objDesc ObjectDescriptor, memory []byte, ) error
UpdateObject creates amend object record in storage. Provided reference should be a reference to the head of the object. Provided memory well be the new object memory.
Returned descriptor is the latest object state (exact) reference.