|
|
@@ -166,30 +166,113 @@ func (m *UserResponse) GetGender() int64 {
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
+type TokenRequest struct {
|
|
|
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *TokenRequest) Reset() { *m = TokenRequest{} }
|
|
|
+func (m *TokenRequest) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*TokenRequest) ProtoMessage() {}
|
|
|
+func (*TokenRequest) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_cb4a498eeb2ba07d, []int{2}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *TokenRequest) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_TokenRequest.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *TokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_TokenRequest.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *TokenRequest) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_TokenRequest.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *TokenRequest) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_TokenRequest.Size(m)
|
|
|
+}
|
|
|
+func (m *TokenRequest) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_TokenRequest.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_TokenRequest proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *TokenRequest) GetToken() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Token
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+type TokenResponse struct {
|
|
|
+ UserId string `protobuf:"bytes,1,opt,name=UserId,proto3" json:"UserId,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *TokenResponse) Reset() { *m = TokenResponse{} }
|
|
|
+func (m *TokenResponse) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*TokenResponse) ProtoMessage() {}
|
|
|
+func (*TokenResponse) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_cb4a498eeb2ba07d, []int{3}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *TokenResponse) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_TokenResponse.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *TokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_TokenResponse.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *TokenResponse) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_TokenResponse.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *TokenResponse) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_TokenResponse.Size(m)
|
|
|
+}
|
|
|
+func (m *TokenResponse) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_TokenResponse.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_TokenResponse proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *TokenResponse) GetUserId() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.UserId
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
func init() {
|
|
|
proto.RegisterType((*UserRequest)(nil), "transform.UserRequest")
|
|
|
proto.RegisterType((*UserResponse)(nil), "transform.UserResponse")
|
|
|
+ proto.RegisterType((*TokenRequest)(nil), "transform.TokenRequest")
|
|
|
+ proto.RegisterType((*TokenResponse)(nil), "transform.TokenResponse")
|
|
|
}
|
|
|
|
|
|
func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
|
|
|
|
|
|
var fileDescriptor_cb4a498eeb2ba07d = []byte{
|
|
|
- // 232 bytes of a gzipped FileDescriptorProto
|
|
|
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4e, 0xc3, 0x30,
|
|
|
- 0x10, 0x86, 0xe5, 0x94, 0xa6, 0xcd, 0x15, 0x81, 0x74, 0x42, 0xc5, 0xea, 0x14, 0x75, 0xea, 0xd4,
|
|
|
- 0x81, 0x6e, 0xbc, 0x40, 0x37, 0x06, 0xab, 0x3c, 0x40, 0x20, 0x07, 0x44, 0x6a, 0x6d, 0x73, 0xe7,
|
|
|
- 0x0c, 0x7d, 0x4f, 0x1e, 0x08, 0xd9, 0xa6, 0x21, 0x12, 0x0b, 0xe3, 0xf7, 0xfd, 0x3a, 0xff, 0xf2,
|
|
|
- 0x0f, 0xb7, 0x81, 0x1b, 0x2b, 0x6f, 0x8e, 0x4f, 0x5b, 0xcf, 0x2e, 0x38, 0xac, 0x06, 0xb1, 0xde,
|
|
|
- 0xc1, 0xe2, 0x59, 0x88, 0x0d, 0x7d, 0xf6, 0x24, 0x01, 0x6f, 0xa0, 0xe8, 0x5a, 0xad, 0x6a, 0xb5,
|
|
|
- 0xa9, 0x4c, 0xd1, 0xb5, 0x78, 0x07, 0x53, 0xff, 0xe1, 0x2c, 0xe9, 0x22, 0xa9, 0x0c, 0xeb, 0x2f,
|
|
|
- 0x05, 0xd7, 0xf9, 0x4a, 0xbc, 0xb3, 0x42, 0xff, 0x3b, 0x8b, 0x96, 0xdd, 0x91, 0x44, 0x4f, 0xb2,
|
|
|
- 0x4d, 0x80, 0x4b, 0x28, 0x25, 0x34, 0xa1, 0x17, 0x7d, 0x55, 0xab, 0xcd, 0xc4, 0xfc, 0x10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0xd2, 0xf5, 0xff, 0x42, 0x46, 0xe5, 0x67, 0x57, 0x47, 0xba, 0x4f, 0xb8, 0x07, 0x78, 0xae, 0x15,
|
|
|
+ 0xa1, 0xcd, 0x65, 0xe3, 0x63, 0xe3, 0xff, 0x66, 0xfc, 0xd8, 0x70, 0x0f, 0xbc, 0xc6, 0x76, 0xef,
|
|
|
+ 0x9b, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x8d, 0xf1, 0x12, 0x0a, 0x02, 0x00, 0x00,
|
|
|
}
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
@@ -205,6 +288,7 @@ const _ = grpc.SupportPackageIsVersion4
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
type TransformClient interface {
|
|
|
GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
|
|
|
+ ParseToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
|
|
|
}
|
|
|
|
|
|
type transformClient struct {
|
|
|
@@ -224,9 +308,19 @@ func (c *transformClient) GetUser(ctx context.Context, in *UserRequest, opts ...
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *transformClient) ParseToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error) {
|
|
|
+ out := new(TokenResponse)
|
|
|
+ err := c.cc.Invoke(ctx, "/transform.Transform/ParseToken", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
// TransformServer is the server API for Transform service.
|
|
|
type TransformServer interface {
|
|
|
GetUser(context.Context, *UserRequest) (*UserResponse, error)
|
|
|
+ ParseToken(context.Context, *TokenRequest) (*TokenResponse, error)
|
|
|
}
|
|
|
|
|
|
// UnimplementedTransformServer can be embedded to have forward compatible implementations.
|
|
|
@@ -236,6 +330,9 @@ type UnimplementedTransformServer struct {
|
|
|
func (*UnimplementedTransformServer) GetUser(ctx context.Context, req *UserRequest) (*UserResponse, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
|
|
|
}
|
|
|
+func (*UnimplementedTransformServer) ParseToken(ctx context.Context, req *TokenRequest) (*TokenResponse, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method ParseToken not implemented")
|
|
|
+}
|
|
|
|
|
|
func RegisterTransformServer(s *grpc.Server, srv TransformServer) {
|
|
|
s.RegisterService(&_Transform_serviceDesc, srv)
|
|
|
@@ -259,6 +356,24 @@ func _Transform_GetUser_Handler(srv interface{}, ctx context.Context, dec func(i
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
|
|
|
|
+func _Transform_ParseToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(TokenRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(TransformServer).ParseToken(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/transform.Transform/ParseToken",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(TransformServer).ParseToken(ctx, req.(*TokenRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
var _Transform_serviceDesc = grpc.ServiceDesc{
|
|
|
ServiceName: "transform.Transform",
|
|
|
HandlerType: (*TransformServer)(nil),
|
|
|
@@ -267,6 +382,10 @@ var _Transform_serviceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "GetUser",
|
|
|
Handler: _Transform_GetUser_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "ParseToken",
|
|
|
+ Handler: _Transform_ParseToken_Handler,
|
|
|
+ },
|
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "transform.proto",
|