-
Notifications
You must be signed in to change notification settings - Fork 385
/
Copy pathtrillian.pb.go
356 lines (307 loc) · 13.6 KB
/
trillian.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
// Code generated by protoc-gen-go.
// source: trillian.proto
// DO NOT EDIT!
package trillian
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This defines the way empty / node / leaf hashes are constructed incorporating
// preimage protection, which can be application specific.
type TreeHasherPreimageType int32
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
)
var TreeHasherPreimageType_name = map[int32]string{
0: "RFC_6962_PREIMAGE",
}
var TreeHasherPreimageType_value = map[string]int32{
"RFC_6962_PREIMAGE": 0,
}
func (x TreeHasherPreimageType) String() string {
return proto.EnumName(TreeHasherPreimageType_name, int32(x))
}
func (TreeHasherPreimageType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
// Supported signature algorithms. The numbering space is the same as for TLS,
// given in RFC 5246 s7.4.1.4.1 and at:
// http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
type SignatureAlgorithm int32
const (
SignatureAlgorithm_ANONYMOUS SignatureAlgorithm = 0
SignatureAlgorithm_RSA SignatureAlgorithm = 1
SignatureAlgorithm_ECDSA SignatureAlgorithm = 3
)
var SignatureAlgorithm_name = map[int32]string{
0: "ANONYMOUS",
1: "RSA",
3: "ECDSA",
}
var SignatureAlgorithm_value = map[string]int32{
"ANONYMOUS": 0,
"RSA": 1,
"ECDSA": 3,
}
func (x SignatureAlgorithm) String() string {
return proto.EnumName(SignatureAlgorithm_name, int32(x))
}
func (SignatureAlgorithm) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
// Supported hash algorithms. The numbering space is the same as for TLS,
// given in RFC 5246 s7.4.1.4.1 and at:
// http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
type HashAlgorithm int32
const (
HashAlgorithm_NONE HashAlgorithm = 0
HashAlgorithm_SHA256 HashAlgorithm = 4
)
var HashAlgorithm_name = map[int32]string{
0: "NONE",
4: "SHA256",
}
var HashAlgorithm_value = map[string]int32{
"NONE": 0,
"SHA256": 4,
}
func (x HashAlgorithm) String() string {
return proto.EnumName(HashAlgorithm_name, int32(x))
}
func (HashAlgorithm) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
// Protocol buffer encoding of the TLS DigitallySigned type, from
// RFC 5246 s4.7.
type DigitallySigned struct {
SignatureAlgorithm SignatureAlgorithm `protobuf:"varint,1,opt,name=signature_algorithm,json=signatureAlgorithm,enum=trillian.SignatureAlgorithm" json:"signature_algorithm,omitempty"`
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 (m *DigitallySigned) Reset() { *m = DigitallySigned{} }
func (m *DigitallySigned) String() string { return proto.CompactTextString(m) }
func (*DigitallySigned) ProtoMessage() {}
func (*DigitallySigned) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *DigitallySigned) GetSignatureAlgorithm() SignatureAlgorithm {
if m != nil {
return m.SignatureAlgorithm
}
return SignatureAlgorithm_ANONYMOUS
}
func (m *DigitallySigned) GetHashAlgorithm() HashAlgorithm {
if m != nil {
return m.HashAlgorithm
}
return HashAlgorithm_NONE
}
func (m *DigitallySigned) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type SignedEntryTimestamp struct {
TimestampNanos int64 `protobuf:"varint,1,opt,name=timestamp_nanos,json=timestampNanos" json:"timestamp_nanos,omitempty"`
LogId int64 `protobuf:"varint,2,opt,name=log_id,json=logId" json:"log_id,omitempty"`
Signature *DigitallySigned `protobuf:"bytes,3,opt,name=signature" json:"signature,omitempty"`
}
func (m *SignedEntryTimestamp) Reset() { *m = SignedEntryTimestamp{} }
func (m *SignedEntryTimestamp) String() string { return proto.CompactTextString(m) }
func (*SignedEntryTimestamp) ProtoMessage() {}
func (*SignedEntryTimestamp) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (m *SignedEntryTimestamp) GetTimestampNanos() int64 {
if m != nil {
return m.TimestampNanos
}
return 0
}
func (m *SignedEntryTimestamp) GetLogId() int64 {
if m != nil {
return m.LogId
}
return 0
}
func (m *SignedEntryTimestamp) GetSignature() *DigitallySigned {
if m != nil {
return m.Signature
}
return nil
}
// SignedLogRoot represents a commitment by a Log to a particular tree.
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 serialized format for the signature scheme.
Signature *DigitallySigned `protobuf:"bytes,4,opt,name=signature" json:"signature,omitempty"`
LogId int64 `protobuf:"varint,5,opt,name=log_id,json=logId" json:"log_id,omitempty"`
TreeRevision int64 `protobuf:"varint,6,opt,name=tree_revision,json=treeRevision" json:"tree_revision,omitempty"`
}
func (m *SignedLogRoot) Reset() { *m = SignedLogRoot{} }
func (m *SignedLogRoot) String() string { return proto.CompactTextString(m) }
func (*SignedLogRoot) ProtoMessage() {}
func (*SignedLogRoot) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
func (m *SignedLogRoot) GetTimestampNanos() int64 {
if m != nil {
return m.TimestampNanos
}
return 0
}
func (m *SignedLogRoot) GetRootHash() []byte {
if m != nil {
return m.RootHash
}
return nil
}
func (m *SignedLogRoot) GetTreeSize() int64 {
if m != nil {
return m.TreeSize
}
return 0
}
func (m *SignedLogRoot) GetSignature() *DigitallySigned {
if m != nil {
return m.Signature
}
return nil
}
func (m *SignedLogRoot) GetLogId() int64 {
if m != nil {
return m.LogId
}
return 0
}
func (m *SignedLogRoot) GetTreeRevision() int64 {
if m != nil {
return m.TreeRevision
}
return 0
}
type MapperMetadata struct {
SourceLogId []byte `protobuf:"bytes,1,opt,name=source_log_id,json=sourceLogId,proto3" json:"source_log_id,omitempty"`
HighestFullyCompletedSeq int64 `protobuf:"varint,2,opt,name=highest_fully_completed_seq,json=highestFullyCompletedSeq" json:"highest_fully_completed_seq,omitempty"`
HighestPartiallyCompletedSeq int64 `protobuf:"varint,3,opt,name=highest_partially_completed_seq,json=highestPartiallyCompletedSeq" json:"highest_partially_completed_seq,omitempty"`
}
func (m *MapperMetadata) Reset() { *m = MapperMetadata{} }
func (m *MapperMetadata) String() string { return proto.CompactTextString(m) }
func (*MapperMetadata) ProtoMessage() {}
func (*MapperMetadata) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
func (m *MapperMetadata) GetSourceLogId() []byte {
if m != nil {
return m.SourceLogId
}
return nil
}
func (m *MapperMetadata) GetHighestFullyCompletedSeq() int64 {
if m != nil {
return m.HighestFullyCompletedSeq
}
return 0
}
func (m *MapperMetadata) GetHighestPartiallyCompletedSeq() int64 {
if m != nil {
return m.HighestPartiallyCompletedSeq
}
return 0
}
// SignedMapRoot represents a commitment by a Map to a particular tree.
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 serialized format for the signature scheme.
Signature *DigitallySigned `protobuf:"bytes,4,opt,name=signature" json:"signature,omitempty"`
MapId int64 `protobuf:"varint,5,opt,name=map_id,json=mapId" json:"map_id,omitempty"`
MapRevision int64 `protobuf:"varint,6,opt,name=map_revision,json=mapRevision" json:"map_revision,omitempty"`
}
func (m *SignedMapRoot) Reset() { *m = SignedMapRoot{} }
func (m *SignedMapRoot) String() string { return proto.CompactTextString(m) }
func (*SignedMapRoot) ProtoMessage() {}
func (*SignedMapRoot) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
func (m *SignedMapRoot) GetTimestampNanos() int64 {
if m != nil {
return m.TimestampNanos
}
return 0
}
func (m *SignedMapRoot) GetRootHash() []byte {
if m != nil {
return m.RootHash
}
return nil
}
func (m *SignedMapRoot) GetMetadata() *MapperMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *SignedMapRoot) GetSignature() *DigitallySigned {
if m != nil {
return m.Signature
}
return nil
}
func (m *SignedMapRoot) GetMapId() int64 {
if m != nil {
return m.MapId
}
return 0
}
func (m *SignedMapRoot) GetMapRevision() int64 {
if m != nil {
return m.MapRevision
}
return 0
}
func init() {
proto.RegisterType((*DigitallySigned)(nil), "trillian.DigitallySigned")
proto.RegisterType((*SignedEntryTimestamp)(nil), "trillian.SignedEntryTimestamp")
proto.RegisterType((*SignedLogRoot)(nil), "trillian.SignedLogRoot")
proto.RegisterType((*MapperMetadata)(nil), "trillian.MapperMetadata")
proto.RegisterType((*SignedMapRoot)(nil), "trillian.SignedMapRoot")
proto.RegisterEnum("trillian.TreeHasherPreimageType", TreeHasherPreimageType_name, TreeHasherPreimageType_value)
proto.RegisterEnum("trillian.SignatureAlgorithm", SignatureAlgorithm_name, SignatureAlgorithm_value)
proto.RegisterEnum("trillian.HashAlgorithm", HashAlgorithm_name, HashAlgorithm_value)
}
func init() { proto.RegisterFile("trillian.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 564 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0xdf, 0x8e, 0xd2, 0x4e,
0x18, 0xdd, 0xfe, 0x0a, 0xfc, 0xe0, 0x83, 0xb2, 0x75, 0xfc, 0x87, 0x59, 0x12, 0x57, 0x8c, 0x71,
0xc3, 0xc5, 0x9a, 0xa0, 0xb2, 0xf1, 0x42, 0x93, 0x86, 0xed, 0xba, 0x24, 0x5b, 0x20, 0x53, 0xbc,
0xf0, 0xaa, 0x19, 0xb7, 0x63, 0x3b, 0x49, 0xdb, 0xe9, 0x4e, 0x07, 0x13, 0xf6, 0x25, 0x7c, 0x1f,
0x2f, 0x7c, 0x1d, 0xdf, 0xc2, 0x98, 0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