transform.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  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. ErpRoleType int64 `protobuf:"varint,5,opt,name=erpRoleType,proto3" json:"erpRoleType,omitempty"`
  69. UserName string `protobuf:"bytes,6,opt,name=userName,proto3" json:"userName,omitempty"`
  70. CityName string `protobuf:"bytes,7,opt,name=cityName,proto3" json:"cityName,omitempty"`
  71. Gender int64 `protobuf:"varint,8,opt,name=gender,proto3" json:"gender,omitempty"`
  72. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  73. XXX_unrecognized []byte `json:"-"`
  74. XXX_sizecache int32 `json:"-"`
  75. }
  76. func (m *UserResponse) Reset() { *m = UserResponse{} }
  77. func (m *UserResponse) String() string { return proto.CompactTextString(m) }
  78. func (*UserResponse) ProtoMessage() {}
  79. func (*UserResponse) Descriptor() ([]byte, []int) {
  80. return fileDescriptor_cb4a498eeb2ba07d, []int{1}
  81. }
  82. func (m *UserResponse) XXX_Unmarshal(b []byte) error {
  83. return xxx_messageInfo_UserResponse.Unmarshal(m, b)
  84. }
  85. func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  86. return xxx_messageInfo_UserResponse.Marshal(b, m, deterministic)
  87. }
  88. func (m *UserResponse) XXX_Merge(src proto.Message) {
  89. xxx_messageInfo_UserResponse.Merge(m, src)
  90. }
  91. func (m *UserResponse) XXX_Size() int {
  92. return xxx_messageInfo_UserResponse.Size(m)
  93. }
  94. func (m *UserResponse) XXX_DiscardUnknown() {
  95. xxx_messageInfo_UserResponse.DiscardUnknown(m)
  96. }
  97. var xxx_messageInfo_UserResponse proto.InternalMessageInfo
  98. func (m *UserResponse) GetId() string {
  99. if m != nil {
  100. return m.Id
  101. }
  102. return ""
  103. }
  104. func (m *UserResponse) GetPhone() string {
  105. if m != nil {
  106. return m.Phone
  107. }
  108. return ""
  109. }
  110. func (m *UserResponse) GetRoles() string {
  111. if m != nil {
  112. return m.Roles
  113. }
  114. return ""
  115. }
  116. func (m *UserResponse) GetStatus() int64 {
  117. if m != nil {
  118. return m.Status
  119. }
  120. return 0
  121. }
  122. func (m *UserResponse) GetErpRoleType() int64 {
  123. if m != nil {
  124. return m.ErpRoleType
  125. }
  126. return 0
  127. }
  128. func (m *UserResponse) GetUserName() string {
  129. if m != nil {
  130. return m.UserName
  131. }
  132. return ""
  133. }
  134. func (m *UserResponse) GetCityName() string {
  135. if m != nil {
  136. return m.CityName
  137. }
  138. return ""
  139. }
  140. func (m *UserResponse) GetGender() int64 {
  141. if m != nil {
  142. return m.Gender
  143. }
  144. return 0
  145. }
  146. type TokenRequest struct {
  147. Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
  148. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  149. XXX_unrecognized []byte `json:"-"`
  150. XXX_sizecache int32 `json:"-"`
  151. }
  152. func (m *TokenRequest) Reset() { *m = TokenRequest{} }
  153. func (m *TokenRequest) String() string { return proto.CompactTextString(m) }
  154. func (*TokenRequest) ProtoMessage() {}
  155. func (*TokenRequest) Descriptor() ([]byte, []int) {
  156. return fileDescriptor_cb4a498eeb2ba07d, []int{2}
  157. }
  158. func (m *TokenRequest) XXX_Unmarshal(b []byte) error {
  159. return xxx_messageInfo_TokenRequest.Unmarshal(m, b)
  160. }
  161. func (m *TokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  162. return xxx_messageInfo_TokenRequest.Marshal(b, m, deterministic)
  163. }
  164. func (m *TokenRequest) XXX_Merge(src proto.Message) {
  165. xxx_messageInfo_TokenRequest.Merge(m, src)
  166. }
  167. func (m *TokenRequest) XXX_Size() int {
  168. return xxx_messageInfo_TokenRequest.Size(m)
  169. }
  170. func (m *TokenRequest) XXX_DiscardUnknown() {
  171. xxx_messageInfo_TokenRequest.DiscardUnknown(m)
  172. }
  173. var xxx_messageInfo_TokenRequest proto.InternalMessageInfo
  174. func (m *TokenRequest) GetToken() string {
  175. if m != nil {
  176. return m.Token
  177. }
  178. return ""
  179. }
  180. type TokenResponse struct {
  181. UserId string `protobuf:"bytes,1,opt,name=UserId,proto3" json:"UserId,omitempty"`
  182. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  183. XXX_unrecognized []byte `json:"-"`
  184. XXX_sizecache int32 `json:"-"`
  185. }
  186. func (m *TokenResponse) Reset() { *m = TokenResponse{} }
  187. func (m *TokenResponse) String() string { return proto.CompactTextString(m) }
  188. func (*TokenResponse) ProtoMessage() {}
  189. func (*TokenResponse) Descriptor() ([]byte, []int) {
  190. return fileDescriptor_cb4a498eeb2ba07d, []int{3}
  191. }
  192. func (m *TokenResponse) XXX_Unmarshal(b []byte) error {
  193. return xxx_messageInfo_TokenResponse.Unmarshal(m, b)
  194. }
  195. func (m *TokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  196. return xxx_messageInfo_TokenResponse.Marshal(b, m, deterministic)
  197. }
  198. func (m *TokenResponse) XXX_Merge(src proto.Message) {
  199. xxx_messageInfo_TokenResponse.Merge(m, src)
  200. }
  201. func (m *TokenResponse) XXX_Size() int {
  202. return xxx_messageInfo_TokenResponse.Size(m)
  203. }
  204. func (m *TokenResponse) XXX_DiscardUnknown() {
  205. xxx_messageInfo_TokenResponse.DiscardUnknown(m)
  206. }
  207. var xxx_messageInfo_TokenResponse proto.InternalMessageInfo
  208. func (m *TokenResponse) GetUserId() string {
  209. if m != nil {
  210. return m.UserId
  211. }
  212. return ""
  213. }
  214. func init() {
  215. proto.RegisterType((*UserRequest)(nil), "transform.UserRequest")
  216. proto.RegisterType((*UserResponse)(nil), "transform.UserResponse")
  217. proto.RegisterType((*TokenRequest)(nil), "transform.TokenRequest")
  218. proto.RegisterType((*TokenResponse)(nil), "transform.TokenResponse")
  219. }
  220. func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
  221. var fileDescriptor_cb4a498eeb2ba07d = []byte{
  222. // 287 bytes of a gzipped FileDescriptorProto
  223. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbd, 0x4e, 0xc3, 0x30,
  224. 0x14, 0x85, 0x95, 0x94, 0xa4, 0xcd, 0x6d, 0x01, 0xc9, 0xaa, 0x82, 0x95, 0x29, 0x8a, 0x90, 0xe8,
  225. 0xd4, 0x81, 0x6e, 0x2c, 0x8c, 0x88, 0x05, 0xa1, 0x28, 0x3c, 0x40, 0x20, 0x17, 0x88, 0x68, 0x63,
  226. 0xe3, 0xeb, 0x0c, 0x7d, 0x03, 0x1e, 0x90, 0x07, 0x42, 0xfe, 0x49, 0x89, 0xd4, 0xa5, 0xe3, 0x77,
  227. 0x8e, 0xed, 0xe3, 0x7b, 0x2e, 0x5c, 0x6a, 0x55, 0x77, 0xf4, 0x2e, 0xd4, 0x6e, 0x2d, 0x95, 0xd0,
  228. 0x82, 0x25, 0x07, 0xa1, 0xd8, 0xc0, 0xfc, 0x85, 0x50, 0x95, 0xf8, 0xdd, 0x23, 0x69, 0x76, 0x01,
  229. 0x61, 0xdb, 0xf0, 0x20, 0x0f, 0x56, 0x49, 0x19, 0xb6, 0x0d, 0x5b, 0x42, 0x24, 0x3f, 0x45, 0x87,
  230. 0x3c, 0xb4, 0x92, 0x83, 0xe2, 0x37, 0x80, 0x85, 0xbb, 0x45, 0x52, 0x74, 0x84, 0xa7, 0x5d, 0x33,
  231. 0xaa, 0x12, 0x5b, 0x24, 0x3e, 0x71, 0xaa, 0x05, 0x96, 0x42, 0x4c, 0xba, 0xd6, 0x3d, 0xf1, 0xb3,
  232. 0x3c, 0x58, 0x4d, 0x4a, 0x4f, 0x2c, 0x87, 0x39, 0x2a, 0x59, 0x8a, 0x2d, 0x56, 0x7b, 0x89, 0x3c,
  233. 0xb2, 0xe6, 0x58, 0x62, 0x19, 0xcc, 0x7a, 0x42, 0xf5, 0x54, 0xef, 0x90, 0xc7, 0xf6, 0xc9, 0x03,
  234. 0x1b, 0xef, 0xad, 0xd5, 0x7b, 0xeb, 0x4d, 0x9d, 0x37, 0xb0, 0x49, 0xfc, 0xc0, 0xae, 0x41, 0xc5,
  235. 0x67, 0x2e, 0xd1, 0x51, 0x71, 0x0d, 0x8b, 0x4a, 0x7c, 0x61, 0x37, 0x94, 0xb1, 0x84, 0x48, 0x1b,
  236. 0xf6, 0x83, 0x39, 0x28, 0x6e, 0xe0, 0xdc, 0x9f, 0xf2, 0xc3, 0xa7, 0x10, 0x9b, 0x32, 0x1e, 0x87,
  237. 0x02, 0x3c, 0xdd, 0xfe, 0x04, 0x90, 0x54, 0x43, 0xd1, 0xec, 0x0e, 0xa6, 0x0f, 0xa8, 0x8d, 0xc5,
  238. 0xd2, 0xf5, 0xff, 0x42, 0x46, 0xe5, 0x67, 0x57, 0x47, 0xba, 0x4f, 0xb8, 0x07, 0x78, 0xae, 0x15,
  239. 0xa1, 0xcd, 0x65, 0xe3, 0x63, 0xe3, 0xff, 0x66, 0xfc, 0xd8, 0x70, 0x0f, 0xbc, 0xc6, 0x76, 0xef,
  240. 0x9b, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x8d, 0xf1, 0x12, 0x0a, 0x02, 0x00, 0x00,
  241. }
  242. // Reference imports to suppress errors if they are not otherwise used.
  243. var _ context.Context
  244. var _ grpc.ClientConn
  245. // This is a compile-time assertion to ensure that this generated file
  246. // is compatible with the grpc package it is being compiled against.
  247. const _ = grpc.SupportPackageIsVersion4
  248. // TransformClient is the client API for Transform service.
  249. //
  250. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  251. type TransformClient interface {
  252. GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
  253. ParseToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
  254. }
  255. type transformClient struct {
  256. cc *grpc.ClientConn
  257. }
  258. func NewTransformClient(cc *grpc.ClientConn) TransformClient {
  259. return &transformClient{cc}
  260. }
  261. func (c *transformClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  262. out := new(UserResponse)
  263. err := c.cc.Invoke(ctx, "/transform.Transform/GetUser", in, out, opts...)
  264. if err != nil {
  265. return nil, err
  266. }
  267. return out, nil
  268. }
  269. func (c *transformClient) ParseToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error) {
  270. out := new(TokenResponse)
  271. err := c.cc.Invoke(ctx, "/transform.Transform/ParseToken", in, out, opts...)
  272. if err != nil {
  273. return nil, err
  274. }
  275. return out, nil
  276. }
  277. // TransformServer is the server API for Transform service.
  278. type TransformServer interface {
  279. GetUser(context.Context, *UserRequest) (*UserResponse, error)
  280. ParseToken(context.Context, *TokenRequest) (*TokenResponse, error)
  281. }
  282. // UnimplementedTransformServer can be embedded to have forward compatible implementations.
  283. type UnimplementedTransformServer struct {
  284. }
  285. func (*UnimplementedTransformServer) GetUser(ctx context.Context, req *UserRequest) (*UserResponse, error) {
  286. return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
  287. }
  288. func (*UnimplementedTransformServer) ParseToken(ctx context.Context, req *TokenRequest) (*TokenResponse, error) {
  289. return nil, status.Errorf(codes.Unimplemented, "method ParseToken not implemented")
  290. }
  291. func RegisterTransformServer(s *grpc.Server, srv TransformServer) {
  292. s.RegisterService(&_Transform_serviceDesc, srv)
  293. }
  294. func _Transform_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  295. in := new(UserRequest)
  296. if err := dec(in); err != nil {
  297. return nil, err
  298. }
  299. if interceptor == nil {
  300. return srv.(TransformServer).GetUser(ctx, in)
  301. }
  302. info := &grpc.UnaryServerInfo{
  303. Server: srv,
  304. FullMethod: "/transform.Transform/GetUser",
  305. }
  306. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  307. return srv.(TransformServer).GetUser(ctx, req.(*UserRequest))
  308. }
  309. return interceptor(ctx, in, info, handler)
  310. }
  311. func _Transform_ParseToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  312. in := new(TokenRequest)
  313. if err := dec(in); err != nil {
  314. return nil, err
  315. }
  316. if interceptor == nil {
  317. return srv.(TransformServer).ParseToken(ctx, in)
  318. }
  319. info := &grpc.UnaryServerInfo{
  320. Server: srv,
  321. FullMethod: "/transform.Transform/ParseToken",
  322. }
  323. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  324. return srv.(TransformServer).ParseToken(ctx, req.(*TokenRequest))
  325. }
  326. return interceptor(ctx, in, info, handler)
  327. }
  328. var _Transform_serviceDesc = grpc.ServiceDesc{
  329. ServiceName: "transform.Transform",
  330. HandlerType: (*TransformServer)(nil),
  331. Methods: []grpc.MethodDesc{
  332. {
  333. MethodName: "GetUser",
  334. Handler: _Transform_GetUser_Handler,
  335. },
  336. {
  337. MethodName: "ParseToken",
  338. Handler: _Transform_ParseToken_Handler,
  339. },
  340. },
  341. Streams: []grpc.StreamDesc{},
  342. Metadata: "transform.proto",
  343. }