user

package
v0.0.0-...-895b57c Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_user_user_proto protoreflect.FileDescriptor

Functions

func NewUserEndpoints

func NewUserEndpoints() []*api.Endpoint

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) Descriptor() ([]byte, []int)

Deprecated: Use AllUser.ProtoReflect.Descriptor instead.

func (*AllUser) GetUserInfo

func (x *AllUser) GetUserInfo() []*UserInfo

func (*AllUser) ProtoMessage

func (*AllUser) ProtoMessage()

func (*AllUser) ProtoReflect

func (x *AllUser) ProtoReflect() protoreflect.Message

func (*AllUser) Reset

func (x *AllUser) Reset()

func (*AllUser) String

func (x *AllUser) String() string

type FindAll

type FindAll struct {
	// contains filtered or unexported fields
}

func (*FindAll) Descriptor deprecated

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

Deprecated: Use FindAll.ProtoReflect.Descriptor instead.

func (*FindAll) ProtoMessage

func (*FindAll) ProtoMessage()

func (*FindAll) ProtoReflect

func (x *FindAll) ProtoReflect() protoreflect.Message

func (*FindAll) Reset

func (x *FindAll) Reset()

func (*FindAll) String

func (x *FindAll) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMsg

func (x *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string
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) Descriptor() ([]byte, []int)

Deprecated: Use Right.ProtoReflect.Descriptor instead.

func (*Right) GetAccess

func (x *Right) GetAccess() bool

func (*Right) ProtoMessage

func (*Right) ProtoMessage()

func (*Right) ProtoReflect

func (x *Right) ProtoReflect() protoreflect.Message

func (*Right) Reset

func (x *Right) Reset()

func (*Right) String

func (x *Right) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use UserId.ProtoReflect.Descriptor instead.

func (*UserId) GetId

func (x *UserId) GetId() int64

func (*UserId) ProtoMessage

func (*UserId) ProtoMessage()

func (*UserId) ProtoReflect

func (x *UserId) ProtoReflect() protoreflect.Message

func (*UserId) Reset

func (x *UserId) Reset()

func (*UserId) String

func (x *UserId) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetId

func (x *UserInfo) GetId() int64

func (*UserInfo) GetIsAdmin

func (x *UserInfo) GetIsAdmin() bool

func (*UserInfo) GetUserEmail

func (x *UserInfo) GetUserEmail() string

func (*UserInfo) GetUserName

func (x *UserInfo) GetUserName() string

func (*UserInfo) GetUserPwd

func (x *UserInfo) GetUserPwd() string

func (*UserInfo) GetUserStatus

func (x *UserInfo) GetUserStatus() int32

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

func (x *UserInfo) ProtoReflect() protoreflect.Message

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use UserRight.ProtoReflect.Descriptor instead.

func (*UserRight) GetAction

func (x *UserRight) GetAction() string

func (*UserRight) GetUserId

func (x *UserRight) GetUserId() int64

func (*UserRight) ProtoMessage

func (*UserRight) ProtoMessage()

func (*UserRight) ProtoReflect

func (x *UserRight) ProtoReflect() protoreflect.Message

func (*UserRight) Reset

func (x *UserRight) Reset()

func (*UserRight) String

func (x *UserRight) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use UserRole.ProtoReflect.Descriptor instead.

func (*UserRole) GetRoleId

func (x *UserRole) GetRoleId() []int64

func (*UserRole) GetUserId

func (x *UserRole) GetUserId() int64

func (*UserRole) ProtoMessage

func (*UserRole) ProtoMessage()

func (*UserRole) ProtoReflect

func (x *UserRole) ProtoReflect() protoreflect.Message

func (*UserRole) Reset

func (x *UserRole) Reset()

func (*UserRole) String

func (x *UserRole) String() string

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

Jump to

Keyboard shortcuts

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