Documentation
¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: ./0003_migration_interfaces.go
Generated by this command:
mockgen -typed -package=localsql -destination=./0003_mocks.go -source=./0003_migration_interfaces.go
Package localsql is a generated GoMock package.
nolint
Index ¶
- func New0001Migration(dataDir string) *migration0001
- func New0002Migration(dataDir string) *migration0002
- func New0003Migration(dataDir string, poetClients []PoetClient) *migration0003
- type Database
- type MockPoetClient
- type MockPoetClientMockRecorder
- type NIPostBuilderState
- type PoetClient
- type PoetClientAddressCall
- type PoetClientPoetServiceIDCall
- type PoetRequest
- type PoetServiceID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New0001Migration ¶
func New0001Migration(dataDir string) *migration0001
func New0002Migration ¶
func New0002Migration(dataDir string) *migration0002
func New0003Migration ¶ added in v1.4.0
func New0003Migration(dataDir string, poetClients []PoetClient) *migration0003
Types ¶
type MockPoetClient ¶ added in v1.4.0
type MockPoetClient struct {
// contains filtered or unexported fields
}
MockPoetClient is a mock of PoetClient interface.
func NewMockPoetClient ¶ added in v1.4.0
func NewMockPoetClient(ctrl *gomock.Controller) *MockPoetClient
NewMockPoetClient creates a new mock instance.
func (*MockPoetClient) Address ¶ added in v1.4.0
func (m *MockPoetClient) Address() string
Address mocks base method.
func (*MockPoetClient) EXPECT ¶ added in v1.4.0
func (m *MockPoetClient) EXPECT() *MockPoetClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPoetClient) PoetServiceID ¶ added in v1.4.0
func (m *MockPoetClient) PoetServiceID(ctx context.Context) []byte
PoetServiceID mocks base method.
type MockPoetClientMockRecorder ¶ added in v1.4.0
type MockPoetClientMockRecorder struct {
// contains filtered or unexported fields
}
MockPoetClientMockRecorder is the mock recorder for MockPoetClient.
func (*MockPoetClientMockRecorder) Address ¶ added in v1.4.0
func (mr *MockPoetClientMockRecorder) Address() *PoetClientAddressCall
Address indicates an expected call of Address.
func (*MockPoetClientMockRecorder) PoetServiceID ¶ added in v1.4.0
func (mr *MockPoetClientMockRecorder) PoetServiceID(ctx any) *PoetClientPoetServiceIDCall
PoetServiceID indicates an expected call of PoetServiceID.
type NIPostBuilderState ¶ added in v1.4.0
type NIPostBuilderState struct { Challenge types.Hash32 NIPost *types.NIPost PoetRequests []PoetRequest `scale:"max=100"` // max number of poets a node connects to // PoetProofRef is the root of the proof received from the PoET service. PoetProofRef types.PoetProofRef }
NIPostBuilderState is a builder state.
func (*NIPostBuilderState) DecodeScale ¶ added in v1.4.0
func (t *NIPostBuilderState) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*NIPostBuilderState) EncodeScale ¶ added in v1.4.0
func (t *NIPostBuilderState) EncodeScale(enc *scale.Encoder) (total int, err error)
type PoetClient ¶ added in v1.4.0
type PoetClientAddressCall ¶
PoetClientAddressCall wrap *gomock.Call
func (*PoetClientAddressCall) Do ¶
func (c *PoetClientAddressCall) Do(f func() string) *PoetClientAddressCall
Do rewrite *gomock.Call.Do
func (*PoetClientAddressCall) DoAndReturn ¶
func (c *PoetClientAddressCall) DoAndReturn(f func() string) *PoetClientAddressCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*PoetClientAddressCall) Return ¶
func (c *PoetClientAddressCall) Return(arg0 string) *PoetClientAddressCall
Return rewrite *gomock.Call.Return
type PoetClientPoetServiceIDCall ¶
PoetClientPoetServiceIDCall wrap *gomock.Call
func (*PoetClientPoetServiceIDCall) Do ¶
func (c *PoetClientPoetServiceIDCall) Do(f func(context.Context) []byte) *PoetClientPoetServiceIDCall
Do rewrite *gomock.Call.Do
func (*PoetClientPoetServiceIDCall) DoAndReturn ¶
func (c *PoetClientPoetServiceIDCall) DoAndReturn(f func(context.Context) []byte) *PoetClientPoetServiceIDCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*PoetClientPoetServiceIDCall) Return ¶
func (c *PoetClientPoetServiceIDCall) Return(arg0 []byte) *PoetClientPoetServiceIDCall
Return rewrite *gomock.Call.Return
type PoetRequest ¶ added in v1.4.0
type PoetRequest struct { // PoetRound is the round of the PoET proving service in which the PoET challenge was included in. PoetRound *types.PoetRound // PoetServiceID returns the public key of the PoET proving service. PoetServiceID PoetServiceID }
PoetRequest describes an in-flight challenge submission for a poet proof.
func (*PoetRequest) DecodeScale ¶ added in v1.4.0
func (t *PoetRequest) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*PoetRequest) EncodeScale ¶ added in v1.4.0
func (t *PoetRequest) EncodeScale(enc *scale.Encoder) (total int, err error)
type PoetServiceID ¶ added in v1.4.0
type PoetServiceID struct {
ServiceID []byte `scale:"max=32"` // public key of the PoET service
}
func (*PoetServiceID) DecodeScale ¶ added in v1.4.0
func (t *PoetServiceID) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*PoetServiceID) EncodeScale ¶ added in v1.4.0
func (t *PoetServiceID) EncodeScale(enc *scale.Encoder) (total int, err error)