Documentation
¶
Index ¶
- Variables
- func NewUserEndpoints() []*api.Endpoint
- func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
- type AllUser
- type FindAll
- type Response
- type Right
- type UserHandler
- type UserId
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetId() int64
- func (x *UserInfo) GetIsAdmin() bool
- func (x *UserInfo) GetUserEmail() string
- func (x *UserInfo) GetUserName() string
- func (x *UserInfo) GetUserPwd() string
- func (x *UserInfo) GetUserStatus() int32
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- type UserRight
- type UserRole
- type UserService
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 Right ¶
type Right struct { Access bool `protobuf:"varint,1,opt,name=access,proto3" json:"access,omitempty"` // contains filtered or unexported fields }
func (*Right) Descriptor
deprecated
func (*Right) ProtoMessage ¶
func (*Right) ProtoMessage()
func (*Right) ProtoReflect ¶
func (x *Right) 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 AddRole(context.Context, *UserRole, *Response) error UpdateRole(context.Context, *UserRole, *Response) error DeleteRole(context.Context, *UserRole, *Response) error IsRight(context.Context, *UserRight, *Right) 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"` UserName string `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` UserEmail string `protobuf:"bytes,3,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` IsAdmin bool `protobuf:"varint,4,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"` UserPwd string `protobuf:"bytes,5,opt,name=user_pwd,json=userPwd,proto3" json:"user_pwd,omitempty"` UserStatus int32 `protobuf:"varint,6,opt,name=user_status,json=userStatus,proto3" json:"user_status,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetIsAdmin ¶
func (*UserInfo) GetUserEmail ¶
func (*UserInfo) GetUserName ¶
func (*UserInfo) GetUserPwd ¶
func (*UserInfo) GetUserStatus ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserRight ¶
type UserRight struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` // contains filtered or unexported fields }
func (*UserRight) Descriptor
deprecated
func (*UserRight) ProtoMessage ¶
func (*UserRight) ProtoMessage()
func (*UserRight) ProtoReflect ¶
func (x *UserRight) ProtoReflect() protoreflect.Message
type UserRole ¶
type UserRole struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` RoleId []int64 `protobuf:"varint,2,rep,packed,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // contains filtered or unexported fields }
func (*UserRole) Descriptor
deprecated
func (*UserRole) ProtoMessage ¶
func (*UserRole) ProtoMessage()
func (*UserRole) ProtoReflect ¶
func (x *UserRole) 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) AddRole(ctx context.Context, in *UserRole, opts ...client.CallOption) (*Response, error) UpdateRole(ctx context.Context, in *UserRole, opts ...client.CallOption) (*Response, error) DeleteRole(ctx context.Context, in *UserRole, opts ...client.CallOption) (*Response, error) IsRight(ctx context.Context, in *UserRight, opts ...client.CallOption) (*Right, error) }
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
Click to show internal directories.
Click to hide internal directories.