git » remoteu2f » master » tree

[master] / internal / proto / remoteu2f.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: remoteu2f.proto

package remoteu2f

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	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

// Request type, used only for selecting the web page template (no
// functional behaviour difference from an RPC perspective).
type Prepare_RType int32

const (
	Prepare_UNKNOWN      Prepare_RType = 0
	Prepare_REGISTER     Prepare_RType = 1
	Prepare_AUTHENTICATE Prepare_RType = 2
)

var Prepare_RType_name = map[int32]string{
	0: "UNKNOWN",
	1: "REGISTER",
	2: "AUTHENTICATE",
}

var Prepare_RType_value = map[string]int32{
	"UNKNOWN":      0,
	"REGISTER":     1,
	"AUTHENTICATE": 2,
}

func (x Prepare_RType) String() string {
	return proto.EnumName(Prepare_RType_name, int32(x))
}

func (Prepare_RType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_b29fab4d651f9bdd, []int{2, 0}
}

// Generic empty message, for RPCs that don't need one.
type Void struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Void) Reset()         { *m = Void{} }
func (m *Void) String() string { return proto.CompactTextString(m) }
func (*Void) ProtoMessage()    {}
func (*Void) Descriptor() ([]byte, []int) {
	return fileDescriptor_b29fab4d651f9bdd, []int{0}
}

func (m *Void) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Void.Unmarshal(m, b)
}
func (m *Void) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Void.Marshal(b, m, deterministic)
}
func (m *Void) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Void.Merge(m, src)
}
func (m *Void) XXX_Size() int {
	return xxx_messageInfo_Void.Size(m)
}
func (m *Void) XXX_DiscardUnknown() {
	xxx_messageInfo_Void.DiscardUnknown(m)
}

var xxx_messageInfo_Void proto.InternalMessageInfo

// Generic message containing a request key and URL.
type Url struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Url                  string   `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Url) Reset()         { *m = Url{} }
func (m *Url) String() string { return proto.CompactTextString(m) }
func (*Url) ProtoMessage()    {}
func (*Url) Descriptor() ([]byte, []int) {
	return fileDescriptor_b29fab4d651f9bdd, []int{1}
}

func (m *Url) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Url.Unmarshal(m, b)
}
func (m *Url) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Url.Marshal(b, m, deterministic)
}
func (m *Url) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Url.Merge(m, src)
}
func (m *Url) XXX_Size() int {
	return xxx_messageInfo_Url.Size(m)
}
func (m *Url) XXX_DiscardUnknown() {
	xxx_messageInfo_Url.DiscardUnknown(m)
}

var xxx_messageInfo_Url proto.InternalMessageInfo

func (m *Url) GetKey() string {
	if m != nil {
		return m.Key
	}
	return ""
}

func (m *Url) GetUrl() string {
	if m != nil {
		return m.Url
	}
	return ""
}

// Prepare an operation.
type Prepare struct {
	// Generic json content to return.
	// This is a marshalled version of u2f.WebRegisterRequest or
	// u2f.WebSignRequest, depending on the operation.
	// We don't need to access this directly in the proxy, so we keep this
	// opaque and decode it again at javascript.
	Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
	// User-readable message to show on the web page.
	Msg                  string        `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Rtype                Prepare_RType `protobuf:"varint,3,opt,name=rtype,proto3,enum=remoteu2f.Prepare_RType" json:"rtype,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (m *Prepare) Reset()         { *m = Prepare{} }
func (m *Prepare) String() string { return proto.CompactTextString(m) }
func (*Prepare) ProtoMessage()    {}
func (*Prepare) Descriptor() ([]byte, []int) {
	return fileDescriptor_b29fab4d651f9bdd, []int{2}
}

func (m *Prepare) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Prepare.Unmarshal(m, b)
}
func (m *Prepare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Prepare.Marshal(b, m, deterministic)
}
func (m *Prepare) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Prepare.Merge(m, src)
}
func (m *Prepare) XXX_Size() int {
	return xxx_messageInfo_Prepare.Size(m)
}
func (m *Prepare) XXX_DiscardUnknown() {
	xxx_messageInfo_Prepare.DiscardUnknown(m)
}

var xxx_messageInfo_Prepare proto.InternalMessageInfo

func (m *Prepare) GetJson() []byte {
	if m != nil {
		return m.Json
	}
	return nil
}

func (m *Prepare) GetMsg() string {
	if m != nil {
		return m.Msg
	}
	return ""
}

func (m *Prepare) GetRtype() Prepare_RType {
	if m != nil {
		return m.Rtype
	}
	return Prepare_UNKNOWN
}

// Operation response.
type Response struct {
	Json                 []byte   `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Response) Reset()         { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage()    {}
func (*Response) Descriptor() ([]byte, []int) {
	return fileDescriptor_b29fab4d651f9bdd, []int{3}
}

func (m *Response) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Response.Unmarshal(m, b)
}
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Response.Marshal(b, m, deterministic)
}
func (m *Response) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Response.Merge(m, src)
}
func (m *Response) XXX_Size() int {
	return xxx_messageInfo_Response.Size(m)
}
func (m *Response) XXX_DiscardUnknown() {
	xxx_messageInfo_Response.DiscardUnknown(m)
}

var xxx_messageInfo_Response proto.InternalMessageInfo

func (m *Response) GetJson() []byte {
	if m != nil {
		return m.Json
	}
	return nil
}

