user

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserClient_Login_FullMethodName    = "/user.UserClient/Login"
	UserClient_UpPass_FullMethodName   = "/user.UserClient/UpPass"
	UserClient_UserAdd_FullMethodName  = "/user.UserClient/UserAdd"
	UserClient_UserEdit_FullMethodName = "/user.UserClient/UserEdit"
	UserClient_UserDel_FullMethodName  = "/user.UserClient/UserDel"
	UserClient_UserList_FullMethodName = "/user.UserClient/UserList"
)

Variables

View Source
var (
	SorterParam_Order_name = map[int32]string{
		0: "ASC",
		1: "DESC",
	}
	SorterParam_Order_value = map[string]int32{
		"ASC":  0,
		"DESC": 1,
	}
)

Enum value maps for SorterParam_Order.

View Source
var UserClient_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserClient",
	HandlerType: (*UserClientServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _UserClient_Login_Handler,
		},
		{
			MethodName: "UpPass",
			Handler:    _UserClient_UpPass_Handler,
		},
		{
			MethodName: "UserAdd",
			Handler:    _UserClient_UserAdd_Handler,
		},
		{
			MethodName: "UserEdit",
			Handler:    _UserClient_UserEdit_Handler,
		},
		{
			MethodName: "UserDel",
			Handler:    _UserClient_UserDel_Handler,
		},
		{
			MethodName: "UserList",
			Handler:    _UserClient_UserList_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.rpcFlag",
}

UserClient_ServiceDesc is the grpc.ServiceDesc for UserClient service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterUserClientServer

func RegisterUserClientServer(s grpc.ServiceRegistrar, srv UserClientServer)

Types

type LoginReq

type LoginReq struct {
	Account     string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Pass        string `protobuf:"bytes,2,opt,name=pass,proto3" json:"pass,omitempty"`
	LoginMethod string `protobuf:"bytes,3,opt,name=loginMethod,proto3" json:"loginMethod,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReq) Descriptor deprecated

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

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetAccount

func (x *LoginReq) GetAccount() string

func (*LoginReq) GetLoginMethod

func (x *LoginReq) GetLoginMethod() string

func (*LoginReq) GetPass

func (x *LoginReq) GetPass() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

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

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

type LoginResp

type LoginResp struct {
	Result *Status `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	User   *User   `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResp) Descriptor deprecated

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

Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.

func (*LoginResp) GetResult

func (x *LoginResp) GetResult() *Status

func (*LoginResp) GetUser

func (x *LoginResp) GetUser() *User

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) ProtoReflect

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

func (*LoginResp) Reset

func (x *LoginResp) Reset()

func (*LoginResp) String

func (x *LoginResp) String() string

type PageParam

type PageParam struct {
	PageNum  int32 `protobuf:"varint,1,opt,name=pageNum,proto3" json:"pageNum,omitempty"`   //当前页
	PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //查询数量
	// contains filtered or unexported fields
}

func (*PageParam) Descriptor deprecated

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

Deprecated: Use PageParam.ProtoReflect.Descriptor instead.

func (*PageParam) GetPageNum

func (x *PageParam) GetPageNum() int32

func (*PageParam) GetPageSize

func (x *PageParam) GetPageSize() int32

func (*PageParam) ProtoMessage

func (*PageParam) ProtoMessage()

func (*PageParam) ProtoReflect

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

func (*PageParam) Reset

func (x *PageParam) Reset()

func (*PageParam) String

func (x *PageParam) String() string

type SorterParam

type SorterParam struct {
	Field string            `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`                              //排序字段
	Order SorterParam_Order `protobuf:"varint,2,opt,name=order,proto3,enum=user.SorterParam_Order" json:"order,omitempty"` //排序方式
	// contains filtered or unexported fields
}

func (*SorterParam) Descriptor deprecated

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

Deprecated: Use SorterParam.ProtoReflect.Descriptor instead.

func (*SorterParam) GetField

func (x *SorterParam) GetField() string

func (*SorterParam) GetOrder

func (x *SorterParam) GetOrder() SorterParam_Order

func (*SorterParam) ProtoMessage

func (*SorterParam) ProtoMessage()

func (*SorterParam) ProtoReflect

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

func (*SorterParam) Reset

func (x *SorterParam) Reset()

func (*SorterParam) String

func (x *SorterParam) String() string

type SorterParam_Order

type SorterParam_Order int32
const (
	SorterParam_ASC  SorterParam_Order = 0 //升序
	SorterParam_DESC SorterParam_Order = 1 //降序
)

func (SorterParam_Order) Descriptor

func (SorterParam_Order) Enum

func (SorterParam_Order) EnumDescriptor deprecated

func (SorterParam_Order) EnumDescriptor() ([]byte, []int)

Deprecated: Use SorterParam_Order.Descriptor instead.

func (SorterParam_Order) Number

func (SorterParam_Order) String

func (x SorterParam_Order) String() string

func (SorterParam_Order) Type

type Status

type Status struct {
	Code     uint64            `protobuf:"varint,1,opt,name=code,json=code,required,proto3" json:"code,omitempty"`
	Reason   string            `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	Message  string            `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCode

func (x *Status) GetCode() uint64

func (*Status) GetMessage

func (x *Status) GetMessage() string

func (*Status) GetMetadata

func (x *Status) GetMetadata() map[string]string

func (*Status) GetReason

func (x *Status) GetReason() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type UnimplementedUserClientServer

type UnimplementedUserClientServer struct {
}

UnimplementedUserClientServer must be embedded to have forward compatible implementations.

func (UnimplementedUserClientServer) Login

func (UnimplementedUserClientServer) UpPass

func (UnimplementedUserClientServer) UserAdd

func (UnimplementedUserClientServer) UserDel

func (UnimplementedUserClientServer) UserEdit

func (UnimplementedUserClientServer) UserList

type UnsafeUserClientServer

type UnsafeUserClientServer interface {
	// contains filtered or unexported methods
}

UnsafeUserClientServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserClientServer will result in compilation errors.

type UpPassReq

type UpPassReq struct {
	Account  string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*UpPassReq) Descriptor deprecated

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

Deprecated: Use UpPassReq.ProtoReflect.Descriptor instead.

func (*UpPassReq) GetAccount

func (x *UpPassReq) GetAccount() string

func (*UpPassReq) GetPassword

func (x *UpPassReq) GetPassword() string

func (*UpPassReq) ProtoMessage

func (*UpPassReq) ProtoMessage()

func (*UpPassReq) ProtoReflect

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

func (*UpPassReq) Reset

func (x *UpPassReq) Reset()

func (*UpPassReq) String

func (x *UpPassReq) String() string

type UpPassResp

type UpPassResp struct {
	Result *Status `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*UpPassResp) Descriptor deprecated

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

