Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterUserClientServer(s grpc.ServiceRegistrar, srv UserClientServer)
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) GetAccount() string
- func (x *LoginReq) GetLoginMethod() string
- func (x *LoginReq) GetPass() string
- func (*LoginReq) ProtoMessage()
- func (x *LoginReq) ProtoReflect() protoreflect.Message
- func (x *LoginReq) Reset()
- func (x *LoginReq) String() string
- type LoginResp
- type PageParam
- type SorterParam
- func (*SorterParam) Descriptor() ([]byte, []int)deprecated
- func (x *SorterParam) GetField() string
- func (x *SorterParam) GetOrder() SorterParam_Order
- func (*SorterParam) ProtoMessage()
- func (x *SorterParam) ProtoReflect() protoreflect.Message
- func (x *SorterParam) Reset()
- func (x *SorterParam) String() string
- type SorterParam_Order
- func (SorterParam_Order) Descriptor() protoreflect.EnumDescriptor
- func (x SorterParam_Order) Enum() *SorterParam_Order
- func (SorterParam_Order) EnumDescriptor() ([]byte, []int)deprecated
- func (x SorterParam_Order) Number() protoreflect.EnumNumber
- func (x SorterParam_Order) String() string
- func (SorterParam_Order) Type() protoreflect.EnumType
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetCode() uint64
- func (x *Status) GetMessage() string
- func (x *Status) GetMetadata() map[string]string
- func (x *Status) GetReason() string
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) String() string
- type UnimplementedUserClientServer
- func (UnimplementedUserClientServer) Login(context.Context, *LoginReq) (*LoginResp, error)
- func (UnimplementedUserClientServer) UpPass(context.Context, *UpPassReq) (*UpPassResp, error)
- func (UnimplementedUserClientServer) UserAdd(context.Context, *UserAddReq) (*UserResp, error)
- func (UnimplementedUserClientServer) UserDel(context.Context, *UserDelReq) (*UserResp, error)
- func (UnimplementedUserClientServer) UserEdit(context.Context, *UserEditReq) (*UserResp, error)
- func (UnimplementedUserClientServer) UserList(context.Context, *UserListReq) (*UserListResp, error)
- type UnsafeUserClientServer
- type UpPassReq
- type UpPassResp
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAccount() string
- func (x *User) GetGender() string
- func (x *User) GetId() uint64
- func (x *User) GetIsTrusted() bool
- func (x *User) GetKeys() []string
- func (x *User) GetLoginCount() int64
- func (x *User) GetMobile() string
- func (x *User) GetName() string
- func (x *User) GetOrgID() int64
- func (x *User) GetOrgName() string
- func (x *User) GetPass() string
- func (x *User) GetPhone() string
- func (x *User) GetRoleID() uint64
- func (x *User) GetRoleName() string
- func (x *User) GetUserType() uint32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserAddReq
- type UserClientClient
- type UserClientServer
- type UserDelReq
- type UserEditReq
- type UserListReq
- type UserListResp
- func (*UserListResp) Descriptor() ([]byte, []int)deprecated
- func (x *UserListResp) GetResult() *Status
- func (x *UserListResp) GetTotal() int64
- func (x *UserListResp) GetUserList() []*User
- func (*UserListResp) ProtoMessage()
- func (x *UserListResp) ProtoReflect() protoreflect.Message
- func (x *UserListResp) Reset()
- func (x *UserListResp) String() string
- type UserResp
Constants ¶
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 ¶
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.
var File_user_proto protoreflect.FileDescriptor
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) GetAccount ¶
func (*LoginReq) GetLoginMethod ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*LoginResp) ProtoMessage()
func (*LoginResp) ProtoReflect ¶
func (x *LoginResp) ProtoReflect() protoreflect.Message
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) GetPageNum ¶
func (*PageParam) GetPageSize ¶
func (*PageParam) ProtoMessage ¶
func (*PageParam) ProtoMessage()
func (*PageParam) ProtoReflect ¶
func (x *PageParam) ProtoReflect() protoreflect.Message
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) Descriptor() protoreflect.EnumDescriptor
func (SorterParam_Order) Enum ¶
func (x SorterParam_Order) Enum() *SorterParam_Order
func (SorterParam_Order) EnumDescriptor
deprecated
func (SorterParam_Order) EnumDescriptor() ([]byte, []int)
Deprecated: Use SorterParam_Order.Descriptor instead.
func (SorterParam_Order) Number ¶
func (x SorterParam_Order) Number() protoreflect.EnumNumber
func (SorterParam_Order) String ¶
func (x SorterParam_Order) String() string
func (SorterParam_Order) Type ¶
func (SorterParam_Order) Type() protoreflect.EnumType
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) GetMessage ¶
func (*Status) GetMetadata ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type UnimplementedUserClientServer ¶
type UnimplementedUserClientServer struct { }
UnimplementedUserClientServer must be embedded to have forward compatible implementations.
func (UnimplementedUserClientServer) UpPass ¶
func (UnimplementedUserClientServer) UpPass(context.Context, *UpPassReq) (*UpPassResp, error)
func (UnimplementedUserClientServer) UserAdd ¶
func (UnimplementedUserClientServer) UserAdd(context.Context, *UserAddReq) (*UserResp, error)
func (UnimplementedUserClientServer) UserDel ¶
func (UnimplementedUserClientServer) UserDel(context.Context, *UserDelReq) (*UserResp, error)
func (UnimplementedUserClientServer) UserEdit ¶
func (UnimplementedUserClientServer) UserEdit(context.Context, *UserEditReq) (*UserResp, error)
func (UnimplementedUserClientServer) UserList ¶
func (UnimplementedUserClientServer) UserList(context.Context, *UserListReq) (*UserListResp, error)
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) GetAccount ¶
func (*UpPassReq) GetPassword ¶
func (*UpPassReq) ProtoMessage ¶
func (*UpPassReq) ProtoMessage()
func (*UpPassReq) ProtoReflect ¶
func (x *UpPassReq) ProtoReflect() protoreflect.Message
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) GetAccount ¶
func (*User) GetIsTrusted ¶
func (*User) GetLoginCount ¶
func (*User) GetOrgName ¶
func (*User) GetRoleName ¶
func (*User) GetUserType ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*UserResp) ProtoMessage()
func (*UserResp) ProtoReflect ¶
func (x *UserResp) ProtoReflect() protoreflect.Message