-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.pb.go
194 lines (172 loc) · 6.94 KB
/
user.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: user.proto
package userproto
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
func init() {
proto.RegisterFile("user.proto", fileDescriptor_116e343673f7ffaf)
}
var fileDescriptor_116e343673f7ffaf = []byte{
// 129 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x2d, 0x4e, 0x2d,
0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x04, 0xb1, 0xc1, 0x4c, 0x29, 0x21, 0x10, 0x33,
0x3e, 0x37, 0xb5, 0xb8, 0x38, 0x31, 0x3d, 0x15, 0x22, 0x6d, 0x74, 0x81, 0x91, 0x8b, 0x3b, 0xb4,
0x38, 0xb5, 0x28, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0xc8, 0x9e, 0x8b, 0x2d, 0x38, 0x33,
0x3d, 0xcf, 0x33, 0x4f, 0x48, 0x52, 0x0f, 0xae, 0x53, 0x2f, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8,
0xc4, 0x17, 0xa2, 0x55, 0x4a, 0x0a, 0x45, 0xaa, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x15, 0x2a, 0x07,
0x33, 0x20, 0xb4, 0x80, 0x02, 0x03, 0xc2, 0x52, 0x8b, 0x32, 0xd3, 0x2a, 0xc9, 0x34, 0x20, 0x89,
0x0d, 0x2c, 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x73, 0xbe, 0xd6, 0x06, 0x01, 0x00,
0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// UserServiceClient is the client API for UserService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type UserServiceClient interface {
SignIn(ctx context.Context, in *RequestMessage, opts ...grpc.CallOption) (*ResponseMessage, error)
SignUp(ctx context.Context, in *RequestMessage, opts ...grpc.CallOption) (*ResponseMessage, error)
Verify(ctx context.Context, in *RequestMessage, opts ...grpc.CallOption) (*ResponseMessage, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) SignIn(ctx context.Context, in *RequestMessage, opts ...grpc.CallOption) (*ResponseMessage, error) {
out := new(ResponseMessage)
err := c.cc.Invoke(ctx, "/userproto.UserService/SignIn", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) SignUp(ctx context.Context, in *RequestMessage, opts ...grpc.CallOption) (*ResponseMessage, error) {
out := new(ResponseMessage)
err := c.cc.Invoke(ctx, "/userproto.UserService/SignUp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Verify(ctx context.Context, in *RequestMessage, opts ...grpc.CallOption) (*ResponseMessage, error) {
out := new(ResponseMessage)
err := c.cc.Invoke(ctx, "/userproto.UserService/Verify", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
type UserServiceServer interface {
SignIn(context.Context, *RequestMessage) (*ResponseMessage, error)
SignUp(context.Context, *RequestMessage) (*ResponseMessage, error)
Verify(context.Context, *RequestMessage) (*ResponseMessage, error)
}
// UnimplementedUserServiceServer can be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (*UnimplementedUserServiceServer) SignIn(ctx context.Context, req *RequestMessage) (*ResponseMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignIn not implemented")
}
func (*UnimplementedUserServiceServer) SignUp(ctx context.Context, req *RequestMessage) (*ResponseMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignUp not implemented")
}
func (*UnimplementedUserServiceServer) Verify(ctx context.Context, req *RequestMessage) (*ResponseMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
}
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
s.RegisterService(&_UserService_serviceDesc, srv)
}
func _UserService_SignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RequestMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).SignIn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/userproto.UserService/SignIn",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).SignIn(ctx, req.(*RequestMessage))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RequestMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).SignUp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/userproto.UserService/SignUp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).SignUp(ctx, req.(*RequestMessage))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RequestMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Verify(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/userproto.UserService/Verify",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Verify(ctx, req.(*RequestMessage))
}
return interceptor(ctx, in, info, handler)
}
var _UserService_serviceDesc = grpc.ServiceDesc{
ServiceName: "userproto.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SignIn",
Handler: _UserService_SignIn_Handler,
},
{
MethodName: "SignUp",
Handler: _UserService_SignUp_Handler,
},
{
MethodName: "Verify",
Handler: _UserService_Verify_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user.proto",
}