-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathupdate_metadata.pb.go
1116 lines (1000 loc) · 44.8 KB
/
update_metadata.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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: update_metadata.proto
package main
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type InstallOperation_Type int32
const (
InstallOperation_REPLACE InstallOperation_Type = 0
InstallOperation_REPLACE_BZ InstallOperation_Type = 1
InstallOperation_MOVE InstallOperation_Type = 2 // Deprecated: Do not use.
InstallOperation_BSDIFF InstallOperation_Type = 3 // Deprecated: Do not use.
// On minor version 2 or newer, these operations are supported:
InstallOperation_SOURCE_COPY InstallOperation_Type = 4
InstallOperation_SOURCE_BSDIFF InstallOperation_Type = 5
// On minor version 3 or newer and on major version 2 or newer, these
// operations are supported:
InstallOperation_REPLACE_XZ InstallOperation_Type = 8
// On minor version 4 or newer, these operations are supported:
InstallOperation_ZERO InstallOperation_Type = 6
InstallOperation_DISCARD InstallOperation_Type = 7
InstallOperation_BROTLI_BSDIFF InstallOperation_Type = 10
// On minor version 5 or newer, these operations are supported:
InstallOperation_PUFFDIFF InstallOperation_Type = 9
)
var InstallOperation_Type_name = map[int32]string{
0: "REPLACE",
1: "REPLACE_BZ",
2: "MOVE",
3: "BSDIFF",
4: "SOURCE_COPY",
5: "SOURCE_BSDIFF",
8: "REPLACE_XZ",
6: "ZERO",
7: "DISCARD",
10: "BROTLI_BSDIFF",
9: "PUFFDIFF",
}
var InstallOperation_Type_value = map[string]int32{
"REPLACE": 0,
"REPLACE_BZ": 1,
"MOVE": 2,
"BSDIFF": 3,
"SOURCE_COPY": 4,
"SOURCE_BSDIFF": 5,
"REPLACE_XZ": 8,
"ZERO": 6,
"DISCARD": 7,
"BROTLI_BSDIFF": 10,
"PUFFDIFF": 9,
}
func (x InstallOperation_Type) Enum() *InstallOperation_Type {
p := new(InstallOperation_Type)
*p = x
return p
}
func (x InstallOperation_Type) String() string {
return proto.EnumName(InstallOperation_Type_name, int32(x))
}
func (x *InstallOperation_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(InstallOperation_Type_value, data, "InstallOperation_Type")
if err != nil {
return err
}
*x = InstallOperation_Type(value)
return nil
}
func (InstallOperation_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{4, 0}
}
// Data is packed into blocks on disk, always starting from the beginning
// of the block. If a file's data is too large for one block, it overflows
// into another block, which may or may not be the following block on the
// physical partition. An ordered list of extents is another
// representation of an ordered list of blocks. For example, a file stored
// in blocks 9, 10, 11, 2, 18, 12 (in that order) would be stored in
// extents { {9, 3}, {2, 1}, {18, 1}, {12, 1} } (in that order).
// In general, files are stored sequentially on disk, so it's more efficient
// to use extents to encode the block lists (this is effectively
// run-length encoding).
// A sentinel value (kuint64max) as the start block denotes a sparse-hole
// in a file whose block-length is specified by num_blocks.
type Extent struct {
StartBlock *uint64 `protobuf:"varint,1,opt,name=start_block,json=startBlock" json:"start_block,omitempty"`
NumBlocks *uint64 `protobuf:"varint,2,opt,name=num_blocks,json=numBlocks" json:"num_blocks,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Extent) Reset() { *m = Extent{} }
func (m *Extent) String() string { return proto.CompactTextString(m) }
func (*Extent) ProtoMessage() {}
func (*Extent) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{0}
}
func (m *Extent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Extent.Unmarshal(m, b)
}
func (m *Extent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Extent.Marshal(b, m, deterministic)
}
func (m *Extent) XXX_Merge(src proto.Message) {
xxx_messageInfo_Extent.Merge(m, src)
}
func (m *Extent) XXX_Size() int {
return xxx_messageInfo_Extent.Size(m)
}
func (m *Extent) XXX_DiscardUnknown() {
xxx_messageInfo_Extent.DiscardUnknown(m)
}
var xxx_messageInfo_Extent proto.InternalMessageInfo
func (m *Extent) GetStartBlock() uint64 {
if m != nil && m.StartBlock != nil {
return *m.StartBlock
}
return 0
}
func (m *Extent) GetNumBlocks() uint64 {
if m != nil && m.NumBlocks != nil {
return *m.NumBlocks
}
return 0
}
// Signatures: Updates may be signed by the OS vendor. The client verifies
// an update's signature by hashing the entire download. The section of the
// download that contains the signature is at the end of the file, so when
// signing a file, only the part up to the signature part is signed.
// Then, the client looks inside the download's Signatures message for a
// Signature message that it knows how to handle. Generally, a client will
// only know how to handle one type of signature, but an update may contain
// many signatures to support many different types of client. Then client
// selects a Signature message and uses that, along with a known public key,
// to verify the download. The public key is expected to be part of the
// client.
type Signatures struct {
Signatures []*Signatures_Signature `protobuf:"bytes,1,rep,name=signatures" json:"signatures,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Signatures) Reset() { *m = Signatures{} }
func (m *Signatures) String() string { return proto.CompactTextString(m) }
func (*Signatures) ProtoMessage() {}
func (*Signatures) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{1}
}
func (m *Signatures) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Signatures.Unmarshal(m, b)
}
func (m *Signatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Signatures.Marshal(b, m, deterministic)
}
func (m *Signatures) XXX_Merge(src proto.Message) {
xxx_messageInfo_Signatures.Merge(m, src)
}
func (m *Signatures) XXX_Size() int {
return xxx_messageInfo_Signatures.Size(m)
}
func (m *Signatures) XXX_DiscardUnknown() {
xxx_messageInfo_Signatures.DiscardUnknown(m)
}
var xxx_messageInfo_Signatures proto.InternalMessageInfo
func (m *Signatures) GetSignatures() []*Signatures_Signature {
if m != nil {
return m.Signatures
}
return nil
}
type Signatures_Signature struct {
Version *uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` // Deprecated: Do not use.
Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
// The DER encoded signature size of EC keys is nondeterministic for
// different input of sha256 hash. However, we need the size of the
// serialized signatures protobuf string to be fixed before signing;
// because this size is part of the content to be signed. Therefore, we
// always pad the signature data to the maximum possible signature size of
// a given key. And the payload verifier will truncate the signature to
// its correct size based on the value of |unpadded_signature_size|.
UnpaddedSignatureSize *uint32 `protobuf:"fixed32,3,opt,name=unpadded_signature_size,json=unpaddedSignatureSize" json:"unpadded_signature_size,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Signatures_Signature) Reset() { *m = Signatures_Signature{} }
func (m *Signatures_Signature) String() string { return proto.CompactTextString(m) }
func (*Signatures_Signature) ProtoMessage() {}
func (*Signatures_Signature) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{1, 0}
}
func (m *Signatures_Signature) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Signatures_Signature.Unmarshal(m, b)
}
func (m *Signatures_Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Signatures_Signature.Marshal(b, m, deterministic)
}
func (m *Signatures_Signature) XXX_Merge(src proto.Message) {
xxx_messageInfo_Signatures_Signature.Merge(m, src)
}
func (m *Signatures_Signature) XXX_Size() int {
return xxx_messageInfo_Signatures_Signature.Size(m)
}
func (m *Signatures_Signature) XXX_DiscardUnknown() {
xxx_messageInfo_Signatures_Signature.DiscardUnknown(m)
}
var xxx_messageInfo_Signatures_Signature proto.InternalMessageInfo
// Deprecated: Do not use.
func (m *Signatures_Signature) GetVersion() uint32 {
if m != nil && m.Version != nil {
return *m.Version
}
return 0
}
func (m *Signatures_Signature) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *Signatures_Signature) GetUnpaddedSignatureSize() uint32 {
if m != nil && m.UnpaddedSignatureSize != nil {
return *m.UnpaddedSignatureSize
}
return 0
}
type PartitionInfo struct {
Size *uint64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"`
Hash []byte `protobuf:"bytes,2,opt,name=hash" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PartitionInfo) Reset() { *m = PartitionInfo{} }
func (m *PartitionInfo) String() string { return proto.CompactTextString(m) }
func (*PartitionInfo) ProtoMessage() {}
func (*PartitionInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{2}
}
func (m *PartitionInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PartitionInfo.Unmarshal(m, b)
}
func (m *PartitionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PartitionInfo.Marshal(b, m, deterministic)
}
func (m *PartitionInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_PartitionInfo.Merge(m, src)
}
func (m *PartitionInfo) XXX_Size() int {
return xxx_messageInfo_PartitionInfo.Size(m)
}
func (m *PartitionInfo) XXX_DiscardUnknown() {
xxx_messageInfo_PartitionInfo.DiscardUnknown(m)
}
var xxx_messageInfo_PartitionInfo proto.InternalMessageInfo
func (m *PartitionInfo) GetSize() uint64 {
if m != nil && m.Size != nil {
return *m.Size
}
return 0
}
func (m *PartitionInfo) GetHash() []byte {
if m != nil {
return m.Hash
}
return nil
}
// Describe an image we are based on in a human friendly way.
// Examples:
// dev-channel, x86-alex, 1.2.3, mp-v3
// nplusone-channel, x86-alex, 1.2.4, mp-v3, dev-channel, 1.2.3
//
// All fields will be set, if this message is present.
type ImageInfo struct {
Board *string `protobuf:"bytes,1,opt,name=board" json:"board,omitempty"`
Key *string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
Channel *string `protobuf:"bytes,3,opt,name=channel" json:"channel,omitempty"`
Version *string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
// If these values aren't present, they should be assumed to match
// the equivalent value above. They are normally only different for
// special image types such as nplusone images.
BuildChannel *string `protobuf:"bytes,5,opt,name=build_channel,json=buildChannel" json:"build_channel,omitempty"`
BuildVersion *string `protobuf:"bytes,6,opt,name=build_version,json=buildVersion" json:"build_version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImageInfo) Reset() { *m = ImageInfo{} }
func (m *ImageInfo) String() string { return proto.CompactTextString(m) }
func (*ImageInfo) ProtoMessage() {}
func (*ImageInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{3}
}
func (m *ImageInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImageInfo.Unmarshal(m, b)
}
func (m *ImageInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImageInfo.Marshal(b, m, deterministic)
}
func (m *ImageInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImageInfo.Merge(m, src)
}
func (m *ImageInfo) XXX_Size() int {
return xxx_messageInfo_ImageInfo.Size(m)
}
func (m *ImageInfo) XXX_DiscardUnknown() {
xxx_messageInfo_ImageInfo.DiscardUnknown(m)
}
var xxx_messageInfo_ImageInfo proto.InternalMessageInfo
func (m *ImageInfo) GetBoard() string {
if m != nil && m.Board != nil {
return *m.Board
}
return ""
}
func (m *ImageInfo) GetKey() string {
if m != nil && m.Key != nil {
return *m.Key
}
return ""
}
func (m *ImageInfo) GetChannel() string {
if m != nil && m.Channel != nil {
return *m.Channel
}
return ""
}
func (m *ImageInfo) GetVersion() string {
if m != nil && m.Version != nil {
return *m.Version
}
return ""
}
func (m *ImageInfo) GetBuildChannel() string {
if m != nil && m.BuildChannel != nil {
return *m.BuildChannel
}
return ""
}
func (m *ImageInfo) GetBuildVersion() string {
if m != nil && m.BuildVersion != nil {
return *m.BuildVersion
}
return ""
}
type InstallOperation struct {
Type *InstallOperation_Type `protobuf:"varint,1,req,name=type,enum=chromeos_update_engine.InstallOperation_Type" json:"type,omitempty"`
// Only minor version 6 or newer support 64 bits |data_offset| and
// |data_length|, older client will read them as uint32.
// The offset into the delta file (after the protobuf)
// where the data (if any) is stored
DataOffset *uint64 `protobuf:"varint,2,opt,name=data_offset,json=dataOffset" json:"data_offset,omitempty"`
// The length of the data in the delta file
DataLength *uint64 `protobuf:"varint,3,opt,name=data_length,json=dataLength" json:"data_length,omitempty"`
// Ordered list of extents that are read from (if any) and written to.
SrcExtents []*Extent `protobuf:"bytes,4,rep,name=src_extents,json=srcExtents" json:"src_extents,omitempty"`
// Byte length of src, equal to the number of blocks in src_extents *
// block_size. It is used for BSDIFF and SOURCE_BSDIFF, because we need to
// pass that external program the number of bytes to read from the blocks we
// pass it. This is not used in any other operation.
SrcLength *uint64 `protobuf:"varint,5,opt,name=src_length,json=srcLength" json:"src_length,omitempty"`
DstExtents []*Extent `protobuf:"bytes,6,rep,name=dst_extents,json=dstExtents" json:"dst_extents,omitempty"`
// Byte length of dst, equal to the number of blocks in dst_extents *
// block_size. Used for BSDIFF and SOURCE_BSDIFF, but not in any other
// operation.
DstLength *uint64 `protobuf:"varint,7,opt,name=dst_length,json=dstLength" json:"dst_length,omitempty"`
// Optional SHA 256 hash of the blob associated with this operation.
// This is used as a primary validation for http-based downloads and
// as a defense-in-depth validation for https-based downloads. If
// the operation doesn't refer to any blob, this field will have
// zero bytes.
DataSha256Hash []byte `protobuf:"bytes,8,opt,name=data_sha256_hash,json=dataSha256Hash" json:"data_sha256_hash,omitempty"`
// Indicates the SHA 256 hash of the source data referenced in src_extents at
// the time of applying the operation. If present, the update_engine daemon
// MUST read and verify the source data before applying the operation.
SrcSha256Hash []byte `protobuf:"bytes,9,opt,name=src_sha256_hash,json=srcSha256Hash" json:"src_sha256_hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InstallOperation) Reset() { *m = InstallOperation{} }
func (m *InstallOperation) String() string { return proto.CompactTextString(m) }
func (*InstallOperation) ProtoMessage() {}
func (*InstallOperation) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{4}
}
func (m *InstallOperation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InstallOperation.Unmarshal(m, b)
}
func (m *InstallOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InstallOperation.Marshal(b, m, deterministic)
}
func (m *InstallOperation) XXX_Merge(src proto.Message) {
xxx_messageInfo_InstallOperation.Merge(m, src)
}
func (m *InstallOperation) XXX_Size() int {
return xxx_messageInfo_InstallOperation.Size(m)
}
func (m *InstallOperation) XXX_DiscardUnknown() {
xxx_messageInfo_InstallOperation.DiscardUnknown(m)
}
var xxx_messageInfo_InstallOperation proto.InternalMessageInfo
func (m *InstallOperation) GetType() InstallOperation_Type {
if m != nil && m.Type != nil {
return *m.Type
}
return InstallOperation_REPLACE
}
func (m *InstallOperation) GetDataOffset() uint64 {
if m != nil && m.DataOffset != nil {
return *m.DataOffset
}
return 0
}
func (m *InstallOperation) GetDataLength() uint64 {
if m != nil && m.DataLength != nil {
return *m.DataLength
}
return 0
}
func (m *InstallOperation) GetSrcExtents() []*Extent {
if m != nil {
return m.SrcExtents
}
return nil
}
func (m *InstallOperation) GetSrcLength() uint64 {
if m != nil && m.SrcLength != nil {
return *m.SrcLength
}
return 0
}
func (m *InstallOperation) GetDstExtents() []*Extent {
if m != nil {
return m.DstExtents
}
return nil
}
func (m *InstallOperation) GetDstLength() uint64 {
if m != nil && m.DstLength != nil {
return *m.DstLength
}
return 0
}
func (m *InstallOperation) GetDataSha256Hash() []byte {
if m != nil {
return m.DataSha256Hash
}
return nil
}
func (m *InstallOperation) GetSrcSha256Hash() []byte {
if m != nil {
return m.SrcSha256Hash
}
return nil
}
// Describes the update to apply to a single partition.
type PartitionUpdate struct {
// A platform-specific name to identify the partition set being updated. For
// example, in Chrome OS this could be "ROOT" or "KERNEL".
PartitionName *string `protobuf:"bytes,1,req,name=partition_name,json=partitionName" json:"partition_name,omitempty"`
// Whether this partition carries a filesystem with post-install program that
// must be run to finalize the update process. See also |postinstall_path| and
// |filesystem_type|.
RunPostinstall *bool `protobuf:"varint,2,opt,name=run_postinstall,json=runPostinstall" json:"run_postinstall,omitempty"`
// The path of the executable program to run during the post-install step,
// relative to the root of this filesystem. If not set, the default "postinst"
// will be used. This setting is only used when |run_postinstall| is set and
// true.
PostinstallPath *string `protobuf:"bytes,3,opt,name=postinstall_path,json=postinstallPath" json:"postinstall_path,omitempty"`
// The filesystem type as passed to the mount(2) syscall when mounting the new
// filesystem to run the post-install program. If not set, a fixed list of
// filesystems will be attempted. This setting is only used if
// |run_postinstall| is set and true.
FilesystemType *string `protobuf:"bytes,4,opt,name=filesystem_type,json=filesystemType" json:"filesystem_type,omitempty"`
// If present, a list of signatures of the new_partition_info.hash signed with
// different keys. If the update_engine daemon requires vendor-signed images
// and has its public key installed, one of the signatures should be valid
// for /postinstall to run.
NewPartitionSignature []*Signatures_Signature `protobuf:"bytes,5,rep,name=new_partition_signature,json=newPartitionSignature" json:"new_partition_signature,omitempty"`
OldPartitionInfo *PartitionInfo `protobuf:"bytes,6,opt,name=old_partition_info,json=oldPartitionInfo" json:"old_partition_info,omitempty"`
NewPartitionInfo *PartitionInfo `protobuf:"bytes,7,opt,name=new_partition_info,json=newPartitionInfo" json:"new_partition_info,omitempty"`
// The list of operations to be performed to apply this PartitionUpdate. The
// associated operation blobs (in operations[i].data_offset, data_length)
// should be stored contiguously and in the same order.
Operations []*InstallOperation `protobuf:"bytes,8,rep,name=operations" json:"operations,omitempty"`
// Whether a failure in the postinstall step for this partition should be
// ignored.
PostinstallOptional *bool `protobuf:"varint,9,opt,name=postinstall_optional,json=postinstallOptional" json:"postinstall_optional,omitempty"`
// On minor version 6 or newer, these fields are supported:
// The extent for data covered by verity hash tree.
HashTreeDataExtent *Extent `protobuf:"bytes,10,opt,name=hash_tree_data_extent,json=hashTreeDataExtent" json:"hash_tree_data_extent,omitempty"`
// The extent to store verity hash tree.
HashTreeExtent *Extent `protobuf:"bytes,11,opt,name=hash_tree_extent,json=hashTreeExtent" json:"hash_tree_extent,omitempty"`
// The hash algorithm used in verity hash tree.
HashTreeAlgorithm *string `protobuf:"bytes,12,opt,name=hash_tree_algorithm,json=hashTreeAlgorithm" json:"hash_tree_algorithm,omitempty"`
// The salt used for verity hash tree.
HashTreeSalt []byte `protobuf:"bytes,13,opt,name=hash_tree_salt,json=hashTreeSalt" json:"hash_tree_salt,omitempty"`
// The extent for data covered by FEC.
FecDataExtent *Extent `protobuf:"bytes,14,opt,name=fec_data_extent,json=fecDataExtent" json:"fec_data_extent,omitempty"`
// The extent to store FEC.
FecExtent *Extent `protobuf:"bytes,15,opt,name=fec_extent,json=fecExtent" json:"fec_extent,omitempty"`
// The number of FEC roots.
FecRoots *uint32 `protobuf:"varint,16,opt,name=fec_roots,json=fecRoots,def=2" json:"fec_roots,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PartitionUpdate) Reset() { *m = PartitionUpdate{} }
func (m *PartitionUpdate) String() string { return proto.CompactTextString(m) }
func (*PartitionUpdate) ProtoMessage() {}
func (*PartitionUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{5}
}
func (m *PartitionUpdate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PartitionUpdate.Unmarshal(m, b)
}
func (m *PartitionUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PartitionUpdate.Marshal(b, m, deterministic)
}
func (m *PartitionUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_PartitionUpdate.Merge(m, src)
}
func (m *PartitionUpdate) XXX_Size() int {
return xxx_messageInfo_PartitionUpdate.Size(m)
}
func (m *PartitionUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_PartitionUpdate.DiscardUnknown(m)
}
var xxx_messageInfo_PartitionUpdate proto.InternalMessageInfo
const Default_PartitionUpdate_FecRoots uint32 = 2
func (m *PartitionUpdate) GetPartitionName() string {
if m != nil && m.PartitionName != nil {
return *m.PartitionName
}
return ""
}
func (m *PartitionUpdate) GetRunPostinstall() bool {
if m != nil && m.RunPostinstall != nil {
return *m.RunPostinstall
}
return false
}
func (m *PartitionUpdate) GetPostinstallPath() string {
if m != nil && m.PostinstallPath != nil {
return *m.PostinstallPath
}
return ""
}
func (m *PartitionUpdate) GetFilesystemType() string {
if m != nil && m.FilesystemType != nil {
return *m.FilesystemType
}
return ""
}
func (m *PartitionUpdate) GetNewPartitionSignature() []*Signatures_Signature {
if m != nil {
return m.NewPartitionSignature
}
return nil
}
func (m *PartitionUpdate) GetOldPartitionInfo() *PartitionInfo {
if m != nil {
return m.OldPartitionInfo
}
return nil
}
func (m *PartitionUpdate) GetNewPartitionInfo() *PartitionInfo {
if m != nil {
return m.NewPartitionInfo
}
return nil
}
func (m *PartitionUpdate) GetOperations() []*InstallOperation {
if m != nil {
return m.Operations
}
return nil
}
func (m *PartitionUpdate) GetPostinstallOptional() bool {
if m != nil && m.PostinstallOptional != nil {
return *m.PostinstallOptional
}
return false
}
func (m *PartitionUpdate) GetHashTreeDataExtent() *Extent {
if m != nil {
return m.HashTreeDataExtent
}
return nil
}
func (m *PartitionUpdate) GetHashTreeExtent() *Extent {
if m != nil {
return m.HashTreeExtent
}
return nil
}
func (m *PartitionUpdate) GetHashTreeAlgorithm() string {
if m != nil && m.HashTreeAlgorithm != nil {
return *m.HashTreeAlgorithm
}
return ""
}
func (m *PartitionUpdate) GetHashTreeSalt() []byte {
if m != nil {
return m.HashTreeSalt
}
return nil
}
func (m *PartitionUpdate) GetFecDataExtent() *Extent {
if m != nil {
return m.FecDataExtent
}
return nil
}
func (m *PartitionUpdate) GetFecExtent() *Extent {
if m != nil {
return m.FecExtent
}
return nil
}
func (m *PartitionUpdate) GetFecRoots() uint32 {
if m != nil && m.FecRoots != nil {
return *m.FecRoots
}
return Default_PartitionUpdate_FecRoots
}
type DynamicPartitionGroup struct {
// Name of the group.
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
// Maximum size of the group. The sum of sizes of all partitions in the group
// must not exceed the maximum size of the group.
Size *uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
// A list of partitions that belong to the group.
PartitionNames []string `protobuf:"bytes,3,rep,name=partition_names,json=partitionNames" json:"partition_names,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DynamicPartitionGroup) Reset() { *m = DynamicPartitionGroup{} }
func (m *DynamicPartitionGroup) String() string { return proto.CompactTextString(m) }
func (*DynamicPartitionGroup) ProtoMessage() {}
func (*DynamicPartitionGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{6}
}
func (m *DynamicPartitionGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DynamicPartitionGroup.Unmarshal(m, b)
}
func (m *DynamicPartitionGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DynamicPartitionGroup.Marshal(b, m, deterministic)
}
func (m *DynamicPartitionGroup) XXX_Merge(src proto.Message) {
xxx_messageInfo_DynamicPartitionGroup.Merge(m, src)
}
func (m *DynamicPartitionGroup) XXX_Size() int {
return xxx_messageInfo_DynamicPartitionGroup.Size(m)
}
func (m *DynamicPartitionGroup) XXX_DiscardUnknown() {
xxx_messageInfo_DynamicPartitionGroup.DiscardUnknown(m)
}
var xxx_messageInfo_DynamicPartitionGroup proto.InternalMessageInfo
func (m *DynamicPartitionGroup) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *DynamicPartitionGroup) GetSize() uint64 {
if m != nil && m.Size != nil {
return *m.Size
}
return 0
}
func (m *DynamicPartitionGroup) GetPartitionNames() []string {
if m != nil {
return m.PartitionNames
}
return nil
}
// Metadata related to all dynamic partitions.
type DynamicPartitionMetadata struct {
// All updatable groups present in |partitions| of this DeltaArchiveManifest.
// - If an updatable group is on the device but not in the manifest, it is
// not updated. Hence, the group will not be resized, and partitions cannot
// be added to or removed from the group.
// - If an updatable group is in the manifest but not on the device, the group
// is added to the device.
Groups []*DynamicPartitionGroup `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"`
// Whether dynamic partitions have snapshots during the update. If this is
// set to true, the update_engine daemon creates snapshots for all dynamic
// partitions if possible. If this is unset, the update_engine daemon MUST
// NOT create snapshots for dynamic partitions.
SnapshotEnabled *bool `protobuf:"varint,2,opt,name=snapshot_enabled,json=snapshotEnabled" json:"snapshot_enabled,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DynamicPartitionMetadata) Reset() { *m = DynamicPartitionMetadata{} }
func (m *DynamicPartitionMetadata) String() string { return proto.CompactTextString(m) }
func (*DynamicPartitionMetadata) ProtoMessage() {}
func (*DynamicPartitionMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{7}
}
func (m *DynamicPartitionMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DynamicPartitionMetadata.Unmarshal(m, b)
}
func (m *DynamicPartitionMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DynamicPartitionMetadata.Marshal(b, m, deterministic)
}
func (m *DynamicPartitionMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_DynamicPartitionMetadata.Merge(m, src)
}
func (m *DynamicPartitionMetadata) XXX_Size() int {
return xxx_messageInfo_DynamicPartitionMetadata.Size(m)
}
func (m *DynamicPartitionMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_DynamicPartitionMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_DynamicPartitionMetadata proto.InternalMessageInfo
func (m *DynamicPartitionMetadata) GetGroups() []*DynamicPartitionGroup {
if m != nil {
return m.Groups
}
return nil
}
func (m *DynamicPartitionMetadata) GetSnapshotEnabled() bool {
if m != nil && m.SnapshotEnabled != nil {
return *m.SnapshotEnabled
}
return false
}
type DeltaArchiveManifest struct {
// Only present in major version = 1. List of install operations for the
// kernel and rootfs partitions. For major version = 2 see the |partitions|
// field.
InstallOperations []*InstallOperation `protobuf:"bytes,1,rep,name=install_operations,json=installOperations" json:"install_operations,omitempty"`
KernelInstallOperations []*InstallOperation `protobuf:"bytes,2,rep,name=kernel_install_operations,json=kernelInstallOperations" json:"kernel_install_operations,omitempty"`
// (At time of writing) usually 4096
BlockSize *uint32 `protobuf:"varint,3,opt,name=block_size,json=blockSize,def=4096" json:"block_size,omitempty"`
// If signatures are present, the offset into the blobs, generally
// tacked onto the end of the file, and the length. We use an offset
// rather than a bool to allow for more flexibility in future file formats.
// If either is absent, it means signatures aren't supported in this
// file.
SignaturesOffset *uint64 `protobuf:"varint,4,opt,name=signatures_offset,json=signaturesOffset" json:"signatures_offset,omitempty"`
SignaturesSize *uint64 `protobuf:"varint,5,opt,name=signatures_size,json=signaturesSize" json:"signatures_size,omitempty"`
// Only present in major version = 1. Partition metadata used to validate the
// update. For major version = 2 see the |partitions| field.
OldKernelInfo *PartitionInfo `protobuf:"bytes,6,opt,name=old_kernel_info,json=oldKernelInfo" json:"old_kernel_info,omitempty"`
NewKernelInfo *PartitionInfo `protobuf:"bytes,7,opt,name=new_kernel_info,json=newKernelInfo" json:"new_kernel_info,omitempty"`
OldRootfsInfo *PartitionInfo `protobuf:"bytes,8,opt,name=old_rootfs_info,json=oldRootfsInfo" json:"old_rootfs_info,omitempty"`
NewRootfsInfo *PartitionInfo `protobuf:"bytes,9,opt,name=new_rootfs_info,json=newRootfsInfo" json:"new_rootfs_info,omitempty"`
// old_image_info will only be present for delta images.
OldImageInfo *ImageInfo `protobuf:"bytes,10,opt,name=old_image_info,json=oldImageInfo" json:"old_image_info,omitempty"`
NewImageInfo *ImageInfo `protobuf:"bytes,11,opt,name=new_image_info,json=newImageInfo" json:"new_image_info,omitempty"`
// The minor version, also referred as "delta version", of the payload.
// Minor version 0 is full payload, everything else is delta payload.
MinorVersion *uint32 `protobuf:"varint,12,opt,name=minor_version,json=minorVersion,def=0" json:"minor_version,omitempty"`
// Only present in major version >= 2. List of partitions that will be
// updated, in the order they will be updated. This field replaces the
// |install_operations|, |kernel_install_operations| and the
// |{old,new}_{kernel,rootfs}_info| fields used in major version = 1. This
// array can have more than two partitions if needed, and they are identified
// by the partition name.
Partitions []*PartitionUpdate `protobuf:"bytes,13,rep,name=partitions" json:"partitions,omitempty"`
// The maximum timestamp of the OS allowed to apply this payload.
// Can be used to prevent downgrading the OS.
MaxTimestamp *int64 `protobuf:"varint,14,opt,name=max_timestamp,json=maxTimestamp" json:"max_timestamp,omitempty"`
// Metadata related to all dynamic partitions.
DynamicPartitionMetadata *DynamicPartitionMetadata `protobuf:"bytes,15,opt,name=dynamic_partition_metadata,json=dynamicPartitionMetadata" json:"dynamic_partition_metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeltaArchiveManifest) Reset() { *m = DeltaArchiveManifest{} }
func (m *DeltaArchiveManifest) String() string { return proto.CompactTextString(m) }
func (*DeltaArchiveManifest) ProtoMessage() {}
func (*DeltaArchiveManifest) Descriptor() ([]byte, []int) {
return fileDescriptor_fa6d72a1ce634b79, []int{8}
}
func (m *DeltaArchiveManifest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeltaArchiveManifest.Unmarshal(m, b)
}
func (m *DeltaArchiveManifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeltaArchiveManifest.Marshal(b, m, deterministic)
}
func (m *DeltaArchiveManifest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeltaArchiveManifest.Merge(m, src)
}
func (m *DeltaArchiveManifest) XXX_Size() int {
return xxx_messageInfo_DeltaArchiveManifest.Size(m)
}
func (m *DeltaArchiveManifest) XXX_DiscardUnknown() {
xxx_messageInfo_DeltaArchiveManifest.DiscardUnknown(m)
}
var xxx_messageInfo_DeltaArchiveManifest proto.InternalMessageInfo
const Default_DeltaArchiveManifest_BlockSize uint32 = 4096
const Default_DeltaArchiveManifest_MinorVersion uint32 = 0
func (m *DeltaArchiveManifest) GetInstallOperations() []*InstallOperation {
if m != nil {
return m.InstallOperations
}
return nil
}
func (m *DeltaArchiveManifest) GetKernelInstallOperations() []*InstallOperation {
if m != nil {
return m.KernelInstallOperations
}
return nil
}
func (m *DeltaArchiveManifest) GetBlockSize() uint32 {
if m != nil && m.BlockSize != nil {
return *m.BlockSize
}
return Default_DeltaArchiveManifest_BlockSize
}
func (m *DeltaArchiveManifest) GetSignaturesOffset() uint64 {
if m != nil && m.SignaturesOffset != nil {
return *m.SignaturesOffset
}
return 0
}
func (m *DeltaArchiveManifest) GetSignaturesSize() uint64 {
if m != nil && m.SignaturesSize != nil {
return *m.SignaturesSize
}
return 0
}
func (m *DeltaArchiveManifest) GetOldKernelInfo() *PartitionInfo {
if m != nil {
return m.OldKernelInfo
}
return nil
}
func (m *DeltaArchiveManifest) GetNewKernelInfo() *PartitionInfo {
if m != nil {
return m.NewKernelInfo
}
return nil
}
func (m *DeltaArchiveManifest) GetOldRootfsInfo() *PartitionInfo {
if m != nil {
return m.OldRootfsInfo
}
return nil
}
func (m *DeltaArchiveManifest) GetNewRootfsInfo() *PartitionInfo {
if m != nil {
return m.NewRootfsInfo
}
return nil
}
func (m *DeltaArchiveManifest) GetOldImageInfo() *ImageInfo {
if m != nil {
return m.OldImageInfo
}
return nil
}
func (m *DeltaArchiveManifest) GetNewImageInfo() *ImageInfo {
if m != nil {
return m.NewImageInfo
}
return nil
}
func (m *DeltaArchiveManifest) GetMinorVersion() uint32 {
if m != nil && m.MinorVersion != nil {
return *m.MinorVersion
}
return Default_DeltaArchiveManifest_MinorVersion
}
func (m *DeltaArchiveManifest) GetPartitions() []*PartitionUpdate {
if m != nil {
return m.Partitions
}
return nil
}
func (m *DeltaArchiveManifest) GetMaxTimestamp() int64 {
if m != nil && m.MaxTimestamp != nil {
return *m.MaxTimestamp