transform.pb.go 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: transform.proto
  3. package transform
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. math "math"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  22. type Request struct {
  23. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  24. Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
  25. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  26. XXX_unrecognized []byte `json:"-"`
  27. XXX_sizecache int32 `json:"-"`
  28. }
  29. func (m *Request) Reset() { *m = Request{} }
  30. func (m *Request) String() string { return proto.CompactTextString(m) }
  31. func (*Request) ProtoMessage() {}
  32. func (*Request) Descriptor() ([]byte, []int) {
  33. return fileDescriptor_cb4a498eeb2ba07d, []int{0}
  34. }
  35. func (m *Request) XXX_Unmarshal(b []byte) error {
  36. return xxx_messageInfo_Request.Unmarshal(m, b)
  37. }
  38. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  39. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  40. }
  41. func (m *Request) XXX_Merge(src proto.Message) {
  42. xxx_messageInfo_Request.Merge(m, src)
  43. }
  44. func (m *Request) XXX_Size() int {
  45. return xxx_messageInfo_Request.Size(m)
  46. }
  47. func (m *Request) XXX_DiscardUnknown() {
  48. xxx_messageInfo_Request.DiscardUnknown(m)
  49. }
  50. var xxx_messageInfo_Request proto.InternalMessageInfo
  51. func (m *Request) GetId() string {
  52. if m != nil {
  53. return m.Id
  54. }
  55. return ""
  56. }
  57. func (m *Request) GetPhone() string {
  58. if m != nil {
  59. return m.Phone
  60. }
  61. return ""
  62. }
  63. type Response struct {
  64. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  65. Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
  66. Roles string `protobuf:"bytes,3,opt,name=roles,proto3" json:"roles,omitempty"`
  67. Status int64 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
  68. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  69. XXX_unrecognized []byte `json:"-"`
  70. XXX_sizecache int32 `json:"-"`
  71. }
  72. func (m *Response) Reset() { *m = Response{} }
  73. func (m *Response) String() string { return proto.CompactTextString(m) }
  74. func (*Response) ProtoMessage() {}
  75. func (*Response) Descriptor() ([]byte, []int) {
  76. return fileDescriptor_cb4a498eeb2ba07d, []int{1}
  77. }
  78. func (m *Response) XXX_Unmarshal(b []byte) error {
  79. return xxx_messageInfo_Response.Unmarshal(m, b)
  80. }
  81. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  82. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  83. }
  84. func (m *Response) XXX_Merge(src proto.Message) {
  85. xxx_messageInfo_Response.Merge(m, src)
  86. }
  87. func (m *Response) XXX_Size() int {
  88. return xxx_messageInfo_Response.Size(m)
  89. }
  90. func (m *Response) XXX_DiscardUnknown() {
  91. xxx_messageInfo_Response.DiscardUnknown(m)
  92. }
  93. var xxx_messageInfo_Response proto.InternalMessageInfo
  94. func (m *Response) GetId() string {
  95. if m != nil {
  96. return m.Id
  97. }
  98. return ""
  99. }
  100. func (m *Response) GetPhone() string {
  101. if m != nil {
  102. return m.Phone
  103. }
  104. return ""
  105. }
  106. func (m *Response) GetRoles() string {
  107. if m != nil {
  108. return m.Roles
  109. }
  110. return ""
  111. }
  112. func (m *Response) GetStatus() int64 {
  113. if m != nil {
  114. return m.Status
  115. }
  116. return 0
  117. }
  118. func init() {
  119. proto.RegisterType((*Request)(nil), "transform.Request")
  120. proto.RegisterType((*Response)(nil), "transform.Response")
  121. }
  122. func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
  123. var fileDescriptor_cb4a498eeb2ba07d = []byte{
  124. // 169 bytes of a gzipped FileDescriptorProto
  125. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x29, 0x4a, 0xcc,
  126. 0x2b, 0x4e, 0xcb, 0x2f, 0xca, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x28,
  127. 0xe9, 0x73, 0xb1, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0xf1, 0x71, 0x31, 0x65, 0xa6,
  128. 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x31, 0x65, 0xa6, 0x08, 0x89, 0x70, 0xb1, 0x16, 0x64,
  129. 0xe4, 0xe7, 0xa5, 0x4a, 0x30, 0x81, 0x85, 0x20, 0x1c, 0xa5, 0x38, 0x2e, 0x8e, 0xa0, 0xd4, 0xe2,
  130. 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xe2, 0x74, 0x80, 0x44, 0x8b, 0xf2, 0x73, 0x52, 0x8b, 0x25, 0x98,
  131. 0x21, 0xa2, 0x60, 0x8e, 0x90, 0x18, 0x17, 0x5b, 0x71, 0x49, 0x62, 0x49, 0x69, 0xb1, 0x04, 0x8b,
  132. 0x02, 0xa3, 0x06, 0x73, 0x10, 0x94, 0x67, 0x64, 0xcf, 0xc5, 0x19, 0x02, 0x73, 0x9d, 0x90, 0x11,
  133. 0x17, 0xbb, 0x7b, 0x6a, 0x49, 0x68, 0x71, 0x6a, 0x91, 0x90, 0x90, 0x1e, 0xc2, 0x17, 0x50, 0x17,
  134. 0x4b, 0x09, 0xa3, 0x88, 0x41, 0x1c, 0x95, 0xc4, 0x06, 0xf6, 0xa3, 0x31, 0x20, 0x00, 0x00, 0xff,
  135. 0xff, 0x1e, 0x2a, 0x08, 0x8a, 0xf6, 0x00, 0x00, 0x00,
  136. }
  137. // Reference imports to suppress errors if they are not otherwise used.
  138. var _ context.Context
  139. var _ grpc.ClientConn
  140. // This is a compile-time assertion to ensure that this generated file
  141. // is compatible with the grpc package it is being compiled against.
  142. const _ = grpc.SupportPackageIsVersion4
  143. // TransformClient is the client API for Transform service.
  144. //
  145. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  146. type TransformClient interface {
  147. GetUser(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
  148. }
  149. type transformClient struct {
  150. cc *grpc.ClientConn
  151. }
  152. func NewTransformClient(cc *grpc.ClientConn) TransformClient {
  153. return &transformClient{cc}
  154. }
  155. func (c *transformClient) GetUser(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
  156. out := new(Response)
  157. err := c.cc.Invoke(ctx, "/transform.Transform/GetUser", in, out, opts...)
  158. if err != nil {
  159. return nil, err
  160. }
  161. return out, nil
  162. }
  163. // TransformServer is the server API for Transform service.
  164. type TransformServer interface {
  165. GetUser(context.Context, *Request) (*Response, error)
  166. }
  167. // UnimplementedTransformServer can be embedded to have forward compatible implementations.
  168. type UnimplementedTransformServer struct {
  169. }
  170. func (*UnimplementedTransformServer) GetUser(ctx context.Context, req *Request) (*Response, error) {
  171. return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
  172. }
  173. func RegisterTransformServer(s *grpc.Server, srv TransformServer) {
  174. s.RegisterService(&_Transform_serviceDesc, srv)
  175. }
  176. func _Transform_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  177. in := new(Request)
  178. if err := dec(in); err != nil {
  179. return nil, err
  180. }
  181. if interceptor == nil {
  182. return srv.(TransformServer).GetUser(ctx, in)
  183. }
  184. info := &grpc.UnaryServerInfo{
  185. Server: srv,
  186. FullMethod: "/transform.Transform/GetUser",
  187. }
  188. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  189. return srv.(TransformServer).GetUser(ctx, req.(*Request))
  190. }
  191. return interceptor(ctx, in, info, handler)
  192. }
  193. var _Transform_serviceDesc = grpc.ServiceDesc{
  194. ServiceName: "transform.Transform",
  195. HandlerType: (*TransformServer)(nil),
  196. Methods: []grpc.MethodDesc{
  197. {
  198. MethodName: "GetUser",
  199. Handler: _Transform_GetUser_Handler,
  200. },
  201. },
  202. Streams: []grpc.StreamDesc{},
  203. Metadata: "transform.proto",
  204. }