trillian

package module
v0.0.0-...-75544e8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

README

Trillian

General Transparency

Trillian is an implementation of the concepts described in the Verifiable Data Structures white paper, which in turn could be thought of as an extension and generalisation of the ideas which underpin Certificate Transparency.

Build

If you're not with the Go program of working within its own directory tree, then:

% cd <your favourite directory for git repos>
% git clone https://github.com/google/trillian.git
% ln -s `pwd`/trillian $GOPATH/src/github.com/google  # you may have to make this directory first
% cd trillian
% go get -d -v ./...

If you are with the Go program, then you know what to do.

Rebuilding mocks/protobuffers

If you need to re-generate the mock or protobuffer files (this isn't required unless you're changing the code), run the following command:

% go generate -x ./...

You'll need to have the mockgen tool from github.com/golang/mock/gomock installed, as well as protoc and the Go protoc extension (see documentation linked from the protobuf site.)

Test

To run the tests, you need to have an instance of MySQL running, and configured like so:

% mysql -u root -e 'DROP DATABASE IF EXISTS test;'
% mysql -u root -e 'CREATE DATABASE test;'
% mysql -u root -e "GRANT ALL ON test.* TO 'test'@'localhost' IDENTIFIED BY 'zaphod';"
% mysql -u root -D test < storage/mysql/storage.sql

Then:

% go test -v ./...

Mechanisms

Trillian provides a Verifiable Log-Backed Map. This data structure provides the efficient k/v queries of a map, and is constructed from auditable, tamper-evident data structures.

A Verifiable Log-Backed Map ensures that clients can verify that the map they have been shown has also been seen by anyone auditing the log for correct operation, which in turn allows the client to trust the key/value pairs returned by the map.

Data structure complexity

The following table summarizes properties of data structures laid in the Verifiable Data Structures white paper. “Efficiently” means that a client can and should perform this validation themselves. “Full audit” means that to validate correctly, a client would need to download the entire dataset, and is something that in practice we expect a small number of dedicated auditors to perform, rather than being done by each client.

Verifiable Log-Backed Maps use a sparse Merkle Tree implementation. There are more details on how these work in the Revocation Transparency paper. Note that they are not specific to handling X.509 certificates and, as implemented in this project, can store any type of data.

                                     |  Verifiable Log      |  Verifiable Map      |  Verifiable Log-Backed Map

-----------------------------------------|----------------------|----------------------|---------------------------- Prove inclusion of value | Yes, efficiently | Yes, efficiently | Yes, efficiently Prove non-inclusion of value | Impractical | Yes, efficiently | Yes, efficiently Retrieve provable value for key | Impractical | Yes, efficiently | Yes, efficiently Retrieve provable current value for key | Impractical | No | Yes, efficiently Prove append-only | Yes, efficiently | No | Yes, efficiently [1]. Enumerate all entries | Yes, by full audit | Yes, by full audit | Yes, by full audit Prove correct operation | Yes, efficiently | No | Yes, by full audit Enable detection of split-view | Yes, efficiently | Yes, efficiently | Yes, efficiently

  • [1] -- although full audit is required to verify complete correct operation
What can be inserted?

In short: Anything.

This data structure does not describe the format of a log entry, nor specifically how it affects the map. Importantly, the Verifiable Map may in fact be operated by an entirely different party than the backing log, and in turn the log that it writes its Signed Map Heads to may in fact be operated by another party again.

Documentation

Overview

Package trillian is a generated protocol buffer package.

It is generated from these files:

github.com/google/trillian/trillian_api.proto
github.com/google/trillian/trillian.proto

It has these top-level messages:

TrillianApiStatus
LeafProto
NodeProto
ProofProto
QueueLeavesRequest
QueueLeavesResponse
GetInclusionProofRequest
GetInclusionProofResponse
GetInclusionProofByHashRequest
GetInclusionProofByHashResponse
GetConsistencyProofRequest
GetConsistencyProofResponse
GetLeavesByHashRequest
GetLeavesByHashResponse
GetLeavesByIndexRequest
GetLeavesByIndexResponse
GetSequencedLeafCountRequest
GetSequencedLeafCountResponse
GetLatestSignedLogRootRequest
GetLatestSignedLogRootResponse
GetEntryAndProofRequest
GetEntryAndProofResponse
MapLeaf
KeyValue
KeyValueInclusion
GetMapLeavesRequest
GetMapLeavesResponse
SetMapLeavesRequest
SetMapLeavesResponse
GetSignedMapRootRequest
GetSignedMapRootResponse
DigitallySigned
SignedEntryTimestamp
SignedLogRoot
MapperMetadata
SignedMapRoot

Index

Constants

This section is empty.

Variables

View Source
var HashAlgorithm_name = map[int32]string{
	0: "SHA256",
}
View Source
var HashAlgorithm_value = map[string]int32{
	"SHA256": 0,
}
View Source
var SignatureAlgorithm_name = map[int32]string{
	0: "ECDSA",
	1: "RSA",
}
View Source
var SignatureAlgorithm_value = map[string]int32{
	"ECDSA": 0,
	"RSA":   1,
}
View Source
var TreeHasherPreimageType_name = map[int32]string{
	0: "RFC_6962_PREIMAGE",
}
View Source
var TreeHasherPreimageType_value = map[string]int32{
	"RFC_6962_PREIMAGE": 0,
}
View Source
var TrillianApiStatusCode_name = map[int32]string{
	0: "OK",
	1: "ERROR",
}
View Source
var TrillianApiStatusCode_value = map[string]int32{
	"OK":    0,
	"ERROR": 1,
}

Functions

func RegisterTrillianLogServer

func RegisterTrillianLogServer(s *grpc.Server, srv TrillianLogServer)

func RegisterTrillianMapServer

func RegisterTrillianMapServer(s *grpc.Server, srv TrillianMapServer)

Types

type DigitallySigned

type DigitallySigned struct {
	SignatureAlgorithm SignatureAlgorithm `` /* 142-byte string literal not displayed */
	HashAlgorithm      HashAlgorithm      `protobuf:"varint,2,opt,name=hash_algorithm,json=hashAlgorithm,enum=trillian.HashAlgorithm" json:"hash_algorithm,omitempty"`
	Signature          []byte             `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (*DigitallySigned) Descriptor

func (*DigitallySigned) Descriptor() ([]byte, []int)

func (*DigitallySigned) ProtoMessage

func (*DigitallySigned) ProtoMessage()

func (*DigitallySigned) Reset

func (m *DigitallySigned) Reset()

func (*DigitallySigned) String

func (m *DigitallySigned) String() string

type GetConsistencyProofRequest

type GetConsistencyProofRequest struct {
	LogId          int64 `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
	FirstTreeSize  int64 `protobuf:"varint,2,opt,name=first_tree_size,json=firstTreeSize" json:"first_tree_size,omitempty"`
	SecondTreeSize int64 `protobuf:"varint,3,opt,name=second_tree_size,json=secondTreeSize" json:"second_tree_size,omitempty"`
}

func (*GetConsistencyProofRequest) Descriptor

func (*GetConsistencyProofRequest) Descriptor() ([]byte, []int)

func (*GetConsistencyProofRequest) ProtoMessage

func (*GetConsistencyProofRequest) ProtoMessage()

func (*GetConsistencyProofRequest) Reset

func (m *GetConsistencyProofRequest) Reset()

func (*GetConsistencyProofRequest) String

func (m *GetConsistencyProofRequest) String() string

type GetConsistencyProofResponse

type GetConsistencyProofResponse struct {
	Status *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Proof  *ProofProto        `protobuf:"bytes,2,opt,name=proof" json:"proof,omitempty"`
}

func (*GetConsistencyProofResponse) Descriptor

func (*GetConsistencyProofResponse) Descriptor() ([]byte, []int)

func (*GetConsistencyProofResponse) GetProof

func (m *GetConsistencyProofResponse) GetProof() *ProofProto

func (*GetConsistencyProofResponse) GetStatus

func (*GetConsistencyProofResponse) ProtoMessage

func (*GetConsistencyProofResponse) ProtoMessage()

func (*GetConsistencyProofResponse) Reset

func (m *GetConsistencyProofResponse) Reset()

func (*GetConsistencyProofResponse) String

func (m *GetConsistencyProofResponse) String() string

type GetEntryAndProofRequest

type GetEntryAndProofRequest struct {
	LogId     int64 `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
	LeafIndex int64 `protobuf:"varint,2,opt,name=leaf_index,json=leafIndex" json:"leaf_index,omitempty"`
	TreeSize  int64 `protobuf:"varint,3,opt,name=tree_size,json=treeSize" json:"tree_size,omitempty"`
}

func (*GetEntryAndProofRequest) Descriptor

func (*GetEntryAndProofRequest) Descriptor() ([]byte, []int)

func (*GetEntryAndProofRequest) ProtoMessage

func (*GetEntryAndProofRequest) ProtoMessage()

func (*GetEntryAndProofRequest) Reset

func (m *GetEntryAndProofRequest) Reset()

func (*GetEntryAndProofRequest) String

func (m *GetEntryAndProofRequest) String() string

type GetEntryAndProofResponse

type GetEntryAndProofResponse struct {
	Status *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Proof  *ProofProto        `protobuf:"bytes,2,opt,name=proof" json:"proof,omitempty"`
	Leaf   *LeafProto         `protobuf:"bytes,3,opt,name=leaf" json:"leaf,omitempty"`
}

func (*GetEntryAndProofResponse) Descriptor

func (*GetEntryAndProofResponse) Descriptor() ([]byte, []int)

func (*GetEntryAndProofResponse) GetLeaf

func (m *GetEntryAndProofResponse) GetLeaf() *LeafProto

func (*GetEntryAndProofResponse) GetProof

func (m *GetEntryAndProofResponse) GetProof() *ProofProto

func (*GetEntryAndProofResponse) GetStatus

func (*GetEntryAndProofResponse) ProtoMessage

func (*GetEntryAndProofResponse) ProtoMessage()

func (*GetEntryAndProofResponse) Reset

func (m *GetEntryAndProofResponse) Reset()

func (*GetEntryAndProofResponse) String

func (m *GetEntryAndProofResponse) String() string

type GetInclusionProofByHashRequest

type GetInclusionProofByHashRequest struct {
	LogId           int64  `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
	LeafHash        []byte `protobuf:"bytes,2,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"`
	TreeSize        int64  `protobuf:"varint,3,opt,name=tree_size,json=treeSize" json:"tree_size,omitempty"`
	OrderBySequence bool   `protobuf:"varint,4,opt,name=order_by_sequence,json=orderBySequence" json:"order_by_sequence,omitempty"`
}

func (*GetInclusionProofByHashRequest) Descriptor

func (*GetInclusionProofByHashRequest) Descriptor() ([]byte, []int)

func (*GetInclusionProofByHashRequest) ProtoMessage

func (*GetInclusionProofByHashRequest) ProtoMessage()

func (*GetInclusionProofByHashRequest) Reset

func (m *GetInclusionProofByHashRequest) Reset()

func (*GetInclusionProofByHashRequest) String

type GetInclusionProofByHashResponse

type GetInclusionProofByHashResponse struct {
	Status *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Logs can potentially contain leaves with duplicate hashes so it's possible
	// for this to return multiple proofs.
	Proof []*ProofProto `protobuf:"bytes,2,rep,name=proof" json:"proof,omitempty"`
}

func (*GetInclusionProofByHashResponse) Descriptor

func (*GetInclusionProofByHashResponse) Descriptor() ([]byte, []int)

func (*GetInclusionProofByHashResponse) GetProof

func (*GetInclusionProofByHashResponse) GetStatus

func (*GetInclusionProofByHashResponse) ProtoMessage

func (*GetInclusionProofByHashResponse) ProtoMessage()

func (*GetInclusionProofByHashResponse) Reset

func (*GetInclusionProofByHashResponse) String

type GetInclusionProofRequest

type GetInclusionProofRequest struct {
	LogId     int64 `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
	LeafIndex int64 `protobuf:"varint,2,opt,name=leaf_index,json=leafIndex" json:"leaf_index,omitempty"`
	TreeSize  int64 `protobuf:"varint,3,opt,name=tree_size,json=treeSize" json:"tree_size,omitempty"`
}

func (*GetInclusionProofRequest) Descriptor

func (*GetInclusionProofRequest) Descriptor() ([]byte, []int)

func (*GetInclusionProofRequest) ProtoMessage

func (*GetInclusionProofRequest) ProtoMessage()

func (*GetInclusionProofRequest) Reset

func (m *GetInclusionProofRequest) Reset()

func (*GetInclusionProofRequest) String

func (m *GetInclusionProofRequest) String() string

type GetInclusionProofResponse

type GetInclusionProofResponse struct {
	Status *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Proof  *ProofProto        `protobuf:"bytes,2,opt,name=proof" json:"proof,omitempty"`
}

func (*GetInclusionProofResponse) Descriptor

func (*GetInclusionProofResponse) Descriptor() ([]byte, []int)

func (*GetInclusionProofResponse) GetProof

func (m *GetInclusionProofResponse) GetProof() *ProofProto

func (*GetInclusionProofResponse) GetStatus

func (*GetInclusionProofResponse) ProtoMessage

func (*GetInclusionProofResponse) ProtoMessage()

func (*GetInclusionProofResponse) Reset

func (m *GetInclusionProofResponse) Reset()

func (*GetInclusionProofResponse) String

func (m *GetInclusionProofResponse) String() string

type GetLatestSignedLogRootRequest

type GetLatestSignedLogRootRequest struct {
	LogId int64 `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
}

