-
Notifications
You must be signed in to change notification settings - Fork 390
/
vouchers.pb.go
288 lines (252 loc) · 10.7 KB
/
vouchers.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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: vouchers.proto
package pb
import (
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
math "math"
time "time"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type VoucherResponse_Status int32
const (
VoucherResponse_INVALID VoucherResponse_Status = 0
VoucherResponse_ACCEPTED VoucherResponse_Status = 1
VoucherResponse_REJECTED VoucherResponse_Status = 2
)
var VoucherResponse_Status_name = map[int32]string{
0: "INVALID",
1: "ACCEPTED",
2: "REJECTED",
}
var VoucherResponse_Status_value = map[string]int32{
"INVALID": 0,
"ACCEPTED": 1,
"REJECTED": 2,
}
func (x VoucherResponse_Status) String() string {
return proto.EnumName(VoucherResponse_Status_name, int32(x))
}
func (VoucherResponse_Status) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_3659b9a115b8060d, []int{2, 0}
}
// Voucher is a signed message verifying that a node has been vetted by a particular satellite
type Voucher struct {
SatelliteId NodeID `protobuf:"bytes,1,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"`
StorageNodeId NodeID `protobuf:"bytes,2,opt,name=storage_node_id,json=storageNodeId,proto3,customtype=NodeID" json:"storage_node_id"`
Expiration time.Time `protobuf:"bytes,3,opt,name=expiration,proto3,stdtime" json:"expiration"`
SatelliteSignature []byte `protobuf:"bytes,4,opt,name=satellite_signature,json=satelliteSignature,proto3" json:"satellite_signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Voucher) Reset() { *m = Voucher{} }
func (m *Voucher) String() string { return proto.CompactTextString(m) }
func (*Voucher) ProtoMessage() {}
func (*Voucher) Descriptor() ([]byte, []int) {
return fileDescriptor_3659b9a115b8060d, []int{0}
}
func (m *Voucher) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Voucher.Unmarshal(m, b)
}
func (m *Voucher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Voucher.Marshal(b, m, deterministic)
}
func (m *Voucher) XXX_Merge(src proto.Message) {
xxx_messageInfo_Voucher.Merge(m, src)
}
func (m *Voucher) XXX_Size() int {
return xxx_messageInfo_Voucher.Size(m)
}
func (m *Voucher) XXX_DiscardUnknown() {
xxx_messageInfo_Voucher.DiscardUnknown(m)
}
var xxx_messageInfo_Voucher proto.InternalMessageInfo
func (m *Voucher) GetExpiration() time.Time {
if m != nil {
return m.Expiration
}
return time.Time{}
}
func (m *Voucher) GetSatelliteSignature() []byte {
if m != nil {
return m.SatelliteSignature
}
return nil
}
type VoucherRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoucherRequest) Reset() { *m = VoucherRequest{} }
func (m *VoucherRequest) String() string { return proto.CompactTextString(m) }
func (*VoucherRequest) ProtoMessage() {}
func (*VoucherRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_3659b9a115b8060d, []int{1}
}
func (m *VoucherRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoucherRequest.Unmarshal(m, b)
}
func (m *VoucherRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoucherRequest.Marshal(b, m, deterministic)
}
func (m *VoucherRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoucherRequest.Merge(m, src)
}
func (m *VoucherRequest) XXX_Size() int {
return xxx_messageInfo_VoucherRequest.Size(m)
}
func (m *VoucherRequest) XXX_DiscardUnknown() {
xxx_messageInfo_VoucherRequest.DiscardUnknown(m)
}
var xxx_messageInfo_VoucherRequest proto.InternalMessageInfo
type VoucherResponse struct {
Voucher *Voucher `protobuf:"bytes,1,opt,name=voucher,proto3" json:"voucher,omitempty"`
Status VoucherResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=vouchers.VoucherResponse_Status" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoucherResponse) Reset() { *m = VoucherResponse{} }
func (m *VoucherResponse) String() string { return proto.CompactTextString(m) }
func (*VoucherResponse) ProtoMessage() {}
func (*VoucherResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_3659b9a115b8060d, []int{2}
}
func (m *VoucherResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoucherResponse.Unmarshal(m, b)
}
func (m *VoucherResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoucherResponse.Marshal(b, m, deterministic)
}
func (m *VoucherResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoucherResponse.Merge(m, src)
}
func (m *VoucherResponse) XXX_Size() int {
return xxx_messageInfo_VoucherResponse.Size(m)
}
func (m *VoucherResponse) XXX_DiscardUnknown() {
xxx_messageInfo_VoucherResponse.DiscardUnknown(m)
}
var xxx_messageInfo_VoucherResponse proto.InternalMessageInfo
func (m *VoucherResponse) GetVoucher() *Voucher {
if m != nil {
return m.Voucher
}
return nil
}
func (m *VoucherResponse) GetStatus() VoucherResponse_Status {
if m != nil {
return m.Status
}
return VoucherResponse_INVALID
}
func init() {
proto.RegisterEnum("vouchers.VoucherResponse_Status", VoucherResponse_Status_name, VoucherResponse_Status_value)
proto.RegisterType((*Voucher)(nil), "vouchers.Voucher")
proto.RegisterType((*VoucherRequest)(nil), "vouchers.VoucherRequest")
proto.RegisterType((*VoucherResponse)(nil), "vouchers.VoucherResponse")
}
func init() { proto.RegisterFile("vouchers.proto", fileDescriptor_3659b9a115b8060d) }
var fileDescriptor_3659b9a115b8060d = []byte{
// 368 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xcf, 0x4e, 0xab, 0x40,
0x14, 0xc6, 0x4b, 0x6f, 0x03, 0xe4, 0xd0, 0x4b, 0x7b, 0xe7, 0x6e, 0x90, 0x0d, 0x0d, 0xab, 0x26,
0x26, 0x34, 0xc5, 0xc4, 0xb8, 0xb4, 0x2d, 0x2c, 0x30, 0x4d, 0x63, 0x68, 0xd3, 0x85, 0x9b, 0x86,
0xca, 0x88, 0x24, 0x2d, 0x83, 0xcc, 0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eb,
0xe3, 0x87, 0x1c, 0x53, 0x66, 0xbe, 0x08, 0xd0, 0x6b, 0x9e, 0x68, 0x4a, 0x12, 0x8a, 0xd1, 0x29,
0x48, 0x55, 0x99, 0xbc, 0x02, 0xc5, 0xfe, 0x67, 0x35, 0x65, 0xd7, 0x6c, 0x4d, 0xa0, 0x0b, 0x10,
0x29, 0x0b, 0x58, 0x4e, 0xf9, 0xe1, 0xaa, 0x3d, 0xf8, 0xc9, 0x56, 0x7b, 0xad, 0x25, 0xe7, 0xfc,
0x8a, 0x37, 0xc7, 0x20, 0x96, 0x2f, 0x48, 0x01, 0xc9, 0x5b, 0xac, 0x27, 0x73, 0xcf, 0xe9, 0xb7,
0x50, 0x17, 0xe4, 0xc9, 0x6c, 0xe6, 0x5e, 0xaf, 0x5c, 0xa7, 0x2f, 0x14, 0xca, 0x77, 0xaf, 0xdc,
0x59, 0xa1, 0xda, 0xf6, 0x1c, 0xe4, 0x6a, 0x29, 0x45, 0x97, 0x20, 0x55, 0x47, 0x20, 0xed, 0xc8,
0x9f, 0x7c, 0xa2, 0x9f, 0xfc, 0x9a, 0xc6, 0x6c, 0x4d, 0x3b, 0x37, 0xed, 0x74, 0xbb, 0x15, 0x79,
0xdd, 0x67, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x1f, 0x45, 0xc2, 0x51, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// VouchersClient is the client API for Vouchers service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type VouchersClient interface {
Request(ctx context.Context, in *VoucherRequest, opts ...grpc.CallOption) (*VoucherResponse, error)
}
type vouchersClient struct {
cc *grpc.ClientConn
}
func NewVouchersClient(cc *grpc.ClientConn) VouchersClient {
return &vouchersClient{cc}
}
func (c *vouchersClient) Request(ctx context.Context, in *VoucherRequest, opts ...grpc.CallOption) (*VoucherResponse, error) {
out := new(VoucherResponse)
err := c.cc.Invoke(ctx, "/vouchers.Vouchers/Request", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// VouchersServer is the server API for Vouchers service.
type VouchersServer interface {
Request(context.Context, *VoucherRequest) (*VoucherResponse, error)
}
func RegisterVouchersServer(s *grpc.Server, srv VouchersServer) {
s.RegisterService(&_Vouchers_serviceDesc, srv)
}
func _Vouchers_Request_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VoucherRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VouchersServer).Request(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/vouchers.Vouchers/Request",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VouchersServer).Request(ctx, req.(*VoucherRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Vouchers_serviceDesc = grpc.ServiceDesc{
ServiceName: "vouchers.Vouchers",
HandlerType: (*VouchersServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Request",
Handler: _Vouchers_Request_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "vouchers.proto",
}