transform.pb.go 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  70. XXX_unrecognized []byte `json:"-"`
  71. XXX_sizecache int32 `json:"-"`
  72. }
  73. func (m *UserResponse) Reset() { *m = UserResponse{} }
  74. func (m *UserResponse) String() string { return proto.CompactTextString(m) }
  75. func (*UserResponse) ProtoMessage() {}
  76. func (*UserResponse) Descriptor() ([]byte, []int) {
  77. return fileDescriptor_cb4a498eeb2ba07d, []int{1}
  78. }
  79. func (m *UserResponse) XXX_Unmarshal(b []byte) error {
  80. return xxx_messageInfo_UserResponse.Unmarshal(m, b)
  81. }
  82. func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  83. return xxx_messageInfo_UserResponse.Marshal(b, m, deterministic)
  84. }
  85. func (m *UserResponse) XXX_Merge(src proto.Message) {
  86. xxx_messageInfo_UserResponse.Merge(m, src)
  87. }
  88. func (m *UserResponse) XXX_Size() int {
  89. return xxx_messageInfo_UserResponse.Size(m)
  90. }
  91. func (m *UserResponse) XXX_DiscardUnknown() {
  92. xxx_messageInfo_UserResponse.DiscardUnknown(m)
  93. }
  94. var xxx_messageInfo_UserResponse proto.InternalMessageInfo
  95. func (m *UserResponse) GetId() string {
  96. if m != nil {
  97. return m.Id
  98. }
  99. return ""
  100. }
  101. func (m *UserResponse) GetPhone() string {
  102. if m != nil {
  103. return m.Phone
  104. }
  105. return ""
  106. }
  107. func (m *UserResponse) GetRoles() string {
  108. if m != nil {
  109. return m.Roles
  110. }
  111. return ""
  112. }
  113. func (m *UserResponse) GetStatus() int64 {
  114. if m != nil {
  115. return m.Status
  116. }
  117. return 0
  118. }
  119. func (m *UserResponse) GetErpRoleType() int64 {
  120. if m != nil {
  121. return m.ErpRoleType
  122. }
  123. return 0
  124. }
  125. func init() {
  126. proto.RegisterType((*UserRequest)(nil), "transform.UserRequest")
  127. proto.RegisterType((*UserResponse)(nil), "transform.UserResponse")
  128. }
  129. func init() { proto.RegisterFile("transform.proto", fileDescriptor_cb4a498eeb2ba07d) }
  130. var fileDescriptor_cb4a498eeb2ba07d = []byte{
  131. // 194 bytes of a gzipped FileDescriptorProto
  132. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x29, 0x4a, 0xcc,
  133. 0x2b, 0x4e, 0xcb, 0x2f, 0xca, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x28,
  134. 0x19, 0x73, 0x71, 0x87, 0x16, 0xa7, 0x16, 0x05, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0xf1,
  135. 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x31, 0x65, 0xa6, 0x08, 0x89,
  136. 0x70, 0xb1, 0x16, 0x64, 0xe4, 0xe7, 0xa5, 0x4a, 0x30, 0x81, 0x85, 0x20, 0x1c, 0xa5, 0x16, 0x46,
  137. 0x2e, 0x1e, 0x88, 0xae, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xe2, 0xb4, 0x81, 0x44, 0x8b, 0xf2,
  138. 0x73, 0x52, 0x8b, 0x25, 0x98, 0x21, 0xa2, 0x60, 0x8e, 0x90, 0x18, 0x17, 0x5b, 0x71, 0x49, 0x62,
  139. 0x49, 0x69, 0xb1, 0x04, 0x8b, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x94, 0x27, 0xa4, 0xc0, 0xc5, 0x9d,
  140. 0x5a, 0x54, 0x10, 0x94, 0x9f, 0x93, 0x1a, 0x52, 0x59, 0x90, 0x2a, 0xc1, 0x0a, 0x96, 0x44, 0x16,
  141. 0x32, 0x72, 0xe7, 0xe2, 0x0c, 0x81, 0x79, 0x44, 0xc8, 0x8a, 0x8b, 0xdd, 0x3d, 0xb5, 0x04, 0xe4,
  142. 0x2a, 0x21, 0x31, 0x3d, 0x84, 0x87, 0x91, 0x3c, 0x27, 0x25, 0x8e, 0x21, 0x0e, 0x71, 0x7e, 0x12,
  143. 0x1b, 0x38, 0x58, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x23, 0x27, 0xdb, 0x29, 0x01,
  144. 0x00, 0x00,
  145. }
  146. // Reference imports to suppress errors if they are not otherwise used.
  147. var _ context.Context
  148. var _ grpc.ClientConn
  149. // This is a compile-time assertion to ensure that this generated file
  150. // is compatible with the grpc package it is being compiled against.
  151. const _ = grpc.SupportPackageIsVersion4
  152. // TransformClient is the client API for Transform service.
  153. //
  154. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  155. type TransformClient interface {
  156. GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
  157. }
  158. type transformClient struct {
  159. cc *grpc.ClientConn
  160. }
  161. func NewTransformClient(cc *grpc.ClientConn) TransformClient {
  162. return &transformClient{cc}
  163. }
  164. func (c *transformClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) {
  165. out := new(UserResponse)
  166. err := c.cc.Invoke(ctx, "/transform.Transform/GetUser", in, out, opts...)
  167. if err != nil {
  168. return nil, err
  169. }
  170. return out, nil
  171. }
  172. // TransformServer is the server API for Transform service.
  173. type TransformServer interface {
  174. GetUser(context.Context, *UserRequest) (*UserResponse, error)
  175. }
  176. // UnimplementedTransformServer can be embedded to have forward compatible implementations.
  177. type UnimplementedTransformServer struct {
  178. }
  179. func (*UnimplementedTransformServer) GetUser(ctx context.Context, req *UserRequest) (*UserResponse, error) {
  180. return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
  181. }
  182. func RegisterTransformServer(s *grpc.Server, srv TransformServer) {
  183. s.RegisterService(&_Transform_serviceDesc, srv)
  184. }
  185. func _Transform_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  186. in := new(UserRequest)
  187. if err := dec(in); err != nil {
  188. return nil, err
  189. }
  190. if interceptor == nil {
  191. return srv.(TransformServer).GetUser(ctx, in)
  192. }
  193. info := &grpc.UnaryServerInfo{
  194. Server: srv,
  195. FullMethod: "/transform.Transform/GetUser",
  196. }
  197. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  198. return srv.(TransformServer).GetUser(ctx, req.(*UserRequest))
  199. }
  200. return interceptor(ctx, in, info, handler)
  201. }
  202. var _Transform_serviceDesc = grpc.ServiceDesc{
  203. ServiceName: "transform.Transform",
  204. HandlerType: (*TransformServer)(nil),
  205. Methods: []grpc.MethodDesc{
  206. {
  207. MethodName: "GetUser",
  208. Handler: _Transform_GetUser_Handler,
  209. },
  210. },
  211. Streams: []grpc.StreamDesc{},
  212. Metadata: "transform.proto",
  213. }