func (*GetLatestSignedLogRootRequest) Descriptor

func (*GetLatestSignedLogRootRequest) Descriptor() ([]byte, []int)

func (*GetLatestSignedLogRootRequest) ProtoMessage

func (*GetLatestSignedLogRootRequest) ProtoMessage()

func (*GetLatestSignedLogRootRequest) Reset

func (m *GetLatestSignedLogRootRequest) Reset()

func (*GetLatestSignedLogRootRequest) String

type GetLatestSignedLogRootResponse

type GetLatestSignedLogRootResponse struct {
	Status        *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	SignedLogRoot *SignedLogRoot     `protobuf:"bytes,2,opt,name=signed_log_root,json=signedLogRoot" json:"signed_log_root,omitempty"`
}

func (*GetLatestSignedLogRootResponse) Descriptor

func (*GetLatestSignedLogRootResponse) Descriptor() ([]byte, []int)

func (*GetLatestSignedLogRootResponse) GetSignedLogRoot

func (m *GetLatestSignedLogRootResponse) GetSignedLogRoot() *SignedLogRoot

func (*GetLatestSignedLogRootResponse) GetStatus

func (*GetLatestSignedLogRootResponse) ProtoMessage

func (*GetLatestSignedLogRootResponse) ProtoMessage()

func (*GetLatestSignedLogRootResponse) Reset

func (m *GetLatestSignedLogRootResponse) Reset()

func (*GetLatestSignedLogRootResponse) String

type GetLeavesByHashRequest

type GetLeavesByHashRequest struct {
	LogId           int64    `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
	LeafHash        [][]byte `protobuf:"bytes,2,rep,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"`
	OrderBySequence bool     `protobuf:"varint,3,opt,name=order_by_sequence,json=orderBySequence" json:"order_by_sequence,omitempty"`
}

func (*GetLeavesByHashRequest) Descriptor

func (*GetLeavesByHashRequest) Descriptor() ([]byte, []int)

func (*GetLeavesByHashRequest) ProtoMessage

func (*GetLeavesByHashRequest) ProtoMessage()

func (*GetLeavesByHashRequest) Reset

func (m *GetLeavesByHashRequest) Reset()

func (*GetLeavesByHashRequest) String

func (m *GetLeavesByHashRequest) String() string

type GetLeavesByHashResponse

type GetLeavesByHashResponse struct {
	Status *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Leaves []*LeafProto       `protobuf:"bytes,2,rep,name=leaves" json:"leaves,omitempty"`
}

func (*GetLeavesByHashResponse) Descriptor

func (*GetLeavesByHashResponse) Descriptor() ([]byte, []int)

func (*GetLeavesByHashResponse) GetLeaves

func (m *GetLeavesByHashResponse) GetLeaves() []*LeafProto

func (*GetLeavesByHashResponse) GetStatus

func (*GetLeavesByHashResponse) ProtoMessage

func (*GetLeavesByHashResponse) ProtoMessage()

func (*GetLeavesByHashResponse) Reset

func (m *GetLeavesByHashResponse) Reset()

func (*GetLeavesByHashResponse) String

func (m *GetLeavesByHashResponse) String() string

type GetLeavesByIndexRequest

type GetLeavesByIndexRequest struct {
	LogId     int64   `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
	LeafIndex []int64 `protobuf:"varint,2,rep,name=leaf_index,json=leafIndex" json:"leaf_index,omitempty"`
}

func (*GetLeavesByIndexRequest) Descriptor

func (*GetLeavesByIndexRequest) Descriptor() ([]byte, []int)

func (*GetLeavesByIndexRequest) ProtoMessage

func (*GetLeavesByIndexRequest) ProtoMessage()

func (*GetLeavesByIndexRequest) Reset

func (m *GetLeavesByIndexRequest) Reset()

func (*GetLeavesByIndexRequest) String

func (m *GetLeavesByIndexRequest) String() string

type GetLeavesByIndexResponse

type GetLeavesByIndexResponse struct {
	Status *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Leaves []*LeafProto       `protobuf:"bytes,2,rep,name=leaves" json:"leaves,omitempty"`
}

func (*GetLeavesByIndexResponse) Descriptor

func (*GetLeavesByIndexResponse) Descriptor() ([]byte, []int)

func (*GetLeavesByIndexResponse) GetLeaves

func (m *GetLeavesByIndexResponse) GetLeaves() []*LeafProto

func (*GetLeavesByIndexResponse) GetStatus

func (*GetLeavesByIndexResponse) ProtoMessage

func (*GetLeavesByIndexResponse) ProtoMessage()

func (*GetLeavesByIndexResponse) Reset

func (m *GetLeavesByIndexResponse) Reset()

func (*GetLeavesByIndexResponse) String

func (m *GetLeavesByIndexResponse) String() string

type GetMapLeavesRequest

type GetMapLeavesRequest struct {
	MapId    int64    `protobuf:"varint,1,opt,name=map_id,json=mapId" json:"map_id,omitempty"`
	Key      [][]byte `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty"`
	Revision int64    `protobuf:"varint,3,opt,name=revision" json:"revision,omitempty"`
}

func (*GetMapLeavesRequest) Descriptor

func (*GetMapLeavesRequest) Descriptor() ([]byte, []int)

func (*GetMapLeavesRequest) ProtoMessage

func (*GetMapLeavesRequest) ProtoMessage()

func (*GetMapLeavesRequest) Reset

func (m *GetMapLeavesRequest) Reset()

func (*GetMapLeavesRequest) String

func (m *GetMapLeavesRequest) String() string

type GetMapLeavesResponse