func init() {
	proto.RegisterEnum("remoteu2f.Prepare_RType", Prepare_RType_name, Prepare_RType_value)
	proto.RegisterType((*Void)(nil), "remoteu2f.Void")
	proto.RegisterType((*Url)(nil), "remoteu2f.Url")
	proto.RegisterType((*Prepare)(nil), "remoteu2f.Prepare")
	proto.RegisterType((*Response)(nil), "remoteu2f.Response")
}

func init() { proto.RegisterFile("remoteu2f.proto", fileDescriptor_b29fab4d651f9bdd) }

var fileDescriptor_b29fab4d651f9bdd = []byte{
	// 285 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x4f, 0x4f, 0x83, 0x40,
	0x10, 0xc5, 0xdd, 0xd2, 0x3f, 0x30, 0x62, 0x4b, 0xc6, 0x0b, 0xe9, 0xc1, 0x34, 0x9c, 0x6a, 0x4c,
	0x30, 0xc1, 0x7e, 0x01, 0xa2, 0x88, 0xc4, 0x04, 0xcc, 0x0a, 0x7a, 0xd6, 0xb8, 0x36, 0x2a, 0x74,
	0x37, 0x0b, 0x1c, 0xf8, 0x20, 0x9e, 0xfd, 0xaa, 0x86, 0x6d, 0x45, 0x52, 0xbd, 0xcd, 0xbc, 0xbc,
	0xb7, 0xbf, 0x97, 0x59, 0x98, 0x49, 0x56, 0xf0, 0x8a, 0xd5, 0xde, 0xab, 0x2b, 0x24, 0xaf, 0x38,
	0x1a, 0x9d, 0xe0, 0x8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e2, 0x79, 0xac, 0xbe, 0xe7, 0xe2,
	0x3b, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xfa, 0x7d, 0x34, 0xb1, 0x01, 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

// RemoteU2FClient is the client API for RemoteU2F service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RemoteU2FClient interface {
	PrepareOp(ctx context.Context, in *Prepare, opts ...grpc.CallOption) (*Url, error)
	GetOpResponse(ctx context.Context, in *Url, opts ...grpc.CallOption) (*Response, error)
	GetAppID(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Url, error)
}

type remoteU2FClient struct {
	cc *grpc.ClientConn
}

func NewRemoteU2FClient(cc *grpc.ClientConn) RemoteU2FClient {
	return &remoteU2FClient{cc}
}

func (c *remoteU2FClient) PrepareOp(ctx context.Context, in *Prepare, opts ...grpc.CallOption) (*Url, error) {
	out := new(Url)
	err := c.cc.Invoke(ctx, "/remoteu2f.RemoteU2F/PrepareOp", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *remoteU2FClient) GetOpResponse(ctx context.Context, in *Url, opts ...grpc.CallOption) (*Response, error) {
	out := new(Response)
	err := c.cc.Invoke(ctx, "/remoteu2f.RemoteU2F/GetOpResponse", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *remoteU2FClient) GetAppID(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Url, error) {
	out := new(Url)
	err := c.cc.Invoke(ctx, "/remoteu2f.RemoteU2F/GetAppID", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RemoteU2FServer is the server API for RemoteU2F service.
type RemoteU2FServer interface {
	PrepareOp(context.Context, *Prepare) (*Url, error)
	GetOpResponse(context.Context, *Url) (*Response, error)
	GetAppID(context.Context, *Void) (*Url, error)
}

// UnimplementedRemoteU2FServer can be embedded to have forward compatible implementations.
type UnimplementedRemoteU2FServer struct {
}

func (*UnimplementedRemoteU2FServer) PrepareOp(ctx context.Context, req *Prepare) (*Url, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PrepareOp not implemented")
}
func (*UnimplementedRemoteU2FServer) GetOpResponse(ctx context.Context, req *Url) (*Response, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetOpResponse not implemented")
}
func (*UnimplementedRemoteU2FServer) GetAppID(ctx context.Context, req *Void) (*Url, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAppID not implemented")
}

func RegisterRemoteU2FServer(s *grpc.Server, srv RemoteU2FServer) {
	s.RegisterService(&_RemoteU2F_serviceDesc, srv)
}

func _RemoteU2F_PrepareOp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Prepare)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RemoteU2FServer).PrepareOp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/remoteu2f.RemoteU2F/PrepareOp",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RemoteU2FServer).PrepareOp(ctx, req.(*Prepare))
	}
	return interceptor(ctx, in, info, handler)
}

func _RemoteU2F_GetOpResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Url)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RemoteU2FServer).GetOpResponse(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/remoteu2f.RemoteU2F/GetOpResponse",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RemoteU2FServer).GetOpResponse(ctx, req.(*Url))
	}
	return interceptor(ctx, in, info, handler)
}

func _RemoteU2F_GetAppID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Void)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RemoteU2FServer).GetAppID(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/remoteu2f.RemoteU2F/GetAppID",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RemoteU2FServer).GetAppID(ctx, req.(*Void))
	}
	return interceptor(ctx, in, info, handler)
}

var _RemoteU2F_serviceDesc = grpc.ServiceDesc{
	ServiceName: "remoteu2f.RemoteU2F",
	HandlerType: (*RemoteU2FServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PrepareOp",
			Handler:    _RemoteU2F_PrepareOp_Handler,
		},
		{
			MethodName: "GetOpResponse",
			Handler:    _RemoteU2F_GetOpResponse_Handler,
		},
		{
			MethodName: "GetAppID",
			Handler:    _RemoteU2F_GetAppID_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "remoteu2f.proto",
}