localsql

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 19 Imported by: 1

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

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 Database

type Database struct {
	*sql.Database
}

func InMemory

func InMemory(opts ...sql.Opt) *Database

func Open

func Open(uri string, opts ...sql.Opt) (*Database, error)

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

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

Address indicates an expected call of Address.

func (*MockPoetClientMockRecorder) PoetServiceID added in v1.4.0

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 PoetClient interface {
	PoetServiceID(ctx context.Context) []byte
	Address() string
}

type PoetClientAddressCall

type PoetClientAddressCall struct {
	*gomock.Call
}

PoetClientAddressCall wrap *gomock.Call

func (*PoetClientAddressCall) Do

Do rewrite *gomock.Call.Do

func (*PoetClientAddressCall) DoAndReturn

func (c *PoetClientAddressCall) DoAndReturn(f func() string) *PoetClientAddressCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*PoetClientAddressCall) Return

Return rewrite *gomock.Call.Return

type PoetClientPoetServiceIDCall

type PoetClientPoetServiceIDCall struct {
	*gomock.Call
}

PoetClientPoetServiceIDCall wrap *gomock.Call

func (*PoetClientPoetServiceIDCall) Do

Do rewrite *gomock.Call.Do

func (*PoetClientPoetServiceIDCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*PoetClientPoetServiceIDCall) Return

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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