type GetMapLeavesResponse struct {
	Status   *TrillianApiStatus   `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	KeyValue []*KeyValueInclusion `protobuf:"bytes,2,rep,name=key_value,json=keyValue" json:"key_value,omitempty"`
	MapRoot  *SignedMapRoot       `protobuf:"bytes,3,opt,name=map_root,json=mapRoot" json:"map_root,omitempty"`
}

func (*GetMapLeavesResponse) Descriptor

func (*GetMapLeavesResponse) Descriptor() ([]byte, []int)

func (*GetMapLeavesResponse) GetKeyValue

func (m *GetMapLeavesResponse) GetKeyValue() []*KeyValueInclusion

func (*GetMapLeavesResponse) GetMapRoot

func (m *GetMapLeavesResponse) GetMapRoot() *SignedMapRoot

func (*GetMapLeavesResponse) GetStatus

func (m *GetMapLeavesResponse) GetStatus() *TrillianApiStatus

func (*GetMapLeavesResponse) ProtoMessage

func (*GetMapLeavesResponse) ProtoMessage()

func (*GetMapLeavesResponse) Reset

func (m *GetMapLeavesResponse) Reset()

func (*GetMapLeavesResponse) String

func (m *GetMapLeavesResponse) String() string

type GetSequencedLeafCountRequest

type GetSequencedLeafCountRequest struct {
	LogId int64 `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
}

func (*GetSequencedLeafCountRequest) Descriptor

func (*GetSequencedLeafCountRequest) Descriptor() ([]byte, []int)

func (*GetSequencedLeafCountRequest) ProtoMessage

func (*GetSequencedLeafCountRequest) ProtoMessage()

func (*GetSequencedLeafCountRequest) Reset

func (m *GetSequencedLeafCountRequest) Reset()

func (*GetSequencedLeafCountRequest) String

type GetSequencedLeafCountResponse

type GetSequencedLeafCountResponse struct {
	Status    *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	LeafCount int64              `protobuf:"varint,2,opt,name=leaf_count,json=leafCount" json:"leaf_count,omitempty"`
}

func (*GetSequencedLeafCountResponse) Descriptor

func (*GetSequencedLeafCountResponse) Descriptor() ([]byte, []int)

func (*GetSequencedLeafCountResponse) GetStatus

func (*GetSequencedLeafCountResponse) ProtoMessage

func (*GetSequencedLeafCountResponse) ProtoMessage()

func (*GetSequencedLeafCountResponse) Reset

func (m *GetSequencedLeafCountResponse) Reset()

func (*GetSequencedLeafCountResponse) String

type GetSignedMapRootRequest

type GetSignedMapRootRequest struct {
	MapId int64 `protobuf:"varint,1,opt,name=map_id,json=mapId" json:"map_id,omitempty"`
}

func (*GetSignedMapRootRequest) Descriptor

func (*GetSignedMapRootRequest) Descriptor() ([]byte, []int)

func (*GetSignedMapRootRequest) ProtoMessage

func (*GetSignedMapRootRequest) ProtoMessage()

func (*GetSignedMapRootRequest) Reset

func (m *GetSignedMapRootRequest) Reset()

func (*GetSignedMapRootRequest) String

func (m *GetSignedMapRootRequest) String() string

type GetSignedMapRootResponse

type GetSignedMapRootResponse struct {
	Status  *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	MapRoot *SignedMapRoot     `protobuf:"bytes,2,opt,name=map_root,json=mapRoot" json:"map_root,omitempty"`
}

func (*GetSignedMapRootResponse) Descriptor

func (*GetSignedMapRootResponse) Descriptor() ([]byte, []int)

func (*GetSignedMapRootResponse) GetMapRoot

func (m *GetSignedMapRootResponse) GetMapRoot() *SignedMapRoot

func (*GetSignedMapRootResponse) GetStatus

func (*GetSignedMapRootResponse) ProtoMessage

func (*GetSignedMapRootResponse) ProtoMessage()

func (*GetSignedMapRootResponse) Reset

func (m *GetSignedMapRootResponse) Reset()

func (*GetSignedMapRootResponse) String

func (m *GetSignedMapRootResponse) String() string

type Hash

type Hash []byte

Hash repesents the cryptographic hash value of some data

func (Hash) String

func (h Hash) String() string

type HashAlgorithm

type HashAlgorithm int32
const (
	HashAlgorithm_SHA256 HashAlgorithm = 0
)

func (HashAlgorithm) EnumDescriptor

func (HashAlgorithm) EnumDescriptor() ([]byte, []int)

func (HashAlgorithm) String

func (x HashAlgorithm) String() string

type Hasher

type Hasher struct {
	crypto.Hash
	// contains filtered or unexported fields
}

Hasher is the interface which must be implemented by hashers.

func NewHasher

func NewHasher(alg HashAlgorithm) (Hasher, error)

func NewSHA256

func NewSHA256() Hasher

SHA256 is a stateless SHA-256 hashing function which conforms to the Hasher prototype.

func (Hasher) Digest

func (h Hasher) Digest(b []byte) Hash

Calculates the digest of b according to the underlying algorithm.

func (Hasher) HashAlgorithm

func (h Hasher) HashAlgorithm() HashAlgorithm

type Key

type Key []byte

Key is a map key.

type KeyValue

type KeyValue struct {
	Key   []byte   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value *MapLeaf `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

func (*KeyValue) Descriptor

func (*KeyValue) Descriptor() ([]byte, []int)

func (*KeyValue) GetValue

func (m *KeyValue) GetValue() *MapLeaf

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset

func (m *KeyValue) Reset()

func (*KeyValue) String

func (m *KeyValue) String() string

type KeyValueInclusion

type KeyValueInclusion struct {
	KeyValue  *KeyValue `protobuf:"bytes,1,opt,name=key_value,json=keyValue" json:"key_value,omitempty"`
	Inclusion [][]byte  `protobuf:"bytes,2,rep,name=inclusion,proto3" json:"inclusion,omitempty"`
}

func (*KeyValueInclusion) Descriptor

func (*KeyValueInclusion) Descriptor() ([]byte, []int)

func (*KeyValueInclusion) GetKeyValue

func (m *KeyValueInclusion) GetKeyValue() *KeyValue

func (*KeyValueInclusion) ProtoMessage

func (*KeyValueInclusion) ProtoMessage()

func (*KeyValueInclusion) Reset

func (m *KeyValueInclusion) Reset()

func (*KeyValueInclusion) String

func (m *KeyValueInclusion) String() string

type Leaf

type Leaf struct {
	// LeafHash is the tree hash of LeafValue
	LeafHash Hash
	// LeafValue is the data the tree commits to.
	LeafValue []byte
	// ExtraData holds related contextual data, but this data is not included in any hash.
	ExtraData []byte
}

Leaf represents the data behind merkle leaves.

type LeafProto

type LeafProto struct {
	LeafHash  []byte `protobuf:"bytes,1,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"`
	LeafData  []byte `protobuf:"bytes,2,opt,name=leaf_data,json=leafData,proto3" json:"leaf_data,omitempty"`
	ExtraData []byte `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
	LeafIndex int64  `protobuf:"varint,4,opt,name=leaf_index,json=leafIndex" json:"leaf_index,omitempty"`
}

func (*LeafProto) Descriptor

func (*LeafProto) Descriptor() ([]byte, []int)

func (*LeafProto) ProtoMessage

func (*LeafProto) ProtoMessage()

func (*LeafProto) Reset

func (m *LeafProto) Reset()

func (*LeafProto) String

func (m *LeafProto) String() string

type LogID

type LogID struct {
	// LogID is the unique (public) ID of the Log.
	LogID []byte
	// TreeID is the internal ID of the stored tree data.
	TreeID int64
}

LogID represents a single Log instance, and ties it to a particular stored tree instance.

type LogLeaf

type LogLeaf struct {
	// Leaf holds the the leaf data itself.
	Leaf
	// SignedEntryTimestamp is a commitment to the data.
	SignedEntryTimestamp SignedEntryTimestamp
	// Sequencenumber holds the position in the log this leaf has been assigned to.
	SequenceNumber int64
}

LogLeaf represents data behind Log leaves.

type MapID

type MapID struct {
	// MapID is the unique (public) ID of the Map.
	MapID []byte
	// TreeID is the internal ID of the stored tree data.
	TreeID int64
}

MapID represents a single Map instance, and ties it to a particular stored tree instance.

type MapLeaf

type MapLeaf struct {
	// leaf_hash is the tree hash of leaf_value.
	LeafHash []byte `protobuf:"bytes,1,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"`
	// leaf_value is the data the tree commits to.
	LeafValue []byte `protobuf:"bytes,2,opt,name=leaf_value,json=leafValue,proto3" json:"leaf_value,omitempty"`
	// extra_data holds related contextual data, but is not covered by any hash.
	ExtraData []byte `protobuf:"bytes,3,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
}

MapLeaf represents the data behind Map leaves.

func (*MapLeaf) Descriptor

func (*MapLeaf) Descriptor() ([]byte, []int)

func (*MapLeaf) ProtoMessage

func (*MapLeaf) ProtoMessage()

func (*MapLeaf) Reset

func (m *MapLeaf) Reset()

func (*MapLeaf) String

func (m *MapLeaf) String() string

type MapperMetadata

type MapperMetadata struct {
	SourceLogId                  []byte `protobuf:"bytes,1,opt,name=source_log_id,json=sourceLogId,proto3" json:"source_log_id,omitempty"`
	HighestFullyCompletedSeq     int64  `` /* 131-byte string literal not displayed */
	HighestPartiallyCompletedSeq int64  `` /* 143-byte string literal not displayed */
}

func (*MapperMetadata) Descriptor

func (*MapperMetadata) Descriptor() ([]byte, []int)

func (*MapperMetadata) ProtoMessage

func (*MapperMetadata) ProtoMessage()

func (*MapperMetadata) Reset

func (m *MapperMetadata) Reset()

func (*MapperMetadata) String

func (m *MapperMetadata) String() string

type MockTrillianLogClient

type MockTrillianLogClient struct {
	// contains filtered or unexported fields
}

Mock of TrillianLogClient interface

func NewMockTrillianLogClient

func NewMockTrillianLogClient(ctrl *gomock.Controller) *MockTrillianLogClient

func (*MockTrillianLogClient) EXPECT

func (_m *MockTrillianLogClient) EXPECT() *_MockTrillianLogClientRecorder

func (*MockTrillianLogClient) GetConsistencyProof

func (_m *MockTrillianLogClient) GetConsistencyProof(_param0 context.Context, _param1 *GetConsistencyProofRequest, _param2 ...grpc.CallOption) (*GetConsistencyProofResponse, error)

func (*MockTrillianLogClient) GetEntryAndProof

func (_m *MockTrillianLogClient) GetEntryAndProof(_param0 context.Context, _param1 *GetEntryAndProofRequest, _param2 ...grpc.CallOption) (*GetEntryAndProofResponse, error)

func (*MockTrillianLogClient) GetInclusionProof

func (_m *MockTrillianLogClient) GetInclusionProof(_param0 context.Context, _param1 *GetInclusionProofRequest, _param2 ...grpc.CallOption) (*GetInclusionProofResponse, error)

func (*MockTrillianLogClient) GetInclusionProofByHash

func (_m *MockTrillianLogClient) GetInclusionProofByHash(_param0 context.Context, _param1 *GetInclusionProofByHashRequest, _param2 ...grpc.CallOption) (*GetInclusionProofByHashResponse, error)

func (*MockTrillianLogClient) GetLatestSignedLogRoot

func (_m *MockTrillianLogClient) GetLatestSignedLogRoot(_param0 context.Context, _param1 *GetLatestSignedLogRootRequest, _param2 ...grpc.CallOption) (*GetLatestSignedLogRootResponse, error)

func (*MockTrillianLogClient) GetLeavesByHash

func (_m *MockTrillianLogClient) GetLeavesByHash(_param0 context.Context, _param1 *GetLeavesByHashRequest, _param2 ...grpc.CallOption) (*GetLeavesByHashResponse, error)

func (*MockTrillianLogClient) GetLeavesByIndex

func (_m *MockTrillianLogClient) GetLeavesByIndex(_param0 context.Context, _param1 *GetLeavesByIndexRequest, _param2 ...grpc.CallOption) (*GetLeavesByIndexResponse, error)

func (*MockTrillianLogClient) GetSequencedLeafCount

func (_m *MockTrillianLogClient) GetSequencedLeafCount(_param0 context.Context, _param1 *GetSequencedLeafCountRequest, _param2 ...grpc.CallOption) (*GetSequencedLeafCountResponse, error)

func (*MockTrillianLogClient) QueueLeaves

func (_m *MockTrillianLogClient) QueueLeaves(_param0 context.Context, _param1 *QueueLeavesRequest, _param2 ...grpc.CallOption) (*QueueLeavesResponse, error)

type MockTrillianLogServer

type MockTrillianLogServer struct {
	// contains filtered or unexported fields
}

Mock of TrillianLogServer interface

func NewMockTrillianLogServer

func NewMockTrillianLogServer(ctrl *gomock.Controller) *MockTrillianLogServer

func (*MockTrillianLogServer) EXPECT

func (_m *MockTrillianLogServer) EXPECT() *_MockTrillianLogServerRecorder

func (*MockTrillianLogServer) GetConsistencyProof

func (*MockTrillianLogServer) GetEntryAndProof

func (_m *MockTrillianLogServer) GetEntryAndProof(_param0 context.Context, _param1 *GetEntryAndProofRequest) (*GetEntryAndProofResponse, error)

func (*MockTrillianLogServer) GetInclusionProof

func (*MockTrillianLogServer) GetInclusionProofByHash

func (*MockTrillianLogServer) GetLatestSignedLogRoot

func (*MockTrillianLogServer) GetLeavesByHash

func (_m *MockTrillianLogServer) GetLeavesByHash(_param0 context.Context, _param1 *GetLeavesByHashRequest) (*GetLeavesByHashResponse, error)

func (*MockTrillianLogServer) GetLeavesByIndex

func (_m *MockTrillianLogServer) GetLeavesByIndex(_param0 context.Context, _param1 *GetLeavesByIndexRequest) (*GetLeavesByIndexResponse, error)

func (*MockTrillianLogServer) GetSequencedLeafCount

func (*MockTrillianLogServer) QueueLeaves

func (_m *MockTrillianLogServer) QueueLeaves(_param0 context.Context, _param1 *QueueLeavesRequest) (*QueueLeavesResponse, error)

type MockTrillianMapClient

type MockTrillianMapClient struct {
	// contains filtered or unexported fields
}

Mock of TrillianMapClient interface

func NewMockTrillianMapClient

func NewMockTrillianMapClient(ctrl *gomock.Controller) *MockTrillianMapClient

func (*MockTrillianMapClient) EXPECT

func (_m *MockTrillianMapClient) EXPECT() *_MockTrillianMapClientRecorder

func (*MockTrillianMapClient) GetLeaves

func (_m *MockTrillianMapClient) GetLeaves(_param0 context.Context, _param1 *GetMapLeavesRequest, _param2 ...grpc.CallOption) (*GetMapLeavesResponse, error)

func (*MockTrillianMapClient) GetSignedMapRoot

func (_m *MockTrillianMapClient) GetSignedMapRoot(_param0 context.Context, _param1 *GetSignedMapRootRequest, _param2 ...grpc.CallOption) (*GetSignedMapRootResponse, error)

func (*MockTrillianMapClient) SetLeaves

func (_m *MockTrillianMapClient) SetLeaves(_param0 context.Context, _param1 *SetMapLeavesRequest, _param2 ...grpc.CallOption) (*SetMapLeavesResponse, error)

type MockTrillianMapServer

type MockTrillianMapServer struct {
	// contains filtered or unexported fields
}

Mock of TrillianMapServer interface

func NewMockTrillianMapServer

func NewMockTrillianMapServer(ctrl *gomock.Controller) *MockTrillianMapServer

func (*MockTrillianMapServer) EXPECT

func (_m *MockTrillianMapServer) EXPECT() *_MockTrillianMapServerRecorder

func (*MockTrillianMapServer) GetLeaves

func (*MockTrillianMapServer) GetSignedMapRoot

func (_m *MockTrillianMapServer) GetSignedMapRoot(_param0 context.Context, _param1 *GetSignedMapRootRequest) (*GetSignedMapRootResponse, error)

func (*MockTrillianMapServer) SetLeaves

type NodeProto

type NodeProto struct {
	NodeId       []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	NodeHash     []byte `protobuf:"bytes,2,opt,name=node_hash,json=nodeHash,proto3" json:"node_hash,omitempty"`
	NodeRevision int64  `protobuf:"varint,3,opt,name=node_revision,json=nodeRevision" json:"node_revision,omitempty"`
}

func (*NodeProto) Descriptor

func (*NodeProto) Descriptor() ([]byte, []int)

func (*NodeProto) ProtoMessage

func (*NodeProto) ProtoMessage()

func (*NodeProto) Reset

func (m *NodeProto) Reset()

func (*NodeProto) String

func (m *NodeProto) String() string

type ProofProto

type ProofProto struct {
	LeafIndex int64        `protobuf:"varint,1,opt,name=leaf_index,json=leafIndex" json:"leaf_index,omitempty"`
	ProofNode []*NodeProto `protobuf:"bytes,2,rep,name=proof_node,json=proofNode" json:"proof_node,omitempty"`
}

func (*ProofProto) Descriptor

func (*ProofProto) Descriptor() ([]byte, []int)

func (*ProofProto) GetProofNode

func (m *ProofProto) GetProofNode() []*NodeProto

func (*ProofProto) ProtoMessage

func (*ProofProto) ProtoMessage()

func (*ProofProto) Reset

func (m *ProofProto) Reset()

func (*ProofProto) String

func (m *ProofProto) String() string

type QueueLeavesRequest

type QueueLeavesRequest struct {
	LogId  int64        `protobuf:"varint,1,opt,name=log_id,json=logId" json:"log_id,omitempty"`
	Leaves []*LeafProto `protobuf:"bytes,2,rep,name=leaves" json:"leaves,omitempty"`
}

func (*QueueLeavesRequest) Descriptor

func (*QueueLeavesRequest) Descriptor() ([]byte, []int)

func (*QueueLeavesRequest) GetLeaves

func (m *QueueLeavesRequest) GetLeaves() []*LeafProto

func (*QueueLeavesRequest) ProtoMessage

func (*QueueLeavesRequest) ProtoMessage()

func (*QueueLeavesRequest) Reset

func (m *QueueLeavesRequest) Reset()

func (*QueueLeavesRequest) String

func (m *QueueLeavesRequest) String() string

type QueueLeavesResponse

type QueueLeavesResponse struct {
	Status *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}

TODO(Martin2112): This will eventually contain the signed timestamps and stuff that we return for the queued leaves

func (*QueueLeavesResponse) Descriptor

func (*QueueLeavesResponse) Descriptor() ([]byte, []int)

func (*QueueLeavesResponse) GetStatus

func (m *QueueLeavesResponse) GetStatus() *TrillianApiStatus

func (*QueueLeavesResponse) ProtoMessage

func (*QueueLeavesResponse) ProtoMessage()

func (*QueueLeavesResponse) Reset

func (m *QueueLeavesResponse) Reset()

func (*QueueLeavesResponse) String

func (m *QueueLeavesResponse) String() string

type SetMapLeavesRequest

type SetMapLeavesRequest struct {
	MapId      int64           `protobuf:"varint,1,opt,name=map_id,json=mapId" json:"map_id,omitempty"`
	KeyValue   []*KeyValue     `protobuf:"bytes,2,rep,name=key_value,json=keyValue" json:"key_value,omitempty"`
	MapperData *MapperMetadata `protobuf:"bytes,3,opt,name=mapper_data,json=mapperData" json:"mapper_data,omitempty"`
}

func (*SetMapLeavesRequest) Descriptor

func (*SetMapLeavesRequest) Descriptor() ([]byte, []int)

func (*SetMapLeavesRequest) GetKeyValue

func (m *SetMapLeavesRequest) GetKeyValue() []*KeyValue

func (*SetMapLeavesRequest) GetMapperData

func (m *SetMapLeavesRequest) GetMapperData() *MapperMetadata

func (*SetMapLeavesRequest) ProtoMessage

func (*SetMapLeavesRequest) ProtoMessage()

func (*SetMapLeavesRequest) Reset

func (m *SetMapLeavesRequest) Reset()

func (*SetMapLeavesRequest) String

func (m *SetMapLeavesRequest) String() string

type SetMapLeavesResponse

type SetMapLeavesResponse struct {
	Status  *TrillianApiStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	MapRoot *SignedMapRoot     `protobuf:"bytes,2,opt,name=map_root,json=mapRoot" json:"map_root,omitempty"`
}

func (*SetMapLeavesResponse) Descriptor

func (*SetMapLeavesResponse) Descriptor() ([]byte, []int)

func (*SetMapLeavesResponse) GetMapRoot

func (m *SetMapLeavesResponse) GetMapRoot() *SignedMapRoot

func (*SetMapLeavesResponse) GetStatus

func (m *SetMapLeavesResponse) GetStatus() *TrillianApiStatus

func (*SetMapLeavesResponse) ProtoMessage

func (*SetMapLeavesResponse) ProtoMessage()

func (*SetMapLeavesResponse) Reset

func (m *SetMapLeavesResponse) Reset()

func (*SetMapLeavesResponse) String

func (m *SetMapLeavesResponse) String() string

type SignatureAlgorithm

type SignatureAlgorithm int32
const (
	SignatureAlgorithm_ECDSA SignatureAlgorithm = 0
	SignatureAlgorithm_RSA   SignatureAlgorithm = 1
)

func (SignatureAlgorithm) EnumDescriptor

func (SignatureAlgorithm) EnumDescriptor() ([]byte, []int)

func (SignatureAlgorithm) String

func (x SignatureAlgorithm) String() string

type SignedEntryTimestamp

type SignedEntryTimestamp struct {
	TimestampNanos int64            `protobuf:"varint,1,opt,name=timestamp_nanos,json=timestampNanos" json:"timestamp_nanos,omitempty"`
	LogId          []byte           `protobuf:"bytes,2,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"`
	Signature      *DigitallySigned `protobuf:"bytes,3,opt,name=signature" json:"signature,omitempty"`
}

func (*SignedEntryTimestamp) Descriptor

func (*SignedEntryTimestamp) Descriptor() ([]byte, []int)

func (*SignedEntryTimestamp) GetSignature

func (m *SignedEntryTimestamp) GetSignature() *DigitallySigned

func (*SignedEntryTimestamp) ProtoMessage

func (*SignedEntryTimestamp) ProtoMessage()

func (*SignedEntryTimestamp) Reset

func (m *SignedEntryTimestamp) Reset()

func (*SignedEntryTimestamp) String

func (m *SignedEntryTimestamp) String() string

type SignedLogRoot

type SignedLogRoot struct {
	// epoch nanoseconds, good until 2500ish
	TimestampNanos int64  `protobuf:"varint,1,opt,name=timestamp_nanos,json=timestampNanos" json:"timestamp_nanos,omitempty"`
	RootHash       []byte `protobuf:"bytes,2,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"`
	// TreeSize is the number of entries in the tree.
	TreeSize int64 `protobuf:"varint,3,opt,name=tree_size,json=treeSize" json:"tree_size,omitempty"`
	// TODO(al): define serialised format for the signature scheme.
	Signature    *DigitallySigned `protobuf:"bytes,4,opt,name=signature" json:"signature,omitempty"`
	LogId        []byte           `protobuf:"bytes,5,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"`
	TreeRevision int64            `protobuf:"varint,6,opt,name=tree_revision,json=treeRevision" json:"tree_revision,omitempty"`
}

SignedLogRoot represents a commitment by a Log to a particular tree.

func (*SignedLogRoot) Descriptor

func (*SignedLogRoot) Descriptor() ([]byte, []int)

func (*SignedLogRoot) GetSignature

func (m *SignedLogRoot) GetSignature() *DigitallySigned

func (*SignedLogRoot) ProtoMessage

func (*SignedLogRoot) ProtoMessage()

func (*SignedLogRoot) Reset

func (m *SignedLogRoot) Reset()

func (*SignedLogRoot) String

func (m *SignedLogRoot) String() string

type SignedMapRoot

type SignedMapRoot struct {
	TimestampNanos int64           `protobuf:"varint,1,opt,name=timestamp_nanos,json=timestampNanos" json:"timestamp_nanos,omitempty"`
	RootHash       []byte          `protobuf:"bytes,2,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"`
	Metadata       *MapperMetadata `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"`
	// TODO(al): define serialised format for the signature scheme.
	Signature   *DigitallySigned `protobuf:"bytes,4,opt,name=signature" json:"signature,omitempty"`
	MapId       []byte           `protobuf:"bytes,5,opt,name=map_id,json=mapId,proto3" json:"map_id,omitempty"`
	MapRevision int64            `protobuf:"varint,6,opt,name=map_revision,json=mapRevision" json:"map_revision,omitempty"`
}

SignedMapRoot represents a commitment by a Map to a particular tree.

func (*SignedMapRoot) Descriptor

func (*SignedMapRoot) Descriptor() ([]byte, []int)

func (*SignedMapRoot) GetMetadata

func (m *SignedMapRoot) GetMetadata() *MapperMetadata

func (*SignedMapRoot) GetSignature

func (m *SignedMapRoot) GetSignature() *DigitallySigned

func (*SignedMapRoot) ProtoMessage

func (*SignedMapRoot) ProtoMessage()

func (*SignedMapRoot) Reset

func (m *SignedMapRoot) Reset()

func (*SignedMapRoot) String

func (m *SignedMapRoot) String() string

type TreeHasherPreimageType

type TreeHasherPreimageType int32

This defines the way empty / node / leaf hashes are constructed incorporating preimage protection, which can be application specific.

const (
	// For Certificate transparency leaf hash prefix = 0x00, node prefix = 0x01, empty hash
	// is digest([]byte{}) as defined in the specification
	TreeHasherPreimageType_RFC_6962_PREIMAGE TreeHasherPreimageType = 0
)

func (TreeHasherPreimageType) EnumDescriptor

func (TreeHasherPreimageType) EnumDescriptor() ([]byte, []int)

func (TreeHasherPreimageType) String

func (x TreeHasherPreimageType) String() string

type TreeRoot

type TreeRoot struct {
	// RootHash is the Merkle tree root hash.
	RootHash Hash
	// Timestamp is the instant at which the root was calculated.
	Timestamp time.Time
	// TreeID identifies the particular tree this root pertains to.
	TreeID int64
	// TreeRevision is effectively a "sequence" number for TreeRoots.
	TreeRevision int64
}

TreeRoot represents the root of a Merkle tree.

type TrillianApiStatus

type TrillianApiStatus struct {
	// The status code indicates the overall result of the operation.
	StatusCode TrillianApiStatusCode `protobuf:"varint,1,opt,name=status_code,json=statusCode,enum=trillian.TrillianApiStatusCode" json:"status_code,omitempty"`
	// Applications should not make assumptions about the contents of description. They
	// should use status_code only when making error handling decisions.
	Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
}

All operations return a TrillianApiStatus. TODO(Martin2112): Most of the operations are not fully defined yet. They will be implemented soon

func (*TrillianApiStatus) Descriptor

func (*TrillianApiStatus) Descriptor() ([]byte, []int)

func (*TrillianApiStatus) ProtoMessage

func (*TrillianApiStatus) ProtoMessage()

func (*TrillianApiStatus) Reset

func (m *TrillianApiStatus) Reset()

func (*TrillianApiStatus) String

func (m *TrillianApiStatus) String() string

type TrillianApiStatusCode

type TrillianApiStatusCode int32

TrillianApiStatusCode is an application level status code

const (
	TrillianApiStatusCode_OK    TrillianApiStatusCode = 0
	TrillianApiStatusCode_ERROR TrillianApiStatusCode = 1
)

func (TrillianApiStatusCode) EnumDescriptor

func (TrillianApiStatusCode) EnumDescriptor() ([]byte, []int)

func (TrillianApiStatusCode) String

func (x TrillianApiStatusCode) String() string

type TrillianLogClient

type TrillianLogClient interface {
	// Corresponds to the LeafQueuer API
	QueueLeaves(ctx context.Context, in *QueueLeavesRequest, opts ...grpc.CallOption) (*QueueLeavesResponse, error)
	// No direct equivalent at the storage level
	GetInclusionProof(ctx context.Context, in *GetInclusionProofRequest, opts ...grpc.CallOption) (*GetInclusionProofResponse, error)
	GetInclusionProofByHash(ctx context.Context, in *GetInclusionProofByHashRequest, opts ...grpc.CallOption) (*GetInclusionProofByHashResponse, error)
	GetConsistencyProof(ctx context.Context, in *GetConsistencyProofRequest, opts ...grpc.CallOption) (*GetConsistencyProofResponse, error)
	// Corresponds to the LogRootReader API
	GetLatestSignedLogRoot(ctx context.Context, in *GetLatestSignedLogRootRequest, opts ...grpc.CallOption) (*GetLatestSignedLogRootResponse, error)
	// Corresponds to the LeafReader API
	GetSequencedLeafCount(ctx context.Context, in *GetSequencedLeafCountRequest, opts ...grpc.CallOption) (*GetSequencedLeafCountResponse, error)
	GetLeavesByIndex(ctx context.Context, in *GetLeavesByIndexRequest, opts ...grpc.CallOption) (*GetLeavesByIndexResponse, error)
	GetLeavesByHash(ctx context.Context, in *GetLeavesByHashRequest, opts ...grpc.CallOption) (*GetLeavesByHashResponse, error)
	GetEntryAndProof(ctx context.Context, in *GetEntryAndProofRequest, opts ...grpc.CallOption) (*GetEntryAndProofResponse, error)
}

func NewTrillianLogClient

func NewTrillianLogClient(cc *grpc.ClientConn) TrillianLogClient

type TrillianLogServer

type TrillianLogServer interface {
	// Corresponds to the LeafQueuer API
	QueueLeaves(context.Context, *QueueLeavesRequest) (*QueueLeavesResponse, error)
	// No direct equivalent at the storage level
	GetInclusionProof(context.Context, *GetInclusionProofRequest) (*GetInclusionProofResponse, error)
	GetInclusionProofByHash(context.Context, *GetInclusionProofByHashRequest) (*GetInclusionProofByHashResponse, error)
	GetConsistencyProof(context.Context, *GetConsistencyProofRequest) (*GetConsistencyProofResponse, error)
	// Corresponds to the LogRootReader API
	GetLatestSignedLogRoot(context.Context, *GetLatestSignedLogRootRequest) (*GetLatestSignedLogRootResponse, error)
	// Corresponds to the LeafReader API
	GetSequencedLeafCount(context.Context, *GetSequencedLeafCountRequest) (*GetSequencedLeafCountResponse, error)
	GetLeavesByIndex(context.Context, *GetLeavesByIndexRequest) (*GetLeavesByIndexResponse, error)
	GetLeavesByHash(context.Context, *GetLeavesByHashRequest) (*GetLeavesByHashResponse, error)
	GetEntryAndProof(context.Context, *GetEntryAndProofRequest) (*GetEntryAndProofResponse, error)
}

type TrillianMapClient

type TrillianMapClient interface {
	GetLeaves(ctx context.Context, in *GetMapLeavesRequest, opts ...grpc.CallOption) (*GetMapLeavesResponse, error)
	SetLeaves(ctx context.Context, in *SetMapLeavesRequest, opts ...grpc.CallOption) (*SetMapLeavesResponse, error)
	GetSignedMapRoot(ctx context.Context, in *GetSignedMapRootRequest, opts ...grpc.CallOption) (*GetSignedMapRootResponse, error)
}

func NewTrillianMapClient

func NewTrillianMapClient(cc *grpc.ClientConn) TrillianMapClient

Directories

Path Synopsis
examples
ct
Package ct contains a usage example by providing an implementation of an RFC6962 compatible CT log server using a Trillian log server as backend storage via its GRPC API.
Package ct contains a usage example by providing an implementation of an RFC6962 compatible CT log server using a Trillian log server as backend storage via its GRPC API.
ct/ct_mapper
Package ct_mapper is a generated protocol buffer package.
Package ct_mapper is a generated protocol buffer package.
ct/ct_server command
ct/testonly
Package testonly contains code and data that should only be used by tests.
Package testonly contains code and data that should only be used by tests.
Runs sequencing operations
Runs sequencing operations
log command
Package storage is a generated protocol buffer package.
Package storage is a generated protocol buffer package.
Package testonly contains code and data that should only be used by tests.
Package testonly contains code and data that should only be used by tests.
vmap
rpctoy command
toy command

Jump to

Keyboard shortcuts

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