forked from CovenantSQL/CovenantSQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_service_type_gen.go
More file actions
110 lines (98 loc) · 2.93 KB
/
Copy pathupdate_service_type_gen.go
File metadata and controls
110 lines (98 loc) · 2.93 KB
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
package types
// Code generated by github.com/CovenantSQL/HashStablePack DO NOT EDIT.
import (
hsp "github.com/CovenantSQL/HashStablePack/marshalhash"
)
// MarshalHash marshals for hash
func (z *SignedUpdateServiceHeader) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
// map header, size 2
o = append(o, 0x82)
if oTemp, err := z.DefaultHashSignVerifierImpl.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
// map header, size 2
o = append(o, 0x82)
o = hsp.AppendInt32(o, int32(z.UpdateServiceHeader.Op))
if oTemp, err := z.UpdateServiceHeader.Instance.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *SignedUpdateServiceHeader) Msgsize() (s int) {
s = 1 + 28 + z.DefaultHashSignVerifierImpl.Msgsize() + 20 + 1 + 3 + hsp.Int32Size + 9 + z.UpdateServiceHeader.Instance.Msgsize()
return
}
// MarshalHash marshals for hash
func (z *UpdateService) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
// map header, size 2
o = append(o, 0x82)
if oTemp, err := z.Envelope.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
if oTemp, err := z.Header.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *UpdateService) Msgsize() (s int) {
s = 1 + 9 + z.Envelope.Msgsize() + 7 + z.Header.Msgsize()
return
}
// MarshalHash marshals for hash
func (z *UpdateServiceHeader) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
// map header, size 2
o = append(o, 0x82)
if oTemp, err := z.Instance.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
o = hsp.AppendInt32(o, int32(z.Op))
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *UpdateServiceHeader) Msgsize() (s int) {
s = 1 + 9 + z.Instance.Msgsize() + 3 + hsp.Int32Size
return
}
// MarshalHash marshals for hash
func (z UpdateServiceResponse) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
// map header, size 0
o = append(o, 0x80)
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z UpdateServiceResponse) Msgsize() (s int) {
s = 1
return
}
// MarshalHash marshals for hash
func (z UpdateType) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
o = hsp.AppendInt32(o, int32(z))
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z UpdateType) Msgsize() (s int) {
s = hsp.Int32Size
return
}