Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type CreateUserReq
- func (*CreateUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserReq) GetName() string
- func (x *CreateUserReq) GetPassword() string
- func (x *CreateUserReq) GetRole() Role
- func (x *CreateUserReq) GetStatus() Status
- func (*CreateUserReq) ProtoMessage()
- func (x *CreateUserReq) ProtoReflect() protoreflect.Message
- func (x *CreateUserReq) Reset()
- func (x *CreateUserReq) String() string
- type Empty
- type GetUserIdReq
- type GetUserIdResp
- type GetUserInfoByNameReq
- func (*GetUserInfoByNameReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoByNameReq) GetFields() []string
- func (x *GetUserInfoByNameReq) GetName() string
- func (*GetUserInfoByNameReq) ProtoMessage()
- func (x *GetUserInfoByNameReq) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoByNameReq) Reset()
- func (x *GetUserInfoByNameReq) String() string
- type GetUserInfoReq
- func (*GetUserInfoReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoReq) GetFields() []string
- func (x *GetUserInfoReq) GetId() string
- func (*GetUserInfoReq) ProtoMessage()
- func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoReq) Reset()
- func (x *GetUserInfoReq) String() string
- type GetUserPasswordVersionReq
- func (*GetUserPasswordVersionReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserPasswordVersionReq) GetId() string
- func (*GetUserPasswordVersionReq) ProtoMessage()
- func (x *GetUserPasswordVersionReq) ProtoReflect() protoreflect.Message
- func (x *GetUserPasswordVersionReq) Reset()
- func (x *GetUserPasswordVersionReq) String() string
- type GetUserPasswordVersionResp
- func (*GetUserPasswordVersionResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserPasswordVersionResp) GetVersion() uint32
- func (*GetUserPasswordVersionResp) ProtoMessage()
- func (x *GetUserPasswordVersionResp) ProtoReflect() protoreflect.Message
- func (x *GetUserPasswordVersionResp) Reset()
- func (x *GetUserPasswordVersionResp) String() string
- type ListUserReq
- func (*ListUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserReq) GetId() string
- func (x *ListUserReq) GetName() string
- func (x *ListUserReq) GetPage() int32
- func (x *ListUserReq) GetRole() Role
- func (x *ListUserReq) GetSize() int32
- func (x *ListUserReq) GetStatus() Status
- func (*ListUserReq) ProtoMessage()
- func (x *ListUserReq) ProtoReflect() protoreflect.Message
- func (x *ListUserReq) Reset()
- func (x *ListUserReq) String() string
- type ListUserResp
- func (*ListUserResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserResp) GetTotal() int32
- func (x *ListUserResp) GetUsers() []*UserInfo
- func (*ListUserResp) ProtoMessage()
- func (x *ListUserResp) ProtoReflect() protoreflect.Message
- func (x *ListUserResp) Reset()
- func (x *ListUserResp) String() string
- type Role
- func (Role) Descriptor() protoreflect.EnumDescriptor
- func (x Role) Enum() *Role
- func (Role) EnumDescriptor() ([]byte, []int)deprecated
- func (u Role) IsAdmin() bool
- func (u Role) MarshalBinary() ([]byte, error)
- func (x Role) Number() protoreflect.EnumNumber
- func (u *Role) ScanRedis(s string) error
- func (x Role) String() string
- func (Role) Type() protoreflect.EnumType
- type SetUserNameReq
- func (*SetUserNameReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetUserNameReq) GetId() string
- func (x *SetUserNameReq) GetName() string
- func (*SetUserNameReq) ProtoMessage()
- func (x *SetUserNameReq) ProtoReflect() protoreflect.Message
- func (x *SetUserNameReq) Reset()
- func (x *SetUserNameReq) String() string
- type SetUserNameResp
- type SetUserPasswordReq
- func (*SetUserPasswordReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetUserPasswordReq) GetId() string
- func (x *SetUserPasswordReq) GetPassword() string
- func (*SetUserPasswordReq) ProtoMessage()
- func (x *SetUserPasswordReq) ProtoReflect() protoreflect.Message
- func (x *SetUserPasswordReq) Reset()
- func (x *SetUserPasswordReq) String() string
- type SetUserRoleReq
- func (*SetUserRoleReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetUserRoleReq) GetId() string
- func (x *SetUserRoleReq) GetRole() Role
- func (*SetUserRoleReq) ProtoMessage()
- func (x *SetUserRoleReq) ProtoReflect() protoreflect.Message
- func (x *SetUserRoleReq) Reset()
- func (x *SetUserRoleReq) String() string
- type SetUserStatusReq
- func (*SetUserStatusReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetUserStatusReq) GetId() string
- func (x *SetUserStatusReq) GetStatus() Status
- func (*SetUserStatusReq) ProtoMessage()
- func (x *SetUserStatusReq) ProtoReflect() protoreflect.Message
- func (x *SetUserStatusReq) Reset()
- func (x *SetUserStatusReq) String() string
- type Status
- func (Status) Descriptor() protoreflect.EnumDescriptor
- func (x Status) Enum() *Status
- func (Status) EnumDescriptor() ([]byte, []int)deprecated
- func (u Status) IsActice() bool
- func (u Status) IsInActive() bool
- func (u Status) MarshalBinary() ([]byte, error)
- func (x Status) Number() protoreflect.EnumNumber
- func (u *Status) ScanRedis(s string) error
- func (x Status) String() string
- func (Status) Type() protoreflect.EnumType
- type UnimplementedUserServer
- func (UnimplementedUserServer) CreateUser(context.Context, *CreateUserReq) (*UserInfo, error)
- func (UnimplementedUserServer) GetUserId(context.Context, *GetUserIdReq) (*GetUserIdResp, error)
- func (UnimplementedUserServer) GetUserInfo(context.Context, *GetUserInfoReq) (*UserInfo, error)
- func (UnimplementedUserServer) GetUserInfoByName(context.Context, *GetUserInfoByNameReq) (*UserInfo, error)
- func (UnimplementedUserServer) GetUserPasswordVersion(context.Context, *GetUserPasswordVersionReq) (*GetUserPasswordVersionResp, error)
- func (UnimplementedUserServer) ListUser(context.Context, *ListUserReq) (*ListUserResp, error)
- func (UnimplementedUserServer) SetUserName(context.Context, *SetUserNameReq) (*SetUserNameResp, error)
- func (UnimplementedUserServer) SetUserPassword(context.Context, *SetUserPasswordReq) (*Empty, error)
- func (UnimplementedUserServer) SetUserRole(context.Context, *SetUserRoleReq) (*Empty, error)
- func (UnimplementedUserServer) SetUserStatus(context.Context, *SetUserStatusReq) (*Empty, error)
- func (UnimplementedUserServer) ValidateUserPassword(context.Context, *ValidateUserPasswordReq) (*ValidateUserPasswordResp, error)
- type UnsafeUserServer
- type UserClient
- type UserHTTPClient
- type UserHTTPClientImpl
- func (c *UserHTTPClientImpl) CreateUser(ctx context.Context, in *CreateUserReq, opts ...http.CallOption) (*UserInfo, error)
- func (c *UserHTTPClientImpl) GetUserId(ctx context.Context, in *GetUserIdReq, opts ...http.CallOption) (*GetUserIdResp, error)
- func (c *UserHTTPClientImpl) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...http.CallOption) (*UserInfo, error)
- func (c *UserHTTPClientImpl) GetUserInfoByName(ctx context.Context, in *GetUserInfoByNameReq, opts ...http.CallOption) (*UserInfo, error)
- func (c *UserHTTPClientImpl) GetUserPasswordVersion(ctx context.Context, in *GetUserPasswordVersionReq, opts ...http.CallOption) (*GetUserPasswordVersionResp, error)
- func (c *UserHTTPClientImpl) ListUser(ctx context.Context, in *ListUserReq, opts ...http.CallOption) (*ListUserResp, error)
- func (c *UserHTTPClientImpl) SetUserName(ctx context.Context, in *SetUserNameReq, opts ...http.CallOption) (*SetUserNameResp, error)
- func (c *UserHTTPClientImpl) SetUserPassword(ctx context.Context, in *SetUserPasswordReq, opts ...http.CallOption) (*Empty, error)
- func (c *UserHTTPClientImpl) SetUserRole(ctx context.Context, in *SetUserRoleReq, opts ...http.CallOption) (*Empty, error)
- func (c *UserHTTPClientImpl) SetUserStatus(ctx context.Context, in *SetUserStatusReq, opts ...http.CallOption) (*Empty, error)
- func (c *UserHTTPClientImpl) ValidateUserPassword(ctx context.Context, in *ValidateUserPasswordReq, opts ...http.CallOption) (*ValidateUserPasswordResp, error)
- type UserHTTPServer
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetCreatedAt() int64
- func (x *UserInfo) GetId() string
- func (x *UserInfo) GetName() string
- func (x *UserInfo) GetRole() Role
- func (x *UserInfo) GetStatus() Status
- func (x *UserInfo) GetUpdatedAt() int64
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- type UserServer
- type ValidateUserPasswordReq
- func (*ValidateUserPasswordReq) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateUserPasswordReq) GetId() string
- func (x *ValidateUserPasswordReq) GetPassword() string
- func (*ValidateUserPasswordReq) ProtoMessage()
- func (x *ValidateUserPasswordReq) ProtoReflect() protoreflect.Message
- func (x *ValidateUserPasswordReq) Reset()
- func (x *ValidateUserPasswordReq) String() string
- type ValidateUserPasswordResp
- func (*ValidateUserPasswordResp) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateUserPasswordResp) GetValid() bool
- func (*ValidateUserPasswordResp) ProtoMessage()
- func (x *ValidateUserPasswordResp) ProtoReflect() protoreflect.Message
- func (x *ValidateUserPasswordResp) Reset()
- func (x *ValidateUserPasswordResp) String() string
Constants ¶
const ( User_CreateUser_FullMethodName = "/api.user.User/CreateUser" User_GetUserInfo_FullMethodName = "/api.user.User/GetUserInfo" User_GetUserInfoByName_FullMethodName = "/api.user.User/GetUserInfoByName" User_GetUserId_FullMethodName = "/api.user.User/GetUserId" User_ValidateUserPassword_FullMethodName = "/api.user.User/ValidateUserPassword" User_GetUserPasswordVersion_FullMethodName = "/api.user.User/GetUserPasswordVersion" User_SetUserPassword_FullMethodName = "/api.user.User/SetUserPassword" User_SetUserRole_FullMethodName = "/api.user.User/SetUserRole" User_SetUserStatus_FullMethodName = "/api.user.User/SetUserStatus" User_SetUserName_FullMethodName = "/api.user.User/SetUserName" User_ListUser_FullMethodName = "/api.user.User/ListUser" )
const OperationUserCreateUser = "/api.user.User/CreateUser"
const OperationUserGetUserId = "/api.user.User/GetUserId"
const OperationUserGetUserInfo = "/api.user.User/GetUserInfo"
const OperationUserGetUserInfoByName = "/api.user.User/GetUserInfoByName"
const OperationUserGetUserPasswordVersion = "/api.user.User/GetUserPasswordVersion"
const OperationUserListUser = "/api.user.User/ListUser"
const OperationUserSetUserName = "/api.user.User/SetUserName"
const OperationUserSetUserPassword = "/api.user.User/SetUserPassword"
const OperationUserSetUserRole = "/api.user.User/SetUserRole"
const OperationUserSetUserStatus = "/api.user.User/SetUserStatus"
const OperationUserValidateUserPassword = "/api.user.User/ValidateUserPassword"
Variables ¶
var ( Role_name = map[int32]string{ 0: "USER", 1: "ADMIN", } Role_value = map[string]int32{ "USER": 0, "ADMIN": 1, } )
Enum value maps for Role.
var ( Status_name = map[int32]string{ 0: "ACTIVE", 1: "INACTIVE", } Status_value = map[string]int32{ "ACTIVE": 0, "INACTIVE": 1, } )
Enum value maps for Status.
var File_user_user_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.user.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _User_CreateUser_Handler, }, { MethodName: "GetUserInfo", Handler: _User_GetUserInfo_Handler, }, { MethodName: "GetUserInfoByName", Handler: _User_GetUserInfoByName_Handler, }, { MethodName: "GetUserId", Handler: _User_GetUserId_Handler, }, { MethodName: "ValidateUserPassword", Handler: _User_ValidateUserPassword_Handler, }, { MethodName: "GetUserPasswordVersion", Handler: _User_GetUserPasswordVersion_Handler, }, { MethodName: "SetUserPassword", Handler: _User_SetUserPassword_Handler, }, { MethodName: "SetUserRole", Handler: _User_SetUserRole_Handler, }, { MethodName: "SetUserStatus", Handler: _User_SetUserStatus_Handler, }, { MethodName: "SetUserName", Handler: _User_SetUserName_Handler, }, { MethodName: "ListUser", Handler: _User_ListUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/user.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserHTTPServer ¶
func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type CreateUserReq ¶
type CreateUserReq struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
Role Role `protobuf:"varint,3,opt,name=role,proto3,enum=api.user.Role" json:"role,omitempty"`
Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=api.user.Status" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*CreateUserReq) Descriptor
deprecated
func (*CreateUserReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserReq.ProtoReflect.Descriptor instead.
func (*CreateUserReq) GetName ¶
func (x *CreateUserReq) GetName() string
func (*CreateUserReq) GetPassword ¶
func (x *CreateUserReq) GetPassword() string
func (*CreateUserReq) GetRole ¶
func (x *CreateUserReq) GetRole() Role
func (*CreateUserReq) GetStatus ¶
func (x *CreateUserReq) GetStatus() Status
func (*CreateUserReq) ProtoMessage ¶
func (*CreateUserReq) ProtoMessage()
func (*CreateUserReq) ProtoReflect ¶
func (x *CreateUserReq) ProtoReflect() protoreflect.Message
func (*CreateUserReq) Reset ¶
func (x *CreateUserReq) Reset()
func (*CreateUserReq) String ¶
func (x *CreateUserReq) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetUserIdReq ¶
type GetUserIdReq struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserIdReq) Descriptor
deprecated
func (*GetUserIdReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserIdReq.ProtoReflect.Descriptor instead.
func (*GetUserIdReq) GetName ¶
func (x *GetUserIdReq) GetName() string
func (*GetUserIdReq) ProtoMessage ¶
func (*GetUserIdReq) ProtoMessage()
func (*GetUserIdReq) ProtoReflect ¶
func (x *GetUserIdReq) ProtoReflect() protoreflect.Message
func (*GetUserIdReq) Reset ¶
func (x *GetUserIdReq) Reset()
func (*GetUserIdReq) String ¶
func (x *GetUserIdReq) String() string
type GetUserIdResp ¶
type GetUserIdResp struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserIdResp) Descriptor
deprecated
func (*GetUserIdResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserIdResp.ProtoReflect.Descriptor instead.
func (*GetUserIdResp) GetId ¶
func (x *GetUserIdResp) GetId() string
func (*GetUserIdResp) ProtoMessage ¶
func (*GetUserIdResp) ProtoMessage()
func (*GetUserIdResp) ProtoReflect ¶
func (x *GetUserIdResp) ProtoReflect() protoreflect.Message
func (*GetUserIdResp) Reset ¶
func (x *GetUserIdResp) Reset()
func (*GetUserIdResp) String ¶
func (x *GetUserIdResp) String() string
type GetUserInfoByNameReq ¶
type GetUserInfoByNameReq struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserInfoByNameReq) Descriptor
deprecated
func (*GetUserInfoByNameReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoByNameReq.ProtoReflect.Descriptor instead.
func (*GetUserInfoByNameReq) GetFields ¶
func (x *GetUserInfoByNameReq) GetFields() []string
func (*GetUserInfoByNameReq) GetName ¶
func (x *GetUserInfoByNameReq) GetName() string
func (*GetUserInfoByNameReq) ProtoMessage ¶
func (*GetUserInfoByNameReq) ProtoMessage()
func (*GetUserInfoByNameReq) ProtoReflect ¶
func (x *GetUserInfoByNameReq) ProtoReflect() protoreflect.Message
func (*GetUserInfoByNameReq) Reset ¶
func (x *GetUserInfoByNameReq) Reset()
func (*GetUserInfoByNameReq) String ¶
func (x *GetUserInfoByNameReq) String() string
type GetUserInfoReq ¶
type GetUserInfoReq struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserInfoReq) Descriptor
deprecated
func (*GetUserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead.
func (*GetUserInfoReq) GetFields ¶
func (x *GetUserInfoReq) GetFields() []string
func (*GetUserInfoReq) GetId ¶
func (x *GetUserInfoReq) GetId() string
func (*GetUserInfoReq) ProtoMessage ¶
func (*GetUserInfoReq) ProtoMessage()
func (*GetUserInfoReq) ProtoReflect ¶
func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
func (*GetUserInfoReq) Reset ¶
func (x *GetUserInfoReq) Reset()
func (*GetUserInfoReq) String ¶
func (x *GetUserInfoReq) String() string
type GetUserPasswordVersionReq ¶
type GetUserPasswordVersionReq struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserPasswordVersionReq) Descriptor
deprecated
func (*GetUserPasswordVersionReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserPasswordVersionReq.ProtoReflect.Descriptor instead.
func (*GetUserPasswordVersionReq) GetId ¶
func (x *GetUserPasswordVersionReq) GetId() string
func (*GetUserPasswordVersionReq) ProtoMessage ¶
func (*GetUserPasswordVersionReq) ProtoMessage()
func (*GetUserPasswordVersionReq) ProtoReflect ¶
func (x *GetUserPasswordVersionReq) ProtoReflect() protoreflect.Message
func (*GetUserPasswordVersionReq) Reset ¶
func (x *GetUserPasswordVersionReq) Reset()
func (*GetUserPasswordVersionReq) String ¶
func (x *GetUserPasswordVersionReq) String() string
type GetUserPasswordVersionResp ¶
type GetUserPasswordVersionResp struct {
Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserPasswordVersionResp) Descriptor
deprecated
func (*GetUserPasswordVersionResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserPasswordVersionResp.ProtoReflect.Descriptor instead.
func (*GetUserPasswordVersionResp) GetVersion ¶
func (x *GetUserPasswordVersionResp) GetVersion() uint32
func (*GetUserPasswordVersionResp) ProtoMessage ¶
func (*GetUserPasswordVersionResp) ProtoMessage()
func (*GetUserPasswordVersionResp) ProtoReflect ¶
func (x *GetUserPasswordVersionResp) ProtoReflect() protoreflect.Message
func (*GetUserPasswordVersionResp) Reset ¶
func (x *GetUserPasswordVersionResp) Reset()
func (*GetUserPasswordVersionResp) String ¶
func (x *GetUserPasswordVersionResp) String() string
type ListUserReq ¶
type ListUserReq struct {
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Id *string `protobuf:"bytes,3,opt,name=id,proto3,oneof" json:"id,omitempty"`
Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"`
Role *Role `protobuf:"varint,5,opt,name=role,proto3,enum=api.user.Role,oneof" json:"role,omitempty"`
Status *Status `protobuf:"varint,6,opt,name=status,proto3,enum=api.user.Status,oneof" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*ListUserReq) Descriptor
deprecated
func (*ListUserReq) Descriptor() ([]byte, []int)
Deprecated: Use ListUserReq.ProtoReflect.Descriptor instead.
func (*ListUserReq) GetId ¶
func (x *ListUserReq) GetId() string
func (*ListUserReq) GetName ¶
func (x *ListUserReq) GetName() string
func (*ListUserReq) GetPage ¶
func (x *ListUserReq) GetPage() int32
func (*ListUserReq) GetRole ¶
func (x *ListUserReq) GetRole() Role
func (*ListUserReq) GetSize ¶
func (x *ListUserReq) GetSize() int32
func (*ListUserReq) GetStatus ¶
func (x *ListUserReq) GetStatus() Status
func (*ListUserReq) ProtoMessage ¶
func (*ListUserReq) ProtoMessage()
func (*ListUserReq) ProtoReflect ¶
func (x *ListUserReq) ProtoReflect() protoreflect.Message
func (*ListUserReq) Reset ¶
func (x *ListUserReq) Reset()
func (*ListUserReq) String ¶
func (x *ListUserReq) String() string
type ListUserResp ¶
type ListUserResp struct {
Users []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"`
// contains filtered or unexported fields
}
func (*ListUserResp) Descriptor
deprecated
func (*ListUserResp) Descriptor() ([]byte, []int)
Deprecated: Use ListUserResp.ProtoReflect.Descriptor instead.
func (*ListUserResp) GetTotal ¶
func (x *ListUserResp) GetTotal() int32
func (*ListUserResp) GetUsers ¶
func (x *ListUserResp) GetUsers() []*UserInfo
func (*ListUserResp) ProtoMessage ¶
func (*ListUserResp) ProtoMessage()
func (*ListUserResp) ProtoReflect ¶
func (x *ListUserResp) ProtoReflect() protoreflect.Message
func (*ListUserResp) Reset ¶
func (x *ListUserResp) Reset()
func (*ListUserResp) String ¶
func (x *ListUserResp) String() string
type Role ¶
type Role int32
func (Role) Descriptor ¶
func (Role) Descriptor() protoreflect.EnumDescriptor
func (Role) EnumDescriptor
deprecated
func (Role) MarshalBinary ¶
func (Role) Number ¶
func (x Role) Number() protoreflect.EnumNumber
func (Role) Type ¶
func (Role) Type() protoreflect.EnumType
type SetUserNameReq ¶
type SetUserNameReq struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*SetUserNameReq) Descriptor
deprecated
func (*SetUserNameReq) Descriptor() ([]byte, []int)
Deprecated: Use SetUserNameReq.ProtoReflect.Descriptor instead.
func (*SetUserNameReq) GetId ¶
func (x *SetUserNameReq) GetId() string
func (*SetUserNameReq) GetName ¶
func (x *SetUserNameReq) GetName() string
func (*SetUserNameReq) ProtoMessage ¶
func (*SetUserNameReq) ProtoMessage()
func (*SetUserNameReq) ProtoReflect ¶
func (x *SetUserNameReq) ProtoReflect() protoreflect.Message
func (*SetUserNameReq) Reset ¶
func (x *SetUserNameReq) Reset()
func (*SetUserNameReq) String ¶
func (x *SetUserNameReq) String() string
type SetUserNameResp ¶
type SetUserNameResp struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*SetUserNameResp) Descriptor
deprecated
func (*SetUserNameResp) Descriptor() ([]byte, []int)
Deprecated: Use SetUserNameResp.ProtoReflect.Descriptor instead.
func (*SetUserNameResp) GetName ¶
func (x *SetUserNameResp) GetName() string
func (*SetUserNameResp) ProtoMessage ¶
func (*SetUserNameResp) ProtoMessage()
func (*SetUserNameResp) ProtoReflect ¶
func (x *SetUserNameResp) ProtoReflect() protoreflect.Message
func (*SetUserNameResp) Reset ¶
func (x *SetUserNameResp) Reset()
func (*SetUserNameResp) String ¶
func (x *SetUserNameResp) String() string
type SetUserPasswordReq ¶
type SetUserPasswordReq struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
func (*SetUserPasswordReq) Descriptor
deprecated
func (*SetUserPasswordReq) Descriptor() ([]byte, []int)
Deprecated: Use SetUserPasswordReq.ProtoReflect.Descriptor instead.
func (*SetUserPasswordReq) GetId ¶
func (x *SetUserPasswordReq) GetId() string
func (*SetUserPasswordReq) GetPassword ¶
func (x *SetUserPasswordReq) GetPassword() string
func (*SetUserPasswordReq) ProtoMessage ¶
func (*SetUserPasswordReq) ProtoMessage()
func (*SetUserPasswordReq) ProtoReflect ¶
func (x *SetUserPasswordReq) ProtoReflect() protoreflect.Message
func (*SetUserPasswordReq) Reset ¶
func (x *SetUserPasswordReq) Reset()
func (*SetUserPasswordReq) String ¶
func (x *SetUserPasswordReq) String() string
type SetUserRoleReq ¶
type SetUserRoleReq struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Role Role `protobuf:"varint,2,opt,name=role,proto3,enum=api.user.Role" json:"role,omitempty"`
// contains filtered or unexported fields
}
func (*SetUserRoleReq) Descriptor
deprecated
func (*SetUserRoleReq) Descriptor() ([]byte, []int)
Deprecated: Use SetUserRoleReq.ProtoReflect.Descriptor instead.
func (*SetUserRoleReq) GetId ¶
func (x *SetUserRoleReq) GetId() string
func (*SetUserRoleReq) GetRole ¶
func (x *SetUserRoleReq) GetRole() Role
func (*SetUserRoleReq) ProtoMessage ¶
func (*SetUserRoleReq) ProtoMessage()
func (*SetUserRoleReq) ProtoReflect ¶
func (x *SetUserRoleReq) ProtoReflect() protoreflect.Message
func (*SetUserRoleReq) Reset ¶
func (x *SetUserRoleReq) Reset()
func (*SetUserRoleReq) String ¶
func (x *SetUserRoleReq) String() string
type SetUserStatusReq ¶
type SetUserStatusReq struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=api.user.Status" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*SetUserStatusReq) Descriptor
deprecated
func (*SetUserStatusReq) Descriptor() ([]byte, []int)
Deprecated: Use SetUserStatusReq.ProtoReflect.Descriptor instead.
func (*SetUserStatusReq) GetId ¶
func (x *SetUserStatusReq) GetId() string
func (*SetUserStatusReq) GetStatus ¶
func (x *SetUserStatusReq) GetStatus() Status
func (*SetUserStatusReq) ProtoMessage ¶
func (*SetUserStatusReq) ProtoMessage()
func (*SetUserStatusReq) ProtoReflect ¶
func (x *SetUserStatusReq) ProtoReflect() protoreflect.Message
func (*SetUserStatusReq) Reset ¶
func (x *SetUserStatusReq) Reset()
func (*SetUserStatusReq) String ¶
func (x *SetUserStatusReq) String() string
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) IsInActive ¶
func (Status) MarshalBinary ¶
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnimplementedUserServer ¶
type UnimplementedUserServer struct {
}
UnimplementedUserServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServer) CreateUser ¶
func (UnimplementedUserServer) CreateUser(context.Context, *CreateUserReq) (*UserInfo, error)
func (UnimplementedUserServer) GetUserId ¶
func (UnimplementedUserServer) GetUserId(context.Context, *GetUserIdReq) (*GetUserIdResp, error)
func (UnimplementedUserServer) GetUserInfo ¶
func (UnimplementedUserServer) GetUserInfo(context.Context, *GetUserInfoReq) (*UserInfo, error)
func (UnimplementedUserServer) GetUserInfoByName ¶
func (UnimplementedUserServer) GetUserInfoByName(context.Context, *GetUserInfoByNameReq) (*UserInfo, error)
func (UnimplementedUserServer) GetUserPasswordVersion ¶
func (UnimplementedUserServer) GetUserPasswordVersion(context.Context, *GetUserPasswordVersionReq) (*GetUserPasswordVersionResp, error)
func (UnimplementedUserServer) ListUser ¶
func (UnimplementedUserServer) ListUser(context.Context, *ListUserReq) (*ListUserResp, error)
func (UnimplementedUserServer) SetUserName ¶
func (UnimplementedUserServer) SetUserName(context.Context, *SetUserNameReq) (*SetUserNameResp, error)
func (UnimplementedUserServer) SetUserPassword ¶
func (UnimplementedUserServer) SetUserPassword(context.Context, *SetUserPasswordReq) (*Empty, error)
func (UnimplementedUserServer) SetUserRole ¶
func (UnimplementedUserServer) SetUserRole(context.Context, *SetUserRoleReq) (*Empty, error)
func (UnimplementedUserServer) SetUserStatus ¶
func (UnimplementedUserServer) SetUserStatus(context.Context, *SetUserStatusReq) (*Empty, error)
func (UnimplementedUserServer) ValidateUserPassword ¶
func (UnimplementedUserServer) ValidateUserPassword(context.Context, *ValidateUserPasswordReq) (*ValidateUserPasswordResp, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UserClient ¶
type UserClient interface {
CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*UserInfo, error)
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*UserInfo, error)
GetUserInfoByName(ctx context.Context, in *GetUserInfoByNameReq, opts ...grpc.CallOption) (*UserInfo, error)
GetUserId(ctx context.Context, in *GetUserIdReq, opts ...grpc.CallOption) (*GetUserIdResp, error)
ValidateUserPassword(ctx context.Context, in *ValidateUserPasswordReq, opts ...grpc.CallOption) (*ValidateUserPasswordResp, error)
GetUserPasswordVersion(ctx context.Context, in *GetUserPasswordVersionReq, opts ...grpc.CallOption) (*GetUserPasswordVersionResp, error)
SetUserPassword(ctx context.Context, in *SetUserPasswordReq, opts ...grpc.CallOption) (*Empty, error)
SetUserRole(ctx context.Context, in *SetUserRoleReq, opts ...grpc.CallOption) (*Empty, error)
SetUserStatus(ctx context.Context, in *SetUserStatusReq, opts ...grpc.CallOption) (*Empty, error)
SetUserName(ctx context.Context, in *SetUserNameReq, opts ...grpc.CallOption) (*SetUserNameResp, error)
ListUser(ctx context.Context, in *ListUserReq, opts ...grpc.CallOption) (*ListUserResp, error)
}
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserHTTPClient ¶
type UserHTTPClient interface {
CreateUser(ctx context.Context, req *CreateUserReq, opts ...http.CallOption) (rsp *UserInfo, err error)
GetUserId(ctx context.Context, req *GetUserIdReq, opts ...http.CallOption) (rsp *GetUserIdResp, err error)
GetUserInfo(ctx context.Context, req *GetUserInfoReq, opts ...http.CallOption) (rsp *UserInfo, err error)
GetUserInfoByName(ctx context.Context, req *GetUserInfoByNameReq, opts ...http.CallOption) (rsp *UserInfo, err error)
GetUserPasswordVersion(ctx context.Context, req *GetUserPasswordVersionReq, opts ...http.CallOption) (rsp *GetUserPasswordVersionResp, err error)
ListUser(ctx context.Context, req *ListUserReq, opts ...http.CallOption) (rsp *ListUserResp, err error)
SetUserName(ctx context.Context, req *SetUserNameReq, opts ...http.CallOption) (rsp *SetUserNameResp, err error)
SetUserPassword(ctx context.Context, req *SetUserPasswordReq, opts ...http.CallOption) (rsp *Empty, err error)
SetUserRole(ctx context.Context, req *SetUserRoleReq, opts ...http.CallOption) (rsp *Empty, err error)
SetUserStatus(ctx context.Context, req *SetUserStatusReq, opts ...http.CallOption) (rsp *Empty, err error)
ValidateUserPassword(ctx context.Context, req *ValidateUserPasswordReq, opts ...http.CallOption) (rsp *ValidateUserPasswordResp, err error)
}
func NewUserHTTPClient ¶
func NewUserHTTPClient(client *http.Client) UserHTTPClient
type UserHTTPClientImpl ¶
type UserHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserHTTPClientImpl) CreateUser ¶
func (c *UserHTTPClientImpl) CreateUser(ctx context.Context, in *CreateUserReq, opts ...http.CallOption) (*UserInfo, error)
func (*UserHTTPClientImpl) GetUserId ¶
func (c *UserHTTPClientImpl) GetUserId(ctx context.Context, in *GetUserIdReq, opts ...http.CallOption) (*GetUserIdResp, error)
func (*UserHTTPClientImpl) GetUserInfo ¶
func (c *UserHTTPClientImpl) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...http.CallOption) (*UserInfo, error)
func (*UserHTTPClientImpl) GetUserInfoByName ¶
func (c *UserHTTPClientImpl) GetUserInfoByName(ctx context.Context, in *GetUserInfoByNameReq, opts ...http.CallOption) (*UserInfo, error)
func (*UserHTTPClientImpl) GetUserPasswordVersion ¶
func (c *UserHTTPClientImpl) GetUserPasswordVersion(ctx context.Context, in *GetUserPasswordVersionReq, opts ...http.CallOption) (*GetUserPasswordVersionResp, error)
func (*UserHTTPClientImpl) ListUser ¶
func (c *UserHTTPClientImpl) ListUser(ctx context.Context, in *ListUserReq, opts ...http.CallOption) (*ListUserResp, error)
func (*UserHTTPClientImpl) SetUserName ¶
func (c *UserHTTPClientImpl) SetUserName(ctx context.Context, in *SetUserNameReq, opts ...http.CallOption) (*SetUserNameResp, error)
func (*UserHTTPClientImpl) SetUserPassword ¶
func (c *UserHTTPClientImpl) SetUserPassword(ctx context.Context, in *SetUserPasswordReq, opts ...http.CallOption) (*Empty, error)
func (*UserHTTPClientImpl) SetUserRole ¶
func (c *UserHTTPClientImpl) SetUserRole(ctx context.Context, in *SetUserRoleReq, opts ...http.CallOption) (*Empty, error)
func (*UserHTTPClientImpl) SetUserStatus ¶
func (c *UserHTTPClientImpl) SetUserStatus(ctx context.Context, in *SetUserStatusReq, opts ...http.CallOption) (*Empty, error)
func (*UserHTTPClientImpl) ValidateUserPassword ¶
func (c *UserHTTPClientImpl) ValidateUserPassword(ctx context.Context, in *ValidateUserPasswordReq, opts ...http.CallOption) (*ValidateUserPasswordResp, error)
type UserHTTPServer ¶
type UserHTTPServer interface {
CreateUser(context.Context, *CreateUserReq) (*UserInfo, error)
GetUserId(context.Context, *GetUserIdReq) (*GetUserIdResp, error)
GetUserInfo(context.Context, *GetUserInfoReq) (*UserInfo, error)
GetUserInfoByName(context.Context, *GetUserInfoByNameReq) (*UserInfo, error)
GetUserPasswordVersion(context.Context, *GetUserPasswordVersionReq) (*GetUserPasswordVersionResp, error)
ListUser(context.Context, *ListUserReq) (*ListUserResp, error)
SetUserName(context.Context, *SetUserNameReq) (*SetUserNameResp, error)
SetUserPassword(context.Context, *SetUserPasswordReq) (*Empty, error)
SetUserRole(context.Context, *SetUserRoleReq) (*Empty, error)
SetUserStatus(context.Context, *SetUserStatusReq) (*Empty, error)
ValidateUserPassword(context.Context, *ValidateUserPasswordReq) (*ValidateUserPasswordResp, error)
}
type UserInfo ¶
type UserInfo struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" redis:"id"` // @gotags: redis:"id"
CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty" redis:"created_at"` // @gotags: redis:"created_at"
UpdatedAt int64 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"-" redis:"-"` // @gotags: redis:"-" json:"-"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty" redis:"name"` // @gotags: redis:"name"
Role Role `protobuf:"varint,5,opt,name=role,proto3,enum=api.user.Role" json:"role" redis:"role,omitempty"` // @gotags: redis:"role,omitempty" json:"role"
Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=api.user.Status" json:"status" redis:"status,omitempty"` // @gotags: redis:"status,omitempty" json:"status"
// contains filtered or unexported fields
}
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetCreatedAt ¶
func (*UserInfo) GetUpdatedAt ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserServer ¶
type UserServer interface {
CreateUser(context.Context, *CreateUserReq) (*UserInfo, error)
GetUserInfo(context.Context, *GetUserInfoReq) (*UserInfo, error)
GetUserInfoByName(context.Context, *GetUserInfoByNameReq) (*UserInfo, error)
GetUserId(context.Context, *GetUserIdReq) (*GetUserIdResp, error)
ValidateUserPassword(context.Context, *ValidateUserPasswordReq) (*ValidateUserPasswordResp, error)
GetUserPasswordVersion(context.Context, *GetUserPasswordVersionReq) (*GetUserPasswordVersionResp, error)
SetUserPassword(context.Context, *SetUserPasswordReq) (*Empty, error)
SetUserRole(context.Context, *SetUserRoleReq) (*Empty, error)
SetUserStatus(context.Context, *SetUserStatusReq) (*Empty, error)
SetUserName(context.Context, *SetUserNameReq) (*SetUserNameResp, error)
ListUser(context.Context, *ListUserReq) (*ListUserResp, error)
// contains filtered or unexported methods
}
UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility
type ValidateUserPasswordReq ¶
type ValidateUserPasswordReq struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
func (*ValidateUserPasswordReq) Descriptor
deprecated
func (*ValidateUserPasswordReq) Descriptor() ([]byte, []int)
Deprecated: Use ValidateUserPasswordReq.ProtoReflect.Descriptor instead.
func (*ValidateUserPasswordReq) GetId ¶
func (x *ValidateUserPasswordReq) GetId() string
func (*ValidateUserPasswordReq) GetPassword ¶
func (x *ValidateUserPasswordReq) GetPassword() string
func (*ValidateUserPasswordReq) ProtoMessage ¶
func (*ValidateUserPasswordReq) ProtoMessage()
func (*ValidateUserPasswordReq) ProtoReflect ¶
func (x *ValidateUserPasswordReq) ProtoReflect() protoreflect.Message
func (*ValidateUserPasswordReq) Reset ¶
func (x *ValidateUserPasswordReq) Reset()
func (*ValidateUserPasswordReq) String ¶
func (x *ValidateUserPasswordReq) String() string
type ValidateUserPasswordResp ¶
type ValidateUserPasswordResp struct {
Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"`
// contains filtered or unexported fields
}
func (*ValidateUserPasswordResp) Descriptor
deprecated
func (*ValidateUserPasswordResp) Descriptor() ([]byte, []int)
Deprecated: Use ValidateUserPasswordResp.ProtoReflect.Descriptor instead.
func (*ValidateUserPasswordResp) GetValid ¶
func (x *ValidateUserPasswordResp) GetValid() bool
func (*ValidateUserPasswordResp) ProtoMessage ¶
func (*ValidateUserPasswordResp) ProtoMessage()
func (*ValidateUserPasswordResp) ProtoReflect ¶
func (x *ValidateUserPasswordResp) ProtoReflect() protoreflect.Message
func (*ValidateUserPasswordResp) Reset ¶
func (x *ValidateUserPasswordResp) Reset()
func (*ValidateUserPasswordResp) String ¶
func (x *ValidateUserPasswordResp) String() string