db

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	AddLeaf(context.Context, *requests.Leaf) error
	GetTreeHead(context.Context) (*types.TreeHead, error)
	GetConsistencyProof(context.Context, *requests.ConsistencyProof) (*types.ConsistencyProof, error)
	GetInclusionProof(context.Context, *requests.InclusionProof) (*types.InclusionProof, error)
	GetLeaves(context.Context, *requests.Leaves) (*types.Leaves, error)
}

Client is an interface that interacts with a log's database backend

type TrillianClient

type TrillianClient struct {
	// TreeID is a Merkle tree identifier that Trillian uses
	TreeID int64

	// GRPC is a Trillian gRPC client
	GRPC trillian.TrillianLogClient
}

TrillianClient implements the Client interface for Trillian's gRPC backend

func (*TrillianClient) AddLeaf

func (c *TrillianClient) AddLeaf(ctx context.Context, req *requests.Leaf) error

func (*TrillianClient) GetConsistencyProof

func (c *TrillianClient) GetConsistencyProof(ctx context.Context, req *requests.ConsistencyProof) (*types.ConsistencyProof, error)

func (*TrillianClient) GetInclusionProof

func (c *TrillianClient) GetInclusionProof(ctx context.Context, req *requests.InclusionProof) (*types.InclusionProof, error)

func (*TrillianClient) GetLeaves

func (c *TrillianClient) GetLeaves(ctx context.Context, req *requests.Leaves) (*types.Leaves, error)

func (*TrillianClient) GetTreeHead

func (c *TrillianClient) GetTreeHead(ctx context.Context) (*types.TreeHead, error)

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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