Deprecated: Use UpPassResp.ProtoReflect.Descriptor instead.

func (*UpPassResp) GetResult

func (x *UpPassResp) GetResult() *Status

func (*UpPassResp) ProtoMessage

func (*UpPassResp) ProtoMessage()

func (*UpPassResp) ProtoReflect

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

func (*UpPassResp) Reset

func (x *UpPassResp) Reset()

func (*UpPassResp) String

func (x *UpPassResp) String() string

type User

type User struct {
	IsTrusted  bool     `protobuf:"varint,14,opt,name=isTrusted,proto3" json:"isTrusted,omitempty"`
	Id         uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	OrgID      int64    `protobuf:"varint,2,opt,name=orgID,proto3" json:"orgID,omitempty"`
	RoleID     uint64   `protobuf:"varint,11,opt,name=roleID,proto3" json:"roleID,omitempty"`
	UserType   uint32   `protobuf:"varint,3,opt,name=userType,proto3" json:"userType,omitempty"`
	OrgName    string   `protobuf:"bytes,12,opt,name=orgName,proto3" json:"orgName,omitempty"`
	RoleName   string   `protobuf:"bytes,13,opt,name=roleName,proto3" json:"roleName,omitempty"`
	Account    string   `protobuf:"bytes,4,opt,name=account,proto3" json:"account,omitempty"`
	Name       string   `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	Pass       string   `protobuf:"bytes,6,opt,name=pass,proto3" json:"pass,omitempty"`
	Gender     string   `protobuf:"bytes,7,opt,name=gender,proto3" json:"gender,omitempty"`
	Mobile     string   `protobuf:"bytes,8,opt,name=mobile,proto3" json:"mobile,omitempty"`
	Phone      string   `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"`
	LoginCount int64    `protobuf:"varint,15,opt,name=loginCount,proto3" json:"loginCount,omitempty"`
	Keys       []string `protobuf:"bytes,10,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAccount

func (x *User) GetAccount() string

func (*User) GetGender

func (x *User) GetGender() string

func (*User) GetId

func (x *User) GetId() uint64

func (*User) GetIsTrusted

func (x *User) GetIsTrusted() bool

func (*User) GetKeys

func (x *User) GetKeys() []string

func (*User) GetLoginCount

func (x *User) GetLoginCount() int64

func (*User) GetMobile

func (x *User) GetMobile() string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetOrgID

func (x *User) GetOrgID() int64

func (*User) GetOrgName

func (x *User) GetOrgName() string

func (*User) GetPass

func (x *User) GetPass() string

func (*User) GetPhone

func (x *User) GetPhone() string

func (*User) GetRoleID

func (x *User) GetRoleID() uint64

func (*User) GetRoleName

func (x *User) GetRoleName() string

func (*User) GetUserType

func (x *User) GetUserType() uint32

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserAddReq

type UserAddReq struct {
	UserData *User `protobuf:"bytes,1,opt,name=userData,proto3" json:"userData,omitempty"`
	// contains filtered or unexported fields
}

func (*UserAddReq) Descriptor deprecated

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

Deprecated: Use UserAddReq.ProtoReflect.Descriptor instead.

func (*UserAddReq) GetUserData

func (x *UserAddReq) GetUserData() *User

func (*UserAddReq) ProtoMessage

func (*UserAddReq) ProtoMessage()

func (*UserAddReq) ProtoReflect

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

func (*UserAddReq) Reset

func (x *UserAddReq) Reset()

func (*UserAddReq) String

func (x *UserAddReq) String() string

type UserClientClient

type UserClientClient interface {
	// 用户配置
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
	UpPass(ctx context.Context, in *UpPassReq, opts ...grpc.CallOption) (*UpPassResp, error)
	UserAdd(ctx context.Context, in *UserAddReq, opts ...grpc.CallOption) (*UserResp, error)
	UserEdit(ctx context.Context, in *UserEditReq, opts ...grpc.CallOption) (*UserResp, error)
	UserDel(ctx context.Context, in *UserDelReq, opts ...grpc.CallOption) (*UserResp, error)
	UserList(ctx context.Context, in *UserListReq, opts ...grpc.CallOption) (*UserListResp, error)
}

UserClientClient is the client API for UserClient service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewUserClientClient

func NewUserClientClient(cc grpc.ClientConnInterface) UserClientClient

type UserClientServer

type UserClientServer interface {
	// 用户配置
	Login(context.Context, *LoginReq) (*LoginResp, error)
	UpPass(context.Context, *UpPassReq) (*UpPassResp, error)
	UserAdd(context.Context, *UserAddReq) (*UserResp, error)
	UserEdit(context.Context, *UserEditReq) (*UserResp, error)
	UserDel(context.Context, *UserDelReq) (*UserResp, error)
	UserList(context.Context, *UserListReq) (*UserListResp, error)
	// contains filtered or unexported methods
}

UserClientServer is the server API for UserClient service. All implementations must embed UnimplementedUserClientServer for forward compatibility

type UserDelReq

type UserDelReq struct {
	Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*UserDelReq) Descriptor deprecated

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

Deprecated: Use UserDelReq.ProtoReflect.Descriptor instead.

func (*UserDelReq) GetIds

func (x *UserDelReq) GetIds() []uint64

func (*UserDelReq) ProtoMessage

func (*UserDelReq) ProtoMessage()

func (*UserDelReq) ProtoReflect

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

func (*UserDelReq) Reset

func (x *UserDelReq) Reset()

func (*UserDelReq) String

func (x *UserDelReq) String() string

type UserEditReq

type UserEditReq struct {
	UserData *User `protobuf:"bytes,1,opt,name=userData,proto3" json:"userData,omitempty"`
	// contains filtered or unexported fields
}

func (*UserEditReq) Descriptor deprecated

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

Deprecated: Use UserEditReq.ProtoReflect.Descriptor instead.

func (*UserEditReq) GetUserData

func (x *UserEditReq) GetUserData() *User

func (*UserEditReq) ProtoMessage

func (*UserEditReq) ProtoMessage()

func (*UserEditReq) ProtoReflect

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

func (*UserEditReq) Reset

func (x *UserEditReq) Reset()

func (*UserEditReq) String

func (x *UserEditReq) String() string

type UserListReq

type UserListReq struct {
	Page *PageParam `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*UserListReq) Descriptor deprecated

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

