| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: transform.proto
- package transform
- import (
- context "context"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- math "math"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
- type UserRequest struct {
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
- func (m *UserRequest) Reset() { *m = UserRequest{} }
- func (m *UserRequest) String() string { return proto.CompactTextString(m) }
- func (*UserRequest) ProtoMessage() {}
- func (*UserRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_cb4a498eeb2ba07d, []int{0}
- }
- func (m *UserRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserRequest.Unmarshal(m, b)
- }
- func (m *UserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserRequest.Marshal(b, m, deterministic)
- }
- func (m *UserRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserRequest.Merge(m, src)
- }
- func (m *UserRequest) XXX_Size() int {
- return xxx_messageInfo_UserRequest.Size(m)
- }
- func (m *UserRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_UserRequest.DiscardUnknown(m)
- }
- var xxx_messageInfo_UserRequest proto.InternalMessageInfo
- func (m *UserRequest) GetId() string {
- if m != nil {
- return m.Id
- }
- return ""
- }
- func (m *UserRequest) GetPhone() string {
- if m != nil {
- return m.Phone
- }
- return ""
- }
- type UserResponse struct {
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
- Roles string `protobuf:"bytes,3,opt,name=roles,proto3" json:"roles,omitempty"`
- Status int64 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
- ErpRoleType int64 `protobuf:"varint,5,opt,name=erpRoleType,proto3" json:"erpRoleType,omitempty"`
- UserName string `protobuf:"bytes,6,opt,name=userName,proto3" json:"userName,omitempty"`
- CityName string `protobuf:"bytes,7,opt,name=cityName,proto3" json:"cityName,omitempty"`
- Gender int64 `protobuf:"varint,8,opt,name=gender,proto3" json:"gender,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
- func (m *UserResponse) Reset() { *m = UserResponse{} }
- func (m *UserResponse) String() string { return proto.CompactTextString(m) }
- func (*UserResponse) ProtoMessage() {}
- func (*UserResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_cb4a498eeb2ba07d, []int{1}
- }
- func (m *UserResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UserResponse.Unmarshal(m, b)
- }
- func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UserResponse.Marshal(b, m, deterministic)
- }
- func (m *UserResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UserResponse.Merge(m, src)
- }
- func (m *UserResponse) XXX_Size() int {
- return xxx_messageInfo_UserResponse.Size(m)
- }
- func (m *UserResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_UserResponse.DiscardUnknown(m)
- }
- var xxx_messageInfo_UserResponse proto.InternalMessageInfo
- func (m *UserResponse) GetId() string {
- if m != nil {
- return m.Id
- }
- return ""
- }
- func (m *UserResponse) GetPhone() string {
- if m != nil {
- return m.Phone
- }
- return ""
- }
- func (m *UserResponse) GetRoles() string {
- if m != nil {
- return m.Roles
- }
- return ""
- }
- func (m *UserResponse) GetStatus() int64 {
- if m != nil {
- return m.Status
- }
- return 0
- }
- func (m *UserResponse) GetErpRoleType() int64 {
- if m != nil {
- return m.ErpRoleType
- }
- return 0
- }
- func (m *UserResponse) GetUserName() string {
- if m != nil {
- return m.UserName
- }
- return ""
- }
- func (m *UserResponse) GetCityName() string {
- if m != nil {
- return m.CityName
- }
- return ""
- }
- func (m *UserResponse) GetGender() int64 {
- if m != nil {
- return m.Gender
- }
- 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{
- // 287 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbd, 0x4e, 0xc3, 0x30,
- 0x14, 0x85, 0x95, 0x94, 0xa4, 0xcd, 0x6d, 0x01, 0xc9, 0xaa, 0x82, 0x95, 0x29, 0x8a, 0x90, 0xe8,
- 0xd4, 0x81, 0x6e, 0x2c, 0x8c, 0x88, 0x05, 0xa1, 0x28, 0x3c, 0x40, 0x20, 0x17, 0x88, 0x68, 0x63,
- 0xe3, 0xeb, 0x0c, 0x7d, 0x03, 0x1e, 0x90, 0x07, 0x42, 0xfe, 0x49, 0x89, 0xd4, 0xa5, 0xe3, 0x77,
- 0x8e, 0xed, 0xe3, 0x7b, 0x2e, 0x5c, 0x6a, 0x55, 0x77, 0xf4, 0x2e, 0xd4, 0x6e, 0x2d, 0x95, 0xd0,
- 0x82, 0x25, 0x07, 0xa1, 0xd8, 0xc0, 0xfc, 0x85, 0x50, 0x95, 0xf8, 0xdd, 0x23, 0x69, 0x76, 0x01,
- 0x61, 0xdb, 0xf0, 0x20, 0x0f, 0x56, 0x49, 0x19, 0xb6, 0x0d, 0x5b, 0x42, 0x24, 0x3f, 0x45, 0x87,
- 0x3c, 0xb4, 0x92, 0x83, 0xe2, 0x37, 0x80, 0x85, 0xbb, 0x45, 0x52, 0x74, 0x84, 0xa7, 0x5d, 0x33,
- 0xaa, 0x12, 0x5b, 0x24, 0x3e, 0x71, 0xaa, 0x05, 0x96, 0x42, 0x4c, 0xba, 0xd6, 0x3d, 0xf1, 0xb3,
- 0x3c, 0x58, 0x4d, 0x4a, 0x4f, 0x2c, 0x87, 0x39, 0x2a, 0x59, 0x8a, 0x2d, 0x56, 0x7b, 0x89, 0x3c,
- 0xb2, 0xe6, 0x58, 0x62, 0x19, 0xcc, 0x7a, 0x42, 0xf5, 0x54, 0xef, 0x90, 0xc7, 0xf6, 0xc9, 0x03,
- 0x1b, 0xef, 0xad, 0xd5, 0x7b, 0xeb, 0x4d, 0x9d, 0x37, 0xb0, 0x49, 0xfc, 0xc0, 0xae, 0x41, 0xc5,
- 0x67, 0x2e, 0xd1, 0x51, 0x71, 0x0d, 0x8b, 0x4a, 0x7c, 0x61, 0x37, 0x94, 0xb1, 0x84, 0x48, 0x1b,
- 0xf6, 0x83, 0x39, 0x28, 0x6e, 0xe0, 0xdc, 0x9f, 0xf2, 0xc3, 0xa7, 0x10, 0x9b, 0x32, 0x1e, 0x87,
- 0x02, 0x3c, 0xdd, 0xfe, 0x04, 0x90, 0x54, 0x43, 0xd1, 0xec, 0x0e, 0xa6, 0x0f, 0xa8, 0x8d, 0xc5,
- 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.
- var _ context.Context
- var _ grpc.ClientConn
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion4
- // TransformClient is the client API for Transform service.
- //
- // 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 {
- cc *grpc.ClientConn
- }
- func NewTransformClient(cc *grpc.ClientConn) TransformClient {
- return &transformClient{cc}
- }
- func (c *transformClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) {
- out := new(UserResponse)
- err := c.cc.Invoke(ctx, "/transform.Transform/GetUser", in, out, opts...)
- if err != nil {
- return nil, err
- }
- 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.
- 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)
- }
- func _Transform_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UserRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(TransformServer).GetUser(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/transform.Transform/GetUser",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(TransformServer).GetUser(ctx, req.(*UserRequest))
- }
- 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),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GetUser",
- Handler: _Transform_GetUser_Handler,
- },
- {
- MethodName: "ParseToken",
- Handler: _Transform_ParseToken_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "transform.proto",
- }
|