/
beacon.pb.go
188 lines (158 loc) 路 6.21 KB
/
beacon.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: drand/beacon.proto
/*
Package drand is a generated protocol buffer package.
It is generated from these files:
drand/beacon.proto
drand/client.proto
It has these top-level messages:
BeaconRequest
BeaconResponse
PublicRandRequest
PublicRandResponse
PrivateRandRequest
PrivateRandResponse
ECIESObject
*/
package drand
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
// BeaconRequest holds a link to a previous signature, a timestamp and the
// partial signature for this beacon. All participants send and collects many of
// theses partial beacon packets to recreate locally one beacon
type BeaconRequest struct {
Round uint64 `protobuf:"varint,1,opt,name=round" json:"round,omitempty"`
PreviousRand []byte `protobuf:"bytes,2,opt,name=previous_rand,json=previousRand,proto3" json:"previous_rand,omitempty"`
PartialRand []byte `protobuf:"bytes,3,opt,name=partial_rand,json=partialRand,proto3" json:"partial_rand,omitempty"`
}
func (m *BeaconRequest) Reset() { *m = BeaconRequest{} }
func (m *BeaconRequest) String() string { return proto.CompactTextString(m) }
func (*BeaconRequest) ProtoMessage() {}
func (*BeaconRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *BeaconRequest) GetRound() uint64 {
if m != nil {
return m.Round
}
return 0
}
func (m *BeaconRequest) GetPreviousRand() []byte {
if m != nil {
return m.PreviousRand
}
return nil
}
func (m *BeaconRequest) GetPartialRand() []byte {
if m != nil {
return m.PartialRand
}
return nil
}
type BeaconResponse struct {
PartialRand []byte `protobuf:"bytes,1,opt,name=partial_rand,json=partialRand,proto3" json:"partial_rand,omitempty"`
}
func (m *BeaconResponse) Reset() { *m = BeaconResponse{} }
func (m *BeaconResponse) String() string { return proto.CompactTextString(m) }
func (*BeaconResponse) ProtoMessage() {}
func (*BeaconResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *BeaconResponse) GetPartialRand() []byte {
if m != nil {
return m.PartialRand
}
return nil
}
func init() {
proto.RegisterType((*BeaconRequest)(nil), "drand.BeaconRequest")
proto.RegisterType((*BeaconResponse)(nil), "drand.BeaconResponse")
}
// 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
// Client API for Beacon service
type BeaconClient interface {
NewBeacon(ctx context.Context, in *BeaconRequest, opts ...grpc.CallOption) (*BeaconResponse, error)
}
type beaconClient struct {
cc *grpc.ClientConn
}
func NewBeaconClient(cc *grpc.ClientConn) BeaconClient {
return &beaconClient{cc}
}
func (c *beaconClient) NewBeacon(ctx context.Context, in *BeaconRequest, opts ...grpc.CallOption) (*BeaconResponse, error) {
out := new(BeaconResponse)
err := grpc.Invoke(ctx, "/drand.Beacon/NewBeacon", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Beacon service
type BeaconServer interface {
NewBeacon(context.Context, *BeaconRequest) (*BeaconResponse, error)
}
func RegisterBeaconServer(s *grpc.Server, srv BeaconServer) {
s.RegisterService(&_Beacon_serviceDesc, srv)
}
func _Beacon_NewBeacon_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BeaconRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BeaconServer).NewBeacon(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/drand.Beacon/NewBeacon",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BeaconServer).NewBeacon(ctx, req.(*BeaconRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Beacon_serviceDesc = grpc.ServiceDesc{
ServiceName: "drand.Beacon",
HandlerType: (*BeaconServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "NewBeacon",
Handler: _Beacon_NewBeacon_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "drand/beacon.proto",
}
func init() { proto.RegisterFile("drand/beacon.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 209 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x3d, 0x4f, 0xc5, 0x20,
0x18, 0x85, 0x83, 0x7a, 0x6f, 0xe2, 0x6b, 0xeb, 0x40, 0x6a, 0xd2, 0x38, 0xd5, 0x1a, 0x63, 0x27,
0x9a, 0xd8, 0xc5, 0xb9, 0x3f, 0xc0, 0x81, 0xd1, 0xc5, 0x40, 0x41, 0x25, 0xb1, 0x80, 0x7c, 0xe8,
0xdf, 0x37, 0x85, 0x76, 0xf0, 0x76, 0x3c, 0x4f, 0xce, 0x93, 0x17, 0x0e, 0x60, 0xe1, 0x98, 0x16,
0x3d, 0x97, 0x6c, 0x32, 0x9a, 0x58, 0x67, 0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