Deprecated: Use UserListReq.ProtoReflect.Descriptor instead.

func (*UserListReq) GetPage

func (x *UserListReq) GetPage() *PageParam

func (*UserListReq) ProtoMessage

func (*UserListReq) ProtoMessage()

func (*UserListReq) ProtoReflect

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

func (*UserListReq) Reset

func (x *UserListReq) Reset()

func (*UserListReq) String

func (x *UserListReq) String() string

type UserListResp

type UserListResp struct {
	Result   *Status `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	Total    int64   `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	UserList []*User `protobuf:"bytes,3,rep,name=userList,proto3" json:"userList,omitempty"`
	// contains filtered or unexported fields
}

func (*UserListResp) Descriptor deprecated

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

Deprecated: Use UserListResp.ProtoReflect.Descriptor instead.

func (*UserListResp) GetResult

func (x *UserListResp) GetResult() *Status

func (*UserListResp) GetTotal

func (x *UserListResp) GetTotal() int64

func (*UserListResp) GetUserList

func (x *UserListResp) GetUserList() []*User

func (*UserListResp) ProtoMessage

func (*UserListResp) ProtoMessage()

func (*UserListResp) ProtoReflect

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

func (*UserListResp) Reset

func (x *UserListResp) Reset()

func (*UserListResp) String

func (x *UserListResp) String() string

type UserResp

type UserResp struct {
	Result *Status `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*UserResp) Descriptor deprecated

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

Deprecated: Use UserResp.ProtoReflect.Descriptor instead.

func (*UserResp) GetResult

func (x *UserResp) GetResult() *Status

func (*UserResp) ProtoMessage

func (*UserResp) ProtoMessage()

func (*UserResp) ProtoReflect

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

func (*UserResp) Reset

func (x *UserResp) Reset()

func (*UserResp) String

func (x *UserResp) String() string

Jump to

Keyboard shortcuts

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