transform.pb.go 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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 UserRequest 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 *UserRequest) Reset() { *m = UserRequest{} }
  30. func (m *UserRequest) String() string { return proto.CompactTextString(m) }
  31. func (*UserRequest) ProtoMessage() {}
  32. func (*UserRequest) Descriptor() ([]byte, []int) {
  33. return fileDescriptor_cb4a498eeb2ba07d, []int{0}
  34. }
  35. func (m *UserRequest) XXX_Unmarshal(b []byte) error {
  36. return xxx_messageInfo_UserRequest.Unmarshal(m, b)
  37. }
  38. func (m *UserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  39. return xxx_messageInfo_UserRequest.Marshal(b, m, deterministic)
  40. }
  41. func (m *UserRequest) XXX_Merge(src proto.Message) {
  42. xxx_messageInfo_UserRequest.Merge(m, src)
  43. }
  44. func (m *UserRequest) XXX_Size() int {
  45. return xxx_messageInfo_UserRequest.Size(m)
  46. }
  47. func (m *UserRequest) XXX_DiscardUnknown() {
  48. xxx_messageInfo_UserRequest.DiscardUnknown(m)
  49. }
  50. var xxx_messageInfo_UserRequest proto.InternalMessageInfo
  51. func (m *UserRequest) GetId() string {
  52. if m != nil {
  53. return m.Id
  54. }
  55. return ""
  56. }
  57. func (m *UserRequest) GetPhone() string {
  58. if m != nil {
  59. return m.Phone
  60. }
  61. return ""
  62. }
  63. type UserResponse 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. IsJzMem bool `protobuf:"varint,5,opt,name=isJzMem,proto3" json:"isJzMem,omitempty"`
  69. IsJzMk bool `protobuf:"varint,6,opt,name=isJzMk,proto3" json:"isJzMk,omitempty"`
  70. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  71. XXX_unrecognized []byte `json:"-"`
  72. XXX_sizecache int32 `json:"-"`
  73. }
  74. func (m *UserResponse) Reset() { *m = UserResponse{} }
  75. func (m *UserResponse) String() string { return proto.CompactTextString(m) }
  76. func (*UserResponse) ProtoMessage() {}
  77. func (*UserResponse) Descriptor() ([]byte, []int) {
  78. return fileDescriptor_cb4a498eeb2ba07d, []int{1}
  79. }
  80. func (m *UserResponse) XXX_Unmarshal(b []byte) error {
  81. return xxx_messageInfo_UserResponse.Unmarshal(m, b)
  82. }
  83. func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  84. return xxx_messageInfo_UserResponse.Marshal(b, m, deterministic)
  85. }
  86. func (m *UserResponse) XXX_Merge(src proto.Message) {
  87. xxx_messageInfo_UserResponse.Merge(m, src)
  88. }
  89. func (m *UserResponse) XXX_Size() int {
  90. return xxx_messageInfo_UserResponse.Size(m)
  91. }
  92. func (m *UserResponse) XXX_DiscardUnknown() {
  93. xxx_messageInfo_UserResponse.DiscardUnknown(m)
  94. }
  95. var xxx_messageInfo_UserResponse proto.InternalMessageInfo
  96. func (m *UserResponse) GetId() string {
  97. if m != nil {
  98. return m.Id
  99. }
  100. return ""
  101. }
  102. func (m *UserResponse) GetPhone() string {
  103. if m != nil {
  104. return m.Phone
  105. }
  106. return ""
  107. }
  108. func (m *UserResponse) GetRoles() string {
  109. if m != nil {
  110. return m.Roles
  111. }
  112. return ""
  113. }
  114. func (m *UserResponse) GetStatus() int64 {
  115. if m != nil {
  116. return m.Status
  117. }
  118. return 0
  119. }
  120. func (m *UserResponse) GetIsJzMem() bool {
  121. if m != nil {
  122. return m.IsJzMem
  123. }
  124. return false
  125. }
  126. func (m *UserResponse) GetIsJzMk() bool {
  127. if m != nil {
  128. return m.IsJzMk
  129. }
  130. return false
  131. }
  132. func init() {
  133. proto.RegisterType((*UserRequest)(nil), "transform.UserRequest")
  134. proto.RegisterType((*UserResponse)(nil), "transform.UserResponse")
  135. }
  136. func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
  137. var fileDescriptor_cb4a498eeb2ba07d = []byte{
  138. // 203 bytes of a gzipped FileDescriptorProto
  139. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x29, 0x4a, 0xcc,
  140. 0x2b, 0x4e, 0xcb, 0x2f, 0xca, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x28,
  141. 0x19, 0x73, 0x71, 0x87, 0x16, 0xa7, 0x16, 0x05, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0xf1,
  142. 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x31, 0x65, 0xa6, 0x08, 0x89,
  143. 0x70, 0xb1, 0x16, 0x64, 0xe4, 0xe7, 0xa5, 0x4a, 0x30, 0x81, 0x85, 0x20, 0x1c, 0xa5, 0x29, 0x8c,
  144. 0x5c, 0x3c, 0x10, 0x5d, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0xc4, 0x69, 0x03, 0x89, 0x16, 0xe5,
  145. 0xe7, 0xa4, 0x16, 0x4b, 0x30, 0x43, 0x44, 0xc1, 0x1c, 0x21, 0x31, 0x2e, 0xb6, 0xe2, 0x92, 0xc4,
  146. 0x92, 0xd2, 0x62, 0x09, 0x16, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x28, 0x4f, 0x48, 0x82, 0x8b, 0x3d,
  147. 0xb3, 0xd8, 0xab, 0xca, 0x37, 0x35, 0x57, 0x82, 0x55, 0x81, 0x51, 0x83, 0x23, 0x08, 0xc6, 0x05,
  148. 0xe9, 0x00, 0x33, 0xb3, 0x25, 0xd8, 0xc0, 0x12, 0x50, 0x9e, 0x91, 0x3b, 0x17, 0x67, 0x08, 0xcc,
  149. 0x63, 0x42, 0x56, 0x5c, 0xec, 0xee, 0xa9, 0x25, 0x20, 0x57, 0x0a, 0x89, 0xe9, 0x21, 0x02, 0x00,
  150. 0xc9, 0xb3, 0x52, 0xe2, 0x18, 0xe2, 0x10, 0xef, 0x24, 0xb1, 0x81, 0x83, 0xc9, 0x18, 0x10, 0x00,
  151. 0x00, 0xff, 0xff, 0x14, 0x18, 0x85, 0x2f, 0x39, 0x01, 0x00, 0x00,
  152. }
  153. // Reference imports to suppress errors if they are not otherwise used.
  154. var _ context.Context
  155. var _ grpc.ClientConn
  156. // This is a compile-time assertion to ensure that this generated file
  157. // is compatible with the grpc package it is being compiled against.
  158. const _ = grpc.SupportPackageIsVersion4
  159. // TransformClient is the client API for Transform service.
  160. //
  161. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  162. type TransformClient interface {
  163. GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
  164. }
  165. type transformClient struct {
  166. cc *grpc.ClientConn
  167. }
  168. func NewTransformClient(cc *grpc.ClientConn) TransformClient {
  169. return &transformClient{cc}
  170. }
  171. func (c *transformClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  172. out := new(UserResponse)
  173. err := c.cc.Invoke(ctx, "/transform.Transform/GetUser", in, out, opts...)
  174. if err != nil {
  175. return nil, err
  176. }
  177. return out, nil
  178. }
  179. // TransformServer is the server API for Transform service.
  180. type TransformServer interface {
  181. GetUser(context.Context, *UserRequest) (*UserResponse, error)
  182. }
  183. // UnimplementedTransformServer can be embedded to have forward compatible implementations.
  184. type UnimplementedTransformServer struct {
  185. }
  186. func (*UnimplementedTransformServer) GetUser(ctx context.Context, req *UserRequest) (*UserResponse, error) {
  187. return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
  188. }
  189. func RegisterTransformServer(s *grpc.Server, srv TransformServer) {
  190. s.RegisterService(&_Transform_serviceDesc, srv)
  191. }
  192. func _Transform_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  193. in := new(UserRequest)
  194. if err := dec(in); err != nil {
  195. return nil, err
  196. }
  197. if interceptor == nil {
  198. return srv.(TransformServer).GetUser(ctx, in)
  199. }
  200. info := &grpc.UnaryServerInfo{
  201. Server: srv,
  202. FullMethod: "/transform.Transform/GetUser",
  203. }
  204. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  205. return srv.(TransformServer).GetUser(ctx, req.(*UserRequest))
  206. }
  207. return interceptor(ctx, in, info, handler)
  208. }
  209. var _Transform_serviceDesc = grpc.ServiceDesc{
  210. ServiceName: "transform.Transform",
  211. HandlerType: (*TransformServer)(nil),
  212. Methods: []grpc.MethodDesc{
  213. {
  214. MethodName: "GetUser",
  215. Handler: _Transform_GetUser_Handler,
  216. },
  217. },
  218. Streams: []grpc.StreamDesc{},
  219. Metadata: "transform.proto",
  220. }