Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_user_user_proto protoreflect.FileDescriptor
Functions ¶
func NewUserEndpoints ¶
func RegisterUserHandler ¶
func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
Types ¶
type AllUser ¶
type AllUser struct { UserInfo []*UserInfo `protobuf:"bytes,1,rep,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` // contains filtered or unexported fields }
func (*AllUser) Descriptor
deprecated
func (*AllUser) GetUserInfo ¶
func (*AllUser) ProtoMessage ¶
func (*AllUser) ProtoMessage()
func (*AllUser) ProtoReflect ¶
func (x *AllUser) ProtoReflect() protoreflect.Message
type FindAll ¶
type FindAll struct {
// contains filtered or unexported fields
}
func (*FindAll) Descriptor
deprecated
func (*FindAll) ProtoMessage ¶
func (*FindAll) ProtoMessage()
func (*FindAll) ProtoReflect ¶
func (x *FindAll) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UserHandler ¶
type UserHandler interface { //对外提供添加服务 AddUser(context.Context, *UserInfo, *Response) error DeleteUser(context.Context, *UserId, *Response) error UpdateUser(context.Context, *UserInfo, *Response) error FindUserByID(context.Context, *UserId, *UserInfo) error FindAllUser(context.Context, *FindAll, *AllUser) error }
type UserId ¶
type UserId struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserId) Descriptor
deprecated
func (*UserId) ProtoMessage ¶
func (*UserId) ProtoMessage()
func (*UserId) ProtoReflect ¶
func (x *UserId) ProtoReflect() protoreflect.Message
type UserInfo ¶
type UserInfo struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserService ¶
type UserService interface { //对外提供添加服务 AddUser(ctx context.Context, in *UserInfo, opts ...client.CallOption) (*Response, error) DeleteUser(ctx context.Context, in *UserId, opts ...client.CallOption) (*Response, error) UpdateUser(ctx context.Context, in *UserInfo, opts ...client.CallOption) (*Response, error) FindUserByID(ctx context.Context, in *UserId, opts ...client.CallOption) (*UserInfo, error) FindAllUser(ctx context.Context, in *FindAll, opts ...client.CallOption) (*AllUser, error) }
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
Click to show internal directories.
Click to hide internal directories.