localsql

package
v1.4.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 19 Imported by: 1

Documentation

Overview

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 MockPoetClientAddressCall added in v1.4.0

type MockPoetClientAddressCall struct {
	*gomock.Call
}

MockPoetClientAddressCall wrap *gomock.Call

func (*MockPoetClientAddressCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockPoetClientAddressCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockPoetClientAddressCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

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 MockPoetClientPoetServiceIDCall added in v1.4.0

type MockPoetClientPoetServiceIDCall struct {
	*gomock.Call
}

MockPoetClientPoetServiceIDCall wrap *gomock.Call

func (*MockPoetClientPoetServiceIDCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockPoetClientPoetServiceIDCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockPoetClientPoetServiceIDCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

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