proto

package
v0.1.0-2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)

Types

type BaseResponse

type BaseResponse struct {
	Code                 int32    `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BaseResponse) Descriptor

func (*BaseResponse) Descriptor() ([]byte, []int)

func (*BaseResponse) GetCode

func (m *BaseResponse) GetCode() int32

func (*BaseResponse) GetMessage

func (m *BaseResponse) GetMessage() string

func (*BaseResponse) ProtoMessage

func (*BaseResponse) ProtoMessage()

func (*BaseResponse) Reset

func (m *BaseResponse) Reset()

func (*BaseResponse) String

func (m *BaseResponse) String() string

func (*BaseResponse) XXX_DiscardUnknown

func (m *BaseResponse) XXX_DiscardUnknown()

func (*BaseResponse) XXX_Marshal

func (m *BaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BaseResponse) XXX_Merge

func (m *BaseResponse) XXX_Merge(src proto.Message)

func (*BaseResponse) XXX_Size

func (m *BaseResponse) XXX_Size() int

func (*BaseResponse) XXX_Unmarshal

func (m *BaseResponse) XXX_Unmarshal(b []byte) error

type SearchUserParam

type SearchUserParam struct {
	Id                   int32    `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Mobile               string   `protobuf:"bytes,2,opt,name=Mobile,proto3" json:"Mobile,omitempty"`
	IdCard               string   `protobuf:"bytes,3,opt,name=IdCard,proto3" json:"IdCard,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SearchUserParam) Descriptor

func (*SearchUserParam) Descriptor() ([]byte, []int)

func (*SearchUserParam) GetId

func (m *SearchUserParam) GetId() int32

func (*SearchUserParam) GetIdCard

func (m *SearchUserParam) GetIdCard() string

func (*SearchUserParam) GetMobile

func (m *SearchUserParam) GetMobile() string

func (*SearchUserParam) ProtoMessage

func (*SearchUserParam) ProtoMessage()

func (*SearchUserParam) Reset

func (m *SearchUserParam) Reset()

func (*SearchUserParam) String

func (m *SearchUserParam) String() string

func (*SearchUserParam) XXX_DiscardUnknown

func (m *SearchUserParam) XXX_DiscardUnknown()

func (*SearchUserParam) XXX_Marshal

func (m *SearchUserParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchUserParam) XXX_Merge

func (m *SearchUserParam) XXX_Merge(src proto.Message)

func (*SearchUserParam) XXX_Size

func (m *SearchUserParam) XXX_Size() int

func (*SearchUserParam) XXX_Unmarshal

func (m *SearchUserParam) XXX_Unmarshal(b []byte) error

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserServiceServer) Add

func (*UnimplementedUserServiceServer) Get

func (*UnimplementedUserServiceServer) List

type User

type User struct {
	Id                   int32    `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Age                  int32    `protobuf:"varint,3,opt,name=Age,proto3" json:"Age,omitempty"`
	Sex                  bool     `protobuf:"varint,4,opt,name=Sex,proto3" json:"Sex,omitempty"`
	Mobile               string   `protobuf:"bytes,5,opt,name=Mobile,proto3" json:"Mobile,omitempty"`
	IdCard               string   `protobuf:"bytes,6,opt,name=IdCard,proto3" json:"IdCard,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (*User) GetAge

func (m *User) GetAge() int32

func (*User) GetId

func (m *User) GetId() int32

func (*User) GetIdCard

func (m *User) GetIdCard() string

func (*User) GetMobile

func (m *User) GetMobile() string

func (*User) GetName

func (m *User) GetName() string

func (*User) GetSex

func (m *User) GetSex() bool

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type UserAddInfo

type UserAddInfo struct {
	Name                 string   `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Age                  int32    `protobuf:"varint,3,opt,name=Age,proto3" json:"Age,omitempty"`
	Sex                  bool     `protobuf:"varint,4,opt,name=Sex,proto3" json:"Sex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserAddInfo) Descriptor

func (*UserAddInfo) Descriptor() ([]byte, []int)

func (*UserAddInfo) GetAge

func (m *UserAddInfo) GetAge() int32

func (*UserAddInfo) GetName

func (m *UserAddInfo) GetName() string

func (*UserAddInfo) GetSex

func (m *UserAddInfo) GetSex() bool

func (*UserAddInfo) ProtoMessage

func (*UserAddInfo) ProtoMessage()

func (*UserAddInfo) Reset

func (m *UserAddInfo) Reset()

func (*UserAddInfo) String

func (m *UserAddInfo) String() string

func (*UserAddInfo) XXX_DiscardUnknown

func (m *UserAddInfo) XXX_DiscardUnknown()

func (*UserAddInfo) XXX_Marshal

func (m *UserAddInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserAddInfo) XXX_Merge

func (m *UserAddInfo) XXX_Merge(src proto.Message)

func (*UserAddInfo) XXX_Size

func (m *UserAddInfo) XXX_Size() int

func (*UserAddInfo) XXX_Unmarshal

func (m *UserAddInfo) XXX_Unmarshal(b []byte) error

type UserList

type UserList struct {
	Index                int32    `protobuf:"varint,2,opt,name=Index,proto3" json:"Index,omitempty"`
	PageSize             int32    `protobuf:"varint,3,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
	Count                int32    `protobuf:"varint,4,opt,name=Count,proto3" json:"Count,omitempty"`
	Users                []*User  `protobuf:"bytes,5,rep,name=users,proto3" json:"users,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserList) Descriptor

func (*UserList) Descriptor() ([]byte, []int)

func (*UserList) GetCount

func (m *UserList) GetCount() int32

func (*UserList) GetIndex

func (m *UserList) GetIndex() int32

func (*UserList) GetPageSize

func (m *UserList) GetPageSize() int32

func (*UserList) GetUsers

func (m *UserList) GetUsers() []*User

func (*UserList) ProtoMessage

func (*UserList) ProtoMessage()

func (*UserList) Reset

func (m *UserList) Reset()

func (*UserList) String

func (m *UserList) String() string

func (*UserList) XXX_DiscardUnknown

func (m *UserList) XXX_DiscardUnknown()

func (*UserList) XXX_Marshal

func (m *UserList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserList) XXX_Merge

func (m *UserList) XXX_Merge(src proto.Message)

func (*UserList) XXX_Size

func (m *UserList) XXX_Size() int

func (*UserList) XXX_Unmarshal

func (m *UserList) XXX_Unmarshal(b []byte) error

type UserService added in v0.0.8

type UserService struct {
}

func (*UserService) Add added in v0.0.8

添加用户

func (*UserService) Get added in v0.0.8

获取指定用户接口

func (*UserService) List added in v0.0.8

获取用户列表,分页

type UserServiceClient

type UserServiceClient interface {
	//获取指定用户接口
	Get(ctx context.Context, in *SearchUserParam, opts ...grpc.CallOption) (*User, error)
	//获取用户列表,分页
	List(ctx context.Context, in *SearchUserParam, opts ...grpc.CallOption) (*UserList, error)
	//添加用户
	Add(ctx context.Context, in *UserAddInfo, opts ...grpc.CallOption) (*BaseResponse, error)
}

UserServiceClient is the client API for UserService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUserServiceClient

func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient

type UserServiceServer

type UserServiceServer interface {
	//获取指定用户接口
	Get(context.Context, *SearchUserParam) (*User, error)
	//获取用户列表,分页
	List(context.Context, *SearchUserParam) (*UserList, error)
	//添加用户
	Add(context.Context, *UserAddInfo) (*BaseResponse, error)
}

UserServiceServer is the server API for UserService service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL