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 ¶
- type API
- type NetworkClient
- func (c *NetworkClient) AddCosignature(*requests.Cosignature) error
- func (c *NetworkClient) AddLeaf(leaf *requests.Leaf) error
- func (c *NetworkClient) GetConsistencyProof(oldSize, newSize uint64) (*types.ConsistencyProof, error)
- func (c *NetworkClient) GetCosignedTreeHead() (*types.CosignedTreeHead, error)
- func (c *NetworkClient) GetInclusionProof(treeSize uint64, leafHash *types.Hash) (*types.InclusionProof, error)
- func (c *NetworkClient) GetLeaves(startSize, endSize uint64) (*types.Leaves, error)
- func (c *NetworkClient) GetToCosignTreeHead() (*types.SignedTreeHead, error)
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 ¶
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)
Click to show internal directories.
Click to hide internal directories.