Documentation ¶
Index ¶
- type Client
- type TrillianClient
- func (c *TrillianClient) AddLeaf(ctx context.Context, req *requests.Leaf, treeSize uint64) (bool, error)
- func (c *TrillianClient) AddSequencedLeaves(ctx context.Context, leaves types.Leaves, index int64) error
- func (c *TrillianClient) GetConsistencyProof(ctx context.Context, req *requests.ConsistencyProof) (*types.ConsistencyProof, error)
- func (c *TrillianClient) GetInclusionProof(ctx context.Context, req *requests.InclusionProof) (*types.InclusionProof, error)
- func (c *TrillianClient) GetLeaves(ctx context.Context, req *requests.Leaves) (*types.Leaves, error)
- func (c *TrillianClient) GetTreeHead(ctx context.Context) (*types.TreeHead, error)
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, uint64) (bool, error) AddSequencedLeaves(ctx context.Context, leaves types.Leaves, index int64) 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, treeSize uint64) (bool, error)
AddLeaf adds a leaf to the tree and returns true if the leaf has been sequenced into the tree of size treeSize.
func (*TrillianClient) AddSequencedLeaves ¶
func (c *TrillianClient) AddSequencedLeaves(ctx context.Context, leaves types.Leaves, index int64) error
AddSequencedLeaves adds a set of already sequenced leaves to the tree.
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 ¶
Click to show internal directories.
Click to hide internal directories.