api

package
v0.0.0-...-cc9bb6a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

package api implements the Sigsum v0 API. See

https://git.sigsum.org/sigsum/tree/doc/api.md

for further details. No verification, retries, etc., is done here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	GetToCosignTreeHead() (*types.SignedTreeHead, error)
	GetCosignedTreeHead() (*types.CosignedTreeHead, error)
	GetInclusionProof(treeSize uint64, leafHash *types.Hash) (*types.InclusionProof, error)
	GetConsistencyProof(oldSize, newSize uint64) (*types.ConsistencyProof, error)
	GetLeaves(startSize, endSize uint64) (*types.Leaves, error)

	AddLeaf(*requests.Leaf) error
	AddCosignature(*requests.Cosignature) error
}

type NetworkClient

type NetworkClient struct {
	http.Client
	LogURL string
}

func NewNetworkClient

func NewNetworkClient(httpClient http.Client, logURL string) *NetworkClient

func (*NetworkClient) AddCosignature

func (c *NetworkClient) AddCosignature(*requests.Cosignature) error

func (*NetworkClient) AddLeaf

func (c *NetworkClient) AddLeaf(leaf *requests.Leaf) error

func (*NetworkClient) GetConsistencyProof

func (c *NetworkClient) GetConsistencyProof(oldSize, newSize uint64) (*types.ConsistencyProof, error)

func (*NetworkClient) GetCosignedTreeHead

func (c *NetworkClient) GetCosignedTreeHead() (*types.CosignedTreeHead, error)

func (*NetworkClient) GetInclusionProof

func (c *NetworkClient) GetInclusionProof(treeSize uint64, leafHash *types.Hash) (*types.InclusionProof, error)

func (*NetworkClient) GetLeaves

func (c *NetworkClient) GetLeaves(startSize, endSize uint64) (*types.Leaves, error)

func (*NetworkClient) GetToCosignTreeHead

func (c *NetworkClient) GetToCosignTreeHead() (*types.SignedTreeHead, error)

Jump to

Keyboard shortcuts

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