Documentation ¶
Index ¶
- func CreateAndInitTree(ctx context.Context, adminClient trillian.TrillianAdminClient, ...) (*trillian.Tree, error)
- type Response
- type TrillianClient
- func (t *TrillianClient) AddLeaf(byteValue []byte) *Response
- func (t *TrillianClient) GetConsistencyProof(firstSize, lastSize int64) *Response
- func (t *TrillianClient) GetLatest(leafSizeInt int64) *Response
- func (t *TrillianClient) GetLeafAndProofByHash(hash []byte) *Response
- func (t *TrillianClient) GetLeafAndProofByIndex(index int64) *Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAndInitTree ¶
func CreateAndInitTree(ctx context.Context, adminClient trillian.TrillianAdminClient, logClient trillian.TrillianLogClient) (*trillian.Tree, error)
Types ¶
type Response ¶
type Response struct { // Status is the status code of the response Status codes.Code // Error contains an error on request or client failure Err error // GetAddResult contains the response from queueing a leaf in Trillian GetAddResult *trillian.QueueLeafResponse // GetLeafAndProofResult contains the response for fetching an inclusion proof and leaf GetLeafAndProofResult *trillian.GetEntryAndProofResponse // GetLatestResult contains the response for the latest checkpoint GetLatestResult *trillian.GetLatestSignedLogRootResponse // GetConsistencyProofResult contains the response for a consistency proof between two log sizes GetConsistencyProofResult *trillian.GetConsistencyProofResponse // contains filtered or unexported fields }
Response includes a status code, an optional error message, and one of the results based on the API call
type TrillianClient ¶
type TrillianClient struct {
// contains filtered or unexported fields
}
TrillianClient provides a wrapper around the Trillian client
func NewTrillianClient ¶
func NewTrillianClient(ctx context.Context, logClient trillian.TrillianLogClient, logID int64) TrillianClient
NewTrillianClient creates a TrillianClient with the given Trillian client and log/tree ID.
func (*TrillianClient) AddLeaf ¶
func (t *TrillianClient) AddLeaf(byteValue []byte) *Response
func (*TrillianClient) GetConsistencyProof ¶
func (t *TrillianClient) GetConsistencyProof(firstSize, lastSize int64) *Response
func (*TrillianClient) GetLatest ¶
func (t *TrillianClient) GetLatest(leafSizeInt int64) *Response
func (*TrillianClient) GetLeafAndProofByHash ¶
func (t *TrillianClient) GetLeafAndProofByHash(hash []byte) *Response
func (*TrillianClient) GetLeafAndProofByIndex ¶
func (t *TrillianClient) GetLeafAndProofByIndex(index int64) *Response
Click to show internal directories.
Click to hide internal directories.