spannerpb

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HashAlgorithm_name = map[int32]string{
	0: "NONE",
	4: "SHA256",
}
View Source
var HashAlgorithm_value = map[string]int32{
	"NONE":   0,
	"SHA256": 4,
}
View Source
var HashStrategy_name = map[int32]string{
	0: "UNKNOWN_HASH_STRATEGY",
	1: "RFC_6962",
	2: "TEST_MAP_HASHER",
	3: "OBJECT_RFC6962_SHA256",
	4: "CONIKS_SHA512_256",
}
View Source
var HashStrategy_value = map[string]int32{
	"UNKNOWN_HASH_STRATEGY": 0,
	"RFC_6962":              1,
	"TEST_MAP_HASHER":       2,
	"OBJECT_RFC6962_SHA256": 3,
	"CONIKS_SHA512_256":     4,
}
View Source
var SignatureAlgorithm_name = map[int32]string{
	0: "ANONYMOUS",
	1: "RSA",
	3: "ECDSA",
}
View Source
var SignatureAlgorithm_value = map[string]int32{
	"ANONYMOUS": 0,
	"RSA":       1,
	"ECDSA":     3,
}
View Source
var TreeState_name = map[int32]string{
	0: "UNKNOWN_TREE_STATE",
	1: "ACTIVE",
	2: "FROZEN",
}
View Source
var TreeState_value = map[string]int32{
	"UNKNOWN_TREE_STATE": 0,
	"ACTIVE":             1,
	"FROZEN":             2,
}
View Source
var TreeType_name = map[int32]string{
	0: "UNKNOWN",
	1: "LOG",
	2: "MAP",
}
View Source
var TreeType_value = map[string]int32{
	"UNKNOWN": 0,
	"LOG":     1,
	"MAP":     2,
}

Functions

This section is empty.

Types

type HashAlgorithm

type HashAlgorithm int32

Supported hash algorithms. The numbering space is the same as for TLS, given in RFC 5246 s7.4.1.4.1. See http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18. Mirrors trillian.HashAlgorithm.

const (
	// No hash algorithm is used.
	HashAlgorithm_NONE HashAlgorithm = 0
	// SHA256 is used.
	HashAlgorithm_SHA256 HashAlgorithm = 4
)

func (HashAlgorithm) EnumDescriptor

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

func (HashAlgorithm) String

func (x HashAlgorithm) String() string

type HashStrategy

type HashStrategy int32

Defines the preimage protection used for tree leaves / nodes. Eg, RFC6962 dictates a 0x00 prefix for leaves and 0x01 for nodes. Mirrors trillian.HashStrategy.

const (
	HashStrategy_UNKNOWN_HASH_STRATEGY HashStrategy = 0
	HashStrategy_RFC_6962              HashStrategy = 1
	HashStrategy_TEST_MAP_HASHER       HashStrategy = 2
	HashStrategy_OBJECT_RFC6962_SHA256 HashStrategy = 3
	HashStrategy_CONIKS_SHA512_256     HashStrategy = 4
)

func (HashStrategy) EnumDescriptor

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

func (HashStrategy) String

func (x HashStrategy) String() string

type LogStorageConfig

type LogStorageConfig struct {
	// num_unseq_buckets defines the length of the unsequenced time ring buffer.
	// This value must *never* be reduced for any provisioned tree.
	//
	// This value should be >= 1, and there's probably not much benefit in
	// raising it past about 4.
	// TODO(al): test what the effects of various values are here.
	NumUnseqBuckets int64 `protobuf:"varint,1,opt,name=num_unseq_buckets,json=numUnseqBuckets" json:"num_unseq_buckets,omitempty"`
	// num_merkle_buckets defines the number of individual buckets below each
	// unsequenced ring bucket.
	// This value may be changed at any time (so long as you understand the
	// impact it'll have on integration performace!)
	//
	// This value must lie in the range [1..256]
	NumMerkleBuckets     int64    `protobuf:"varint,2,opt,name=num_merkle_buckets,json=numMerkleBuckets" json:"num_merkle_buckets,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LogStorageConfig holds settings which tune the storage implementation for a given log tree.

func (*LogStorageConfig) Descriptor

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

func (*LogStorageConfig) GetNumMerkleBuckets

func (m *LogStorageConfig) GetNumMerkleBuckets() int64

func (*LogStorageConfig) GetNumUnseqBuckets

func (m *LogStorageConfig) GetNumUnseqBuckets() int64

func (*LogStorageConfig) ProtoMessage

func (*LogStorageConfig) ProtoMessage()

func (*LogStorageConfig) Reset

func (m *LogStorageConfig) Reset()

func (*LogStorageConfig) String

func (m *LogStorageConfig) String() string

func (*LogStorageConfig) XXX_DiscardUnknown added in v1.2.1

func (m *LogStorageConfig) XXX_DiscardUnknown()

func (*LogStorageConfig) XXX_Marshal added in v1.2.1

func (m *LogStorageConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogStorageConfig) XXX_Merge added in v1.2.1

func (dst *LogStorageConfig) XXX_Merge(src proto.Message)

func (*LogStorageConfig) XXX_Size added in v1.2.1

func (m *LogStorageConfig) XXX_Size() int

func (*LogStorageConfig) XXX_Unmarshal added in v1.2.1

func (m *LogStorageConfig) XXX_Unmarshal(b []byte) error

type MapStorageConfig

type MapStorageConfig struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

MapStorageConfig holds settings which tune the storage implementation for a given map tree.

func (*MapStorageConfig) Descriptor

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

func (*MapStorageConfig) ProtoMessage

func (*MapStorageConfig) ProtoMessage()

func (*MapStorageConfig) Reset

func (m *MapStorageConfig) Reset()

func (*MapStorageConfig) String

func (m *MapStorageConfig) String() string

func (*MapStorageConfig) XXX_DiscardUnknown added in v1.2.1

func (m *MapStorageConfig) XXX_DiscardUnknown()

func (*MapStorageConfig) XXX_Marshal added in v1.2.1

func (m *MapStorageConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapStorageConfig) XXX_Merge added in v1.2.1

func (dst *MapStorageConfig) XXX_Merge(src proto.Message)

func (*MapStorageConfig) XXX_Size added in v1.2.1

func (m *MapStorageConfig) XXX_Size() int

func (*MapStorageConfig) XXX_Unmarshal added in v1.2.1

func (m *MapStorageConfig) XXX_Unmarshal(b []byte) error

type SignatureAlgorithm

type SignatureAlgorithm int32

Supported signature algorithms. The numbering space is the same as for TLS, given in RFC 5246 s7.4.1.4.1. See http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16. Mirrors trillian.SignatureAlgorithm.

const (
	// Anonymous signature scheme.
	SignatureAlgorithm_ANONYMOUS SignatureAlgorithm = 0
	// RSA signature scheme.
	SignatureAlgorithm_RSA SignatureAlgorithm = 1
	// ECDSA signature scheme.
	SignatureAlgorithm_ECDSA SignatureAlgorithm = 3
)

func (SignatureAlgorithm) EnumDescriptor

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

func (SignatureAlgorithm) String

func (x SignatureAlgorithm) String() string

type TreeHead

type TreeHead struct {
	// tree_id identifies the tree this TreeHead is built from.
	TreeId int64 `protobuf:"varint,1,opt,name=tree_id,json=treeId" json:"tree_id,omitempty"`
	// ts_nanos is the nanosecond resolution timestamp at which the
	// TreeHead was created.
	TsNanos int64 `protobuf:"varint,2,opt,name=ts_nanos,json=tsNanos" json:"ts_nanos,omitempty"`
	// tree_size is the number of entries in the tree.
	TreeSize int64 `protobuf:"varint,3,opt,name=tree_size,json=treeSize" json:"tree_size,omitempty"`
	// root_hash is the root of the tree.
	RootHash []byte `protobuf:"bytes,4,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"`
	// signature holds the raw digital signature across the serialized log_root
	// (not present) represented by the data in this TreeHead.
	Signature []byte `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty"`
	// tree_revision identifies the revision at which the TreeHead was created.
	TreeRevision         int64    `protobuf:"varint,6,opt,name=tree_revision,json=treeRevision" json:"tree_revision,omitempty"`
	Metadata             []byte   `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TreeHead is the storage format for Trillian's commitment to a particular tree state.

func (*TreeHead) Descriptor

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

func (*TreeHead) GetMetadata

func (m *TreeHead) GetMetadata() []byte

func (*TreeHead) GetRootHash

func (m *TreeHead) GetRootHash() []byte

func (*TreeHead) GetSignature

func (m *TreeHead) GetSignature() []byte

func (*TreeHead) GetTreeId

func (m *TreeHead) GetTreeId() int64

func (*TreeHead) GetTreeRevision

func (m *TreeHead) GetTreeRevision() int64

func (*TreeHead) GetTreeSize

func (m *TreeHead) GetTreeSize() int64

func (*TreeHead) GetTsNanos

func (m *TreeHead) GetTsNanos() int64

func (*TreeHead) ProtoMessage

func (*TreeHead) ProtoMessage()

func (*TreeHead) Reset

func (m *TreeHead) Reset()

func (*TreeHead) String

func (m *TreeHead) String() string

func (*TreeHead) XXX_DiscardUnknown added in v1.2.1

func (m *TreeHead) XXX_DiscardUnknown()

func (*TreeHead) XXX_Marshal added in v1.2.1

func (m *TreeHead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TreeHead) XXX_Merge added in v1.2.1

func (dst *TreeHead) XXX_Merge(src proto.Message)

func (*TreeHead) XXX_Size added in v1.2.1

func (m *TreeHead) XXX_Size() int

func (*TreeHead) XXX_Unmarshal added in v1.2.1

func (m *TreeHead) XXX_Unmarshal(b []byte) error

type TreeInfo

type TreeInfo struct {
	// tree_id is the ID of the tree, and is used as a primary key.
	TreeId int64 `protobuf:"varint,1,opt,name=tree_id,json=treeId" json:"tree_id,omitempty"`
	// key_id identifies the private key associated with this tree.
	KeyId int64 `protobuf:"varint,2,opt,name=key_id,json=keyId" json:"key_id,omitempty"`
	// name is a short name for this tree.
	Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
	// description is a short free form text describing the tree.
	Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
	// tree_type identifies whether this is a Log or a Map tree.
	TreeType TreeType `protobuf:"varint,5,opt,name=tree_type,json=treeType,enum=spannerpb.TreeType" json:"tree_type,omitempty"`
	// tree_state is the state of the tree.
	TreeState TreeState `protobuf:"varint,8,opt,name=tree_state,json=treeState,enum=spannerpb.TreeState" json:"tree_state,omitempty"`
	// hash_strategy is the hashing strategy used by the tree.
	HashStrategy HashStrategy `protobuf:"varint,9,opt,name=hash_strategy,json=hashStrategy,enum=spannerpb.HashStrategy" json:"hash_strategy,omitempty"`
	// hash_algorithm is the hash algorithm used by the tree.
	HashAlgorithm HashAlgorithm `protobuf:"varint,10,opt,name=hash_algorithm,json=hashAlgorithm,enum=spannerpb.HashAlgorithm" json:"hash_algorithm,omitempty"`
	// signature_algorithm is the signature algorithm used by the tree.
	SignatureAlgorithm SignatureAlgorithm `` /* 144-byte string literal not displayed */
	// create_time_nanos is the creation timestamp of the tree, in nanos since
	// epoch.
	CreateTimeNanos int64 `protobuf:"varint,13,opt,name=create_time_nanos,json=createTimeNanos" json:"create_time_nanos,omitempty"`
	// update_time_nanos is the last update time of the tree, in nanos since
	// epoch.
	UpdateTimeNanos int64 `protobuf:"varint,14,opt,name=update_time_nanos,json=updateTimeNanos" json:"update_time_nanos,omitempty"`
	// private_key should be used to generate signatures for this tree.
	PrivateKey *any.Any `protobuf:"bytes,15,opt,name=private_key,json=privateKey" json:"private_key,omitempty"`
	// public_key_der should be used to verify signatures produced by this tree.
	// It is the key in DER-encoded PKIX form.
	PublicKeyDer []byte `protobuf:"bytes,16,opt,name=public_key_der,json=publicKeyDer,proto3" json:"public_key_der,omitempty"`
	// config contains the log or map specific tree configuration.
	//
	// Types that are valid to be assigned to StorageConfig:
	//	*TreeInfo_LogStorageConfig
	//	*TreeInfo_MapStorageConfig
	StorageConfig isTreeInfo_StorageConfig `protobuf_oneof:"storage_config"`
	// max_root_duration_millis is the interval after which a new signed root is
	// produced even if there have been no submission.  If zero, this behavior is
	// disabled.
	MaxRootDurationMillis int64 `protobuf:"varint,17,opt,name=max_root_duration_millis,json=maxRootDurationMillis" json:"max_root_duration_millis,omitempty"`
	// If true the tree was soft deleted.
	Deleted bool `protobuf:"varint,18,opt,name=deleted" json:"deleted,omitempty"`
	// Time of tree deletion, if any.
	DeleteTimeNanos      int64    `protobuf:"varint,19,opt,name=delete_time_nanos,json=deleteTimeNanos" json:"delete_time_nanos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TreeInfo stores information about a Trillian tree.

func (*TreeInfo) Descriptor

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

func (*TreeInfo) GetCreateTimeNanos

func (m *TreeInfo) GetCreateTimeNanos() int64

func (*TreeInfo) GetDeleteTimeNanos

func (m *TreeInfo) GetDeleteTimeNanos() int64

func (*TreeInfo) GetDeleted

func (m *TreeInfo) GetDeleted() bool

func (*TreeInfo) GetDescription

func (m *TreeInfo) GetDescription() string

func (*TreeInfo) GetHashAlgorithm

func (m *TreeInfo) GetHashAlgorithm() HashAlgorithm

func (*TreeInfo) GetHashStrategy

func (m *TreeInfo) GetHashStrategy() HashStrategy

func (*TreeInfo) GetKeyId

func (m *TreeInfo) GetKeyId() int64

func (*TreeInfo) GetLogStorageConfig

func (m *TreeInfo) GetLogStorageConfig() *LogStorageConfig

func (*TreeInfo) GetMapStorageConfig

func (m *TreeInfo) GetMapStorageConfig() *MapStorageConfig

func (*TreeInfo) GetMaxRootDurationMillis

func (m *TreeInfo) GetMaxRootDurationMillis() int64

func (*TreeInfo) GetName

func (m *TreeInfo) GetName() string

func (*TreeInfo) GetPrivateKey

func (m *TreeInfo) GetPrivateKey() *any.Any

func (*TreeInfo) GetPublicKeyDer

func (m *TreeInfo) GetPublicKeyDer() []byte

func (*TreeInfo) GetSignatureAlgorithm

func (m *TreeInfo) GetSignatureAlgorithm() SignatureAlgorithm

func (*TreeInfo) GetStorageConfig

func (m *TreeInfo) GetStorageConfig() isTreeInfo_StorageConfig

func (*TreeInfo) GetTreeId

func (m *TreeInfo) GetTreeId() int64

func (*TreeInfo) GetTreeState

func (m *TreeInfo) GetTreeState() TreeState

func (*TreeInfo) GetTreeType

func (m *TreeInfo) GetTreeType() TreeType

func (*TreeInfo) GetUpdateTimeNanos

func (m *TreeInfo) GetUpdateTimeNanos() int64

func (*TreeInfo) ProtoMessage

func (*TreeInfo) ProtoMessage()

func (*TreeInfo) Reset

func (m *TreeInfo) Reset()

func (*TreeInfo) String

func (m *TreeInfo) String() string

func (*TreeInfo) XXX_DiscardUnknown added in v1.2.1

func (m *TreeInfo) XXX_DiscardUnknown()

func (*TreeInfo) XXX_Marshal added in v1.2.1

func (m *TreeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TreeInfo) XXX_Merge added in v1.2.1

func (dst *TreeInfo) XXX_Merge(src proto.Message)

func (*TreeInfo) XXX_OneofFuncs

func (*TreeInfo) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*TreeInfo) XXX_Size added in v1.2.1

func (m *TreeInfo) XXX_Size() int

func (*TreeInfo) XXX_Unmarshal added in v1.2.1

func (m *TreeInfo) XXX_Unmarshal(b []byte) error

type TreeInfo_LogStorageConfig

type TreeInfo_LogStorageConfig struct {
	LogStorageConfig *LogStorageConfig `protobuf:"bytes,6,opt,name=log_storage_config,json=logStorageConfig,oneof"`
}

type TreeInfo_MapStorageConfig

type TreeInfo_MapStorageConfig struct {
	MapStorageConfig *MapStorageConfig `protobuf:"bytes,7,opt,name=map_storage_config,json=mapStorageConfig,oneof"`
}

type TreeState

type TreeState int32

State of the Tree. Mirrors trillian.TreeState.

const (
	TreeState_UNKNOWN_TREE_STATE TreeState = 0
	TreeState_ACTIVE             TreeState = 1
	TreeState_FROZEN             TreeState = 2
)

func (TreeState) EnumDescriptor

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

func (TreeState) String

func (x TreeState) String() string

type TreeType

type TreeType int32

Type of the Tree. Mirrors trillian.TreeType.

const (
	TreeType_UNKNOWN TreeType = 0
	TreeType_LOG     TreeType = 1
	TreeType_MAP     TreeType = 2
)

func (TreeType) EnumDescriptor

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

func (TreeType) String

func (x TreeType) String() string

Jump to

Keyboard shortcuts

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