Documentation ¶
Overview ¶
Package spannerpb contains the generated protobuf code for the Spanner storage implementation.
Index ¶
- Variables
- type HashAlgorithm
- func (HashAlgorithm) Descriptor() protoreflect.EnumDescriptor
- func (x HashAlgorithm) Enum() *HashAlgorithm
- func (HashAlgorithm) EnumDescriptor() ([]byte, []int)deprecated
- func (x HashAlgorithm) Number() protoreflect.EnumNumber
- func (x HashAlgorithm) String() string
- func (HashAlgorithm) Type() protoreflect.EnumType
- type HashStrategy
- func (HashStrategy) Descriptor() protoreflect.EnumDescriptor
- func (x HashStrategy) Enum() *HashStrategy
- func (HashStrategy) EnumDescriptor() ([]byte, []int)deprecated
- func (x HashStrategy) Number() protoreflect.EnumNumber
- func (x HashStrategy) String() string
- func (HashStrategy) Type() protoreflect.EnumType
- type LogStorageConfig
- func (*LogStorageConfig) Descriptor() ([]byte, []int)deprecated
- func (x *LogStorageConfig) GetNumMerkleBuckets() int64
- func (x *LogStorageConfig) GetNumUnseqBuckets() int64
- func (*LogStorageConfig) ProtoMessage()
- func (x *LogStorageConfig) ProtoReflect() protoreflect.Message
- func (x *LogStorageConfig) Reset()
- func (x *LogStorageConfig) String() string
- type MapStorageConfig
- type SignatureAlgorithm
- func (SignatureAlgorithm) Descriptor() protoreflect.EnumDescriptor
- func (x SignatureAlgorithm) Enum() *SignatureAlgorithm
- func (SignatureAlgorithm) EnumDescriptor() ([]byte, []int)deprecated
- func (x SignatureAlgorithm) Number() protoreflect.EnumNumber
- func (x SignatureAlgorithm) String() string
- func (SignatureAlgorithm) Type() protoreflect.EnumType
- type TreeHead
- func (*TreeHead) Descriptor() ([]byte, []int)deprecated
- func (x *TreeHead) GetMetadata() []byte
- func (x *TreeHead) GetRootHash() []byte
- func (x *TreeHead) GetSignature() []byte
- func (x *TreeHead) GetTreeId() int64
- func (x *TreeHead) GetTreeRevision() int64
- func (x *TreeHead) GetTreeSize() int64
- func (x *TreeHead) GetTsNanos() int64
- func (*TreeHead) ProtoMessage()
- func (x *TreeHead) ProtoReflect() protoreflect.Message
- func (x *TreeHead) Reset()
- func (x *TreeHead) String() string
- type TreeInfo
- func (*TreeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TreeInfo) GetCreateTimeNanos() int64
- func (x *TreeInfo) GetDeleteTimeNanos() int64
- func (x *TreeInfo) GetDeleted() bool
- func (x *TreeInfo) GetDescription() string
- func (x *TreeInfo) GetHashAlgorithm() HashAlgorithm
- func (x *TreeInfo) GetHashStrategy() HashStrategy
- func (x *TreeInfo) GetKeyId() int64
- func (x *TreeInfo) GetLogStorageConfig() *LogStorageConfig
- func (x *TreeInfo) GetMapStorageConfig() *MapStorageConfig
- func (x *TreeInfo) GetMaxRootDurationMillis() int64
- func (x *TreeInfo) GetName() string
- func (x *TreeInfo) GetPrivateKey() *anypb.Any
- func (x *TreeInfo) GetPublicKeyDer() []byte
- func (x *TreeInfo) GetSignatureAlgorithm() SignatureAlgorithm
- func (m *TreeInfo) GetStorageConfig() isTreeInfo_StorageConfig
- func (x *TreeInfo) GetTreeId() int64
- func (x *TreeInfo) GetTreeState() TreeState
- func (x *TreeInfo) GetTreeType() TreeType
- func (x *TreeInfo) GetUpdateTimeNanos() int64
- func (*TreeInfo) ProtoMessage()
- func (x *TreeInfo) ProtoReflect() protoreflect.Message
- func (x *TreeInfo) Reset()
- func (x *TreeInfo) String() string
- type TreeInfo_LogStorageConfig
- type TreeInfo_MapStorageConfig
- type TreeState
- type TreeType
Constants ¶
This section is empty.
Variables ¶
var ( TreeState_name = map[int32]string{ 0: "UNKNOWN_TREE_STATE", 1: "ACTIVE", 2: "FROZEN", } TreeState_value = map[string]int32{ "UNKNOWN_TREE_STATE": 0, "ACTIVE": 1, "FROZEN": 2, } )
Enum value maps for TreeState.
var ( TreeType_name = map[int32]string{ 0: "UNKNOWN", 1: "LOG", 3: "PREORDERED_LOG", } TreeType_value = map[string]int32{ "UNKNOWN": 0, "LOG": 1, "PREORDERED_LOG": 3, } )
Enum value maps for TreeType.
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", 5: "CONIKS_SHA256", } HashStrategy_value = map[string]int32{ "UNKNOWN_HASH_STRATEGY": 0, "RFC_6962": 1, "TEST_MAP_HASHER": 2, "OBJECT_RFC6962_SHA256": 3, "CONIKS_SHA512_256": 4, "CONIKS_SHA256": 5, } )
Enum value maps for HashStrategy.
var ( HashAlgorithm_name = map[int32]string{ 0: "NONE", 4: "SHA256", } HashAlgorithm_value = map[string]int32{ "NONE": 0, "SHA256": 4, } )
Enum value maps for HashAlgorithm.
var ( SignatureAlgorithm_name = map[int32]string{ 0: "ANONYMOUS", 1: "RSA", 3: "ECDSA", } SignatureAlgorithm_value = map[string]int32{ "ANONYMOUS": 0, "RSA": 1, "ECDSA": 3, } )
Enum value maps for SignatureAlgorithm.
var File_spanner_proto protoreflect.FileDescriptor
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) Descriptor ¶ added in v1.3.9
func (HashAlgorithm) Descriptor() protoreflect.EnumDescriptor
func (HashAlgorithm) Enum ¶ added in v1.3.9
func (x HashAlgorithm) Enum() *HashAlgorithm
func (HashAlgorithm) EnumDescriptor
deprecated
func (HashAlgorithm) EnumDescriptor() ([]byte, []int)
Deprecated: Use HashAlgorithm.Descriptor instead.
func (HashAlgorithm) Number ¶ added in v1.3.9
func (x HashAlgorithm) Number() protoreflect.EnumNumber
func (HashAlgorithm) String ¶
func (x HashAlgorithm) String() string
func (HashAlgorithm) Type ¶ added in v1.3.9
func (HashAlgorithm) Type() protoreflect.EnumType
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 HashStrategy_CONIKS_SHA256 HashStrategy = 5 )
func (HashStrategy) Descriptor ¶ added in v1.3.9
func (HashStrategy) Descriptor() protoreflect.EnumDescriptor
func (HashStrategy) Enum ¶ added in v1.3.9
func (x HashStrategy) Enum() *HashStrategy
func (HashStrategy) EnumDescriptor
deprecated
func (HashStrategy) EnumDescriptor() ([]byte, []int)
Deprecated: Use HashStrategy.Descriptor instead.
func (HashStrategy) Number ¶ added in v1.3.9
func (x HashStrategy) Number() protoreflect.EnumNumber
func (HashStrategy) String ¶
func (x HashStrategy) String() string
func (HashStrategy) Type ¶ added in v1.3.9
func (HashStrategy) Type() protoreflect.EnumType
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,proto3" 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,proto3" json:"num_merkle_buckets,omitempty"` // contains filtered or unexported fields }
LogStorageConfig holds settings which tune the storage implementation for a given log tree.
func (*LogStorageConfig) Descriptor
deprecated
func (*LogStorageConfig) Descriptor() ([]byte, []int)
Deprecated: Use LogStorageConfig.ProtoReflect.Descriptor instead.
func (*LogStorageConfig) GetNumMerkleBuckets ¶
func (x *LogStorageConfig) GetNumMerkleBuckets() int64
func (*LogStorageConfig) GetNumUnseqBuckets ¶
func (x *LogStorageConfig) GetNumUnseqBuckets() int64
func (*LogStorageConfig) ProtoMessage ¶
func (*LogStorageConfig) ProtoMessage()
func (*LogStorageConfig) ProtoReflect ¶ added in v1.3.9
func (x *LogStorageConfig) ProtoReflect() protoreflect.Message
func (*LogStorageConfig) Reset ¶
func (x *LogStorageConfig) Reset()
func (*LogStorageConfig) String ¶
func (x *LogStorageConfig) String() string
type MapStorageConfig ¶
type MapStorageConfig struct {
// contains filtered or unexported fields
}
MapStorageConfig holds settings which tune the storage implementation for a given map tree.
func (*MapStorageConfig) Descriptor
deprecated
func (*MapStorageConfig) Descriptor() ([]byte, []int)
Deprecated: Use MapStorageConfig.ProtoReflect.Descriptor instead.
func (*MapStorageConfig) ProtoMessage ¶
func (*MapStorageConfig) ProtoMessage()
func (*MapStorageConfig) ProtoReflect ¶ added in v1.3.9
func (x *MapStorageConfig) ProtoReflect() protoreflect.Message
func (*MapStorageConfig) Reset ¶
func (x *MapStorageConfig) Reset()
func (*MapStorageConfig) String ¶
func (x *MapStorageConfig) String() string
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) Descriptor ¶ added in v1.3.9
func (SignatureAlgorithm) Descriptor() protoreflect.EnumDescriptor
func (SignatureAlgorithm) Enum ¶ added in v1.3.9
func (x SignatureAlgorithm) Enum() *SignatureAlgorithm
func (SignatureAlgorithm) EnumDescriptor
deprecated
func (SignatureAlgorithm) EnumDescriptor() ([]byte, []int)
Deprecated: Use SignatureAlgorithm.Descriptor instead.
func (SignatureAlgorithm) Number ¶ added in v1.3.9
func (x SignatureAlgorithm) Number() protoreflect.EnumNumber
func (SignatureAlgorithm) String ¶
func (x SignatureAlgorithm) String() string
func (SignatureAlgorithm) Type ¶ added in v1.3.9
func (SignatureAlgorithm) Type() protoreflect.EnumType
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,proto3" 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,proto3" 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,proto3" 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,proto3" json:"tree_revision,omitempty"` Metadata []byte `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
TreeHead is the storage format for Trillian's commitment to a particular tree state.
func (*TreeHead) Descriptor
deprecated
func (*TreeHead) GetMetadata ¶
func (*TreeHead) GetRootHash ¶
func (*TreeHead) GetSignature ¶
func (*TreeHead) GetTreeRevision ¶
func (*TreeHead) GetTreeSize ¶
func (*TreeHead) GetTsNanos ¶
func (*TreeHead) ProtoMessage ¶
func (*TreeHead) ProtoMessage()
func (*TreeHead) ProtoReflect ¶ added in v1.3.9
func (x *TreeHead) ProtoReflect() protoreflect.Message
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,proto3" 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,proto3" json:"key_id,omitempty"` // name is a short name for this tree. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // description is a short free form text describing the tree. Description string `protobuf:"bytes,4,opt,name=description,proto3" 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,proto3,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,proto3,enum=spannerpb.TreeState" json:"tree_state,omitempty"` // hash_strategy is the hashing strategy used by the tree. HashStrategy HashStrategy `` /* 126-byte string literal not displayed */ // hash_algorithm is the hash algorithm used by the tree. HashAlgorithm HashAlgorithm `` /* 131-byte string literal not displayed */ // signature_algorithm is the signature algorithm used by the tree. SignatureAlgorithm SignatureAlgorithm `` /* 151-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,proto3" 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,proto3" json:"update_time_nanos,omitempty"` // private_key should be used to generate signatures for this tree. PrivateKey *anypb.Any `protobuf:"bytes,15,opt,name=private_key,json=privateKey,proto3" 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 assignable 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 `` /* 130-byte string literal not displayed */ // If true the tree was soft deleted. Deleted bool `protobuf:"varint,18,opt,name=deleted,proto3" json:"deleted,omitempty"` // Time of tree deletion, if any. DeleteTimeNanos int64 `protobuf:"varint,19,opt,name=delete_time_nanos,json=deleteTimeNanos,proto3" json:"delete_time_nanos,omitempty"` // contains filtered or unexported fields }
TreeInfo stores information about a Trillian tree.
func (*TreeInfo) Descriptor
deprecated
func (*TreeInfo) GetCreateTimeNanos ¶
func (*TreeInfo) GetDeleteTimeNanos ¶
func (*TreeInfo) GetDeleted ¶
func (*TreeInfo) GetDescription ¶
func (*TreeInfo) GetHashAlgorithm ¶
func (x *TreeInfo) GetHashAlgorithm() HashAlgorithm
func (*TreeInfo) GetHashStrategy ¶
func (x *TreeInfo) GetHashStrategy() HashStrategy
func (*TreeInfo) GetLogStorageConfig ¶
func (x *TreeInfo) GetLogStorageConfig() *LogStorageConfig
func (*TreeInfo) GetMapStorageConfig ¶
func (x *TreeInfo) GetMapStorageConfig() *MapStorageConfig
func (*TreeInfo) GetMaxRootDurationMillis ¶
func (*TreeInfo) GetPrivateKey ¶
func (*TreeInfo) GetPublicKeyDer ¶
func (*TreeInfo) GetSignatureAlgorithm ¶
func (x *TreeInfo) GetSignatureAlgorithm() SignatureAlgorithm
func (*TreeInfo) GetStorageConfig ¶
func (m *TreeInfo) GetStorageConfig() isTreeInfo_StorageConfig
func (*TreeInfo) GetTreeState ¶
func (*TreeInfo) GetTreeType ¶
func (*TreeInfo) GetUpdateTimeNanos ¶
func (*TreeInfo) ProtoMessage ¶
func (*TreeInfo) ProtoMessage()
func (*TreeInfo) ProtoReflect ¶ added in v1.3.9
func (x *TreeInfo) ProtoReflect() protoreflect.Message
type TreeInfo_LogStorageConfig ¶
type TreeInfo_LogStorageConfig struct {
LogStorageConfig *LogStorageConfig `protobuf:"bytes,6,opt,name=log_storage_config,json=logStorageConfig,proto3,oneof"`
}
type TreeInfo_MapStorageConfig ¶
type TreeInfo_MapStorageConfig struct {
MapStorageConfig *MapStorageConfig `protobuf:"bytes,7,opt,name=map_storage_config,json=mapStorageConfig,proto3,oneof"`
}
type TreeState ¶
type TreeState int32
State of the Tree. Mirrors trillian.TreeState.
func (TreeState) Descriptor ¶ added in v1.3.9
func (TreeState) Descriptor() protoreflect.EnumDescriptor
func (TreeState) EnumDescriptor
deprecated
func (TreeState) Number ¶ added in v1.3.9
func (x TreeState) Number() protoreflect.EnumNumber
func (TreeState) Type ¶ added in v1.3.9
func (TreeState) Type() protoreflect.EnumType
type TreeType ¶
type TreeType int32
Type of the Tree. Mirrors trillian.TreeType.
func (TreeType) Descriptor ¶ added in v1.3.9
func (TreeType) Descriptor() protoreflect.EnumDescriptor
func (TreeType) EnumDescriptor
deprecated
func (TreeType) Number ¶ added in v1.3.9
func (x TreeType) Number() protoreflect.EnumNumber
func (TreeType) Type ¶ added in v1.3.9
func (TreeType) Type() protoreflect.EnumType