/
login.pb.go
141 lines (116 loc) · 4.18 KB
/
login.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: login.proto
package proto
import proto1 "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 _ = proto1.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type LoginInfo struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *LoginInfo) Reset() { *m = LoginInfo{} }
func (m *LoginInfo) String() string { return proto1.CompactTextString(m) }
func (*LoginInfo) ProtoMessage() {}
func (*LoginInfo) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *LoginInfo) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type LoginResult struct {
Code int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
}
func (m *LoginResult) Reset() { *m = LoginResult{} }
func (m *LoginResult) String() string { return proto1.CompactTextString(m) }
func (*LoginResult) ProtoMessage() {}
func (*LoginResult) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (m *LoginResult) GetCode() int32 {
if m != nil {
return m.Code
}
return 0
}
func init() {
proto1.RegisterType((*LoginInfo)(nil), "proto.LoginInfo")
proto1.RegisterType((*LoginResult)(nil), "proto.LoginResult")
}
// 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 Login service
type LoginClient interface {
Login(ctx context.Context, in *LoginInfo, opts ...grpc.CallOption) (*LoginResult, error)
}
type loginClient struct {
cc *grpc.ClientConn
}
func NewLoginClient(cc *grpc.ClientConn) LoginClient {
return &loginClient{cc}
}
func (c *loginClient) Login(ctx context.Context, in *LoginInfo, opts ...grpc.CallOption) (*LoginResult, error) {
out := new(LoginResult)
err := grpc.Invoke(ctx, "/proto.Login/Login", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Login service
type LoginServer interface {
Login(context.Context, *LoginInfo) (*LoginResult, error)
}
func RegisterLoginServer(s *grpc.Server, srv LoginServer) {
s.RegisterService(&_Login_serviceDesc, srv)
}
func _Login_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginInfo)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoginServer).Login(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Login/Login",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoginServer).Login(ctx, req.(*LoginInfo))
}
return interceptor(ctx, in, info, handler)
}
var _Login_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Login",
HandlerType: (*LoginServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Login",
Handler: _Login_Login_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "login.proto",
}
func init() { proto1.RegisterFile("login.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 118 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xc9, 0x4f, 0xcf,
0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, 0x4a, 0xf2, 0x5c, 0x9c, 0x3e,
0x20, 0x51, 0xcf, 0xbc, 0xb4, 0x7c, 0x21, 0x21, 0x2e, 0x96, 0xbc, 0xc4, 0xdc, 0x54, 0x09, 0x46,
0x05, 0x46, 0x0d, 0xce, 0x20, 0x30, 0x5b, 0x49, 0x91, 0x8b, 0x1b, 0xac, 0x20, 0x28, 0xb5, 0xb8,
0x34, 0xa7, 0x04, 0xa4, 0x24, 0x39, 0x3f, 0x05, 0xa2, 0x84, 0x35, 0x08, 0xcc, 0x36, 0x32, 0xe3,
0x62, 0x05, 0x2b, 0x11, 0xd2, 0x85, 0x31, 0x04, 0x20, 0x96, 0xe8, 0xc1, 0x8d, 0x96, 0x12, 0x42,
0x16, 0x81, 0x98, 0x95, 0xc4, 0x06, 0x16, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x14,
0xa0, 0xf4, 0x98, 0x00, 0x00, 0x00,
}