Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetDisplayName() string
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- type DeleteUserRequest
- type DeleteUserResponse
- type GetUserByEmailRequest
- func (*GetUserByEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByEmailRequest) GetEmail() string
- func (*GetUserByEmailRequest) ProtoMessage()
- func (x *GetUserByEmailRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserByEmailRequest) Reset()
- func (x *GetUserByEmailRequest) String() string
- type GetUserByEmailResponse
- func (*GetUserByEmailResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByEmailResponse) GetUser() *User
- func (*GetUserByEmailResponse) ProtoMessage()
- func (x *GetUserByEmailResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserByEmailResponse) Reset()
- func (x *GetUserByEmailResponse) String() string
- type GetUserByUsernameRequest
- func (*GetUserByUsernameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByUsernameRequest) GetUsername() string
- func (*GetUserByUsernameRequest) ProtoMessage()
- func (x *GetUserByUsernameRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserByUsernameRequest) Reset()
- func (x *GetUserByUsernameRequest) String() string
- type GetUserByUsernameResponse
- func (*GetUserByUsernameResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByUsernameResponse) GetUser() *User
- func (*GetUserByUsernameResponse) ProtoMessage()
- func (x *GetUserByUsernameResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserByUsernameResponse) Reset()
- func (x *GetUserByUsernameResponse) String() string
- type GetUserRequest
- type GetUserResponse
- type ListUsersRequest
- func (*ListUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersRequest) GetLimit() int32
- func (x *ListUsersRequest) GetOffset() int32
- func (*ListUsersRequest) ProtoMessage()
- func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
- func (x *ListUsersRequest) Reset()
- func (x *ListUsersRequest) String() string
- type ListUsersResponse
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsernameOrEmail() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetToken() string
- func (x *LoginResponse) GetUser() *User
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type LogoutRequest
- type LogoutResponse
- type RequestPasswordResetRequest
- func (*RequestPasswordResetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RequestPasswordResetRequest) GetEmail() string
- func (*RequestPasswordResetRequest) ProtoMessage()
- func (x *RequestPasswordResetRequest) ProtoReflect() protoreflect.Message
- func (x *RequestPasswordResetRequest) Reset()
- func (x *RequestPasswordResetRequest) String() string
- type RequestPasswordResetResponse
- func (*RequestPasswordResetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RequestPasswordResetResponse) GetSuccess() bool
- func (*RequestPasswordResetResponse) ProtoMessage()
- func (x *RequestPasswordResetResponse) ProtoReflect() protoreflect.Message
- func (x *RequestPasswordResetResponse) Reset()
- func (x *RequestPasswordResetResponse) String() string
- type ResetPasswordRequest
- func (*ResetPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ResetPasswordRequest) GetNewPassword() string
- func (x *ResetPasswordRequest) GetToken() string
- func (*ResetPasswordRequest) ProtoMessage()
- func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *ResetPasswordRequest) Reset()
- func (x *ResetPasswordRequest) String() string
- type ResetPasswordResponse
- func (*ResetPasswordResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ResetPasswordResponse) GetSuccess() bool
- func (*ResetPasswordResponse) ProtoMessage()
- func (x *ResetPasswordResponse) ProtoReflect() protoreflect.Message
- func (x *ResetPasswordResponse) Reset()
- func (x *ResetPasswordResponse) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
- func (UnimplementedUserServiceServer) GetUserByEmail(context.Context, *GetUserByEmailRequest) (*GetUserByEmailResponse, error)
- func (UnimplementedUserServiceServer) GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*GetUserByUsernameResponse, error)
- func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
- func (UnimplementedUserServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedUserServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
- func (UnimplementedUserServiceServer) RequestPasswordReset(context.Context, *RequestPasswordResetRequest) (*RequestPasswordResetResponse, error)
- func (UnimplementedUserServiceServer) ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
- func (UnimplementedUserServiceServer) VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetDisplayName() *wrapperspb.StringValue
- func (x *UpdateUserRequest) GetEmail() *wrapperspb.StringValue
- func (x *UpdateUserRequest) GetEmailVerified() *wrapperspb.BoolValue
- func (x *UpdateUserRequest) GetId() string
- func (x *UpdateUserRequest) GetPassword() *wrapperspb.StringValue
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type UpdateUserResponse
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAccountLocked() bool
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetDisplayName() string
- func (x *User) GetEmail() string
- func (x *User) GetEmailVerified() bool
- func (x *User) GetFailedLoginAttempts() int32
- func (x *User) GetId() string
- func (x *User) GetLastLoginAt() *timestamppb.Timestamp
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
- type VerifyEmailRequest
- type VerifyEmailResponse
- func (*VerifyEmailResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyEmailResponse) GetSuccess() bool
- func (*VerifyEmailResponse) ProtoMessage()
- func (x *VerifyEmailResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyEmailResponse) Reset()
- func (x *VerifyEmailResponse) String() string
Constants ¶
const ( UserService_CreateUser_FullMethodName = "/user.v1.UserService/CreateUser" UserService_GetUser_FullMethodName = "/user.v1.UserService/GetUser" UserService_GetUserByEmail_FullMethodName = "/user.v1.UserService/GetUserByEmail" UserService_GetUserByUsername_FullMethodName = "/user.v1.UserService/GetUserByUsername" UserService_UpdateUser_FullMethodName = "/user.v1.UserService/UpdateUser" UserService_DeleteUser_FullMethodName = "/user.v1.UserService/DeleteUser" UserService_ListUsers_FullMethodName = "/user.v1.UserService/ListUsers" UserService_Login_FullMethodName = "/user.v1.UserService/Login" UserService_Logout_FullMethodName = "/user.v1.UserService/Logout" UserService_RequestPasswordReset_FullMethodName = "/user.v1.UserService/RequestPasswordReset" UserService_ResetPassword_FullMethodName = "/user.v1.UserService/ResetPassword" UserService_VerifyEmail_FullMethodName = "/user.v1.UserService/VerifyEmail" )
Variables ¶
var File_user_v1_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "GetUserByEmail", Handler: _UserService_GetUserByEmail_Handler, }, { MethodName: "GetUserByUsername", Handler: _UserService_GetUserByUsername_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, { MethodName: "ListUsers", Handler: _UserService_ListUsers_Handler, }, { MethodName: "Login", Handler: _UserService_Login_Handler, }, { MethodName: "Logout", Handler: _UserService_Logout_Handler, }, { MethodName: "RequestPasswordReset", Handler: _UserService_RequestPasswordReset_Handler, }, { MethodName: "ResetPassword", Handler: _UserService_ResetPassword_Handler, }, { MethodName: "VerifyEmail", Handler: _UserService_VerifyEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/v1/user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // Plain password, will be hashed server-side
// contains filtered or unexported fields
}
Create user
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetDisplayName ¶
func (x *CreateUserRequest) GetDisplayName() string
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct {
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetUser ¶
func (x *CreateUserResponse) GetUser() *User
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Delete user
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() string
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type DeleteUserResponse ¶
type DeleteUserResponse struct {
// contains filtered or unexported fields
}
func (*DeleteUserResponse) Descriptor
deprecated
func (*DeleteUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead.
func (*DeleteUserResponse) ProtoMessage ¶
func (*DeleteUserResponse) ProtoMessage()
func (*DeleteUserResponse) ProtoReflect ¶
func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserResponse) Reset ¶
func (x *DeleteUserResponse) Reset()
func (*DeleteUserResponse) String ¶
func (x *DeleteUserResponse) String() string
type GetUserByEmailRequest ¶
type GetUserByEmailRequest struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// contains filtered or unexported fields
}
Get user by email
func (*GetUserByEmailRequest) Descriptor
deprecated
func (*GetUserByEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByEmailRequest.ProtoReflect.Descriptor instead.
func (*GetUserByEmailRequest) GetEmail ¶
func (x *GetUserByEmailRequest) GetEmail() string
func (*GetUserByEmailRequest) ProtoMessage ¶
func (*GetUserByEmailRequest) ProtoMessage()
func (*GetUserByEmailRequest) ProtoReflect ¶
func (x *GetUserByEmailRequest) ProtoReflect() protoreflect.Message
func (*GetUserByEmailRequest) Reset ¶
func (x *GetUserByEmailRequest) Reset()
func (*GetUserByEmailRequest) String ¶
func (x *GetUserByEmailRequest) String() string
type GetUserByEmailResponse ¶
type GetUserByEmailResponse struct {
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserByEmailResponse) Descriptor
deprecated
func (*GetUserByEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByEmailResponse.ProtoReflect.Descriptor instead.
func (*GetUserByEmailResponse) GetUser ¶
func (x *GetUserByEmailResponse) GetUser() *User
func (*GetUserByEmailResponse) ProtoMessage ¶
func (*GetUserByEmailResponse) ProtoMessage()
func (*GetUserByEmailResponse) ProtoReflect ¶
func (x *GetUserByEmailResponse) ProtoReflect() protoreflect.Message
func (*GetUserByEmailResponse) Reset ¶
func (x *GetUserByEmailResponse) Reset()
func (*GetUserByEmailResponse) String ¶
func (x *GetUserByEmailResponse) String() string
type GetUserByUsernameRequest ¶
type GetUserByUsernameRequest struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
Get user by username
func (*GetUserByUsernameRequest) Descriptor
deprecated
func (*GetUserByUsernameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByUsernameRequest.ProtoReflect.Descriptor instead.
func (*GetUserByUsernameRequest) GetUsername ¶
func (x *GetUserByUsernameRequest) GetUsername() string
func (*GetUserByUsernameRequest) ProtoMessage ¶
func (*GetUserByUsernameRequest) ProtoMessage()
func (*GetUserByUsernameRequest) ProtoReflect ¶
func (x *GetUserByUsernameRequest) ProtoReflect() protoreflect.Message
func (*GetUserByUsernameRequest) Reset ¶
func (x *GetUserByUsernameRequest) Reset()
func (*GetUserByUsernameRequest) String ¶
func (x *GetUserByUsernameRequest) String() string
type GetUserByUsernameResponse ¶
type GetUserByUsernameResponse struct {
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserByUsernameResponse) Descriptor
deprecated
func (*GetUserByUsernameResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByUsernameResponse.ProtoReflect.Descriptor instead.
func (*GetUserByUsernameResponse) GetUser ¶
func (x *GetUserByUsernameResponse) GetUser() *User
func (*GetUserByUsernameResponse) ProtoMessage ¶
func (*GetUserByUsernameResponse) ProtoMessage()
func (*GetUserByUsernameResponse) ProtoReflect ¶
func (x *GetUserByUsernameResponse) ProtoReflect() protoreflect.Message
func (*GetUserByUsernameResponse) Reset ¶
func (x *GetUserByUsernameResponse) Reset()
func (*GetUserByUsernameResponse) String ¶
func (x *GetUserByUsernameResponse) String() string
type GetUserRequest ¶
type GetUserRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Get user by ID
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() string
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct {
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserResponse) Descriptor
deprecated
func (*GetUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) GetUser ¶
func (x *GetUserResponse) GetUser() *User
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) ProtoReflect ¶
func (x *GetUserResponse) ProtoReflect() protoreflect.Message
func (*GetUserResponse) Reset ¶
func (x *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (x *GetUserResponse) String() string
type ListUsersRequest ¶
type ListUsersRequest struct {
Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
// contains filtered or unexported fields
}
List users
func (*ListUsersRequest) Descriptor
deprecated
func (*ListUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.
func (*ListUsersRequest) GetLimit ¶
func (x *ListUsersRequest) GetLimit() int32
func (*ListUsersRequest) GetOffset ¶
func (x *ListUsersRequest) GetOffset() int32
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) ProtoReflect ¶
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
func (*ListUsersRequest) Reset ¶
func (x *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (x *ListUsersRequest) String() string
type ListUsersResponse ¶
type ListUsersResponse struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*ListUsersResponse) Descriptor
deprecated
func (*ListUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.
func (*ListUsersResponse) GetUsers ¶
func (x *ListUsersResponse) GetUsers() []*User
func (*ListUsersResponse) ProtoMessage ¶
func (*ListUsersResponse) ProtoMessage()
func (*ListUsersResponse) ProtoReflect ¶
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message
func (*ListUsersResponse) Reset ¶
func (x *ListUsersResponse) Reset()
func (*ListUsersResponse) String ¶
func (x *ListUsersResponse) String() string
type LoginRequest ¶
type LoginRequest struct {
UsernameOrEmail string `protobuf:"bytes,1,opt,name=username_or_email,json=usernameOrEmail,proto3" json:"username_or_email,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
Authentication
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsernameOrEmail ¶
func (x *LoginRequest) GetUsernameOrEmail() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // JWT or session token
User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetToken ¶
func (x *LoginResponse) GetToken() string
func (*LoginResponse) GetUser ¶
func (x *LoginResponse) GetUser() *User
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type LogoutRequest ¶
type LogoutRequest struct {
// contains filtered or unexported fields
}
func (*LogoutRequest) Descriptor
deprecated
func (*LogoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
func (*LogoutRequest) ProtoMessage ¶
func (*LogoutRequest) ProtoMessage()
func (*LogoutRequest) ProtoReflect ¶
func (x *LogoutRequest) ProtoReflect() protoreflect.Message
func (*LogoutRequest) Reset ¶
func (x *LogoutRequest) Reset()
func (*LogoutRequest) String ¶
func (x *LogoutRequest) String() string
type LogoutResponse ¶
type LogoutResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
func (*LogoutResponse) Descriptor
deprecated
func (*LogoutResponse) Descriptor() ([]byte, []int)
Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.
func (*LogoutResponse) GetSuccess ¶
func (x *LogoutResponse) GetSuccess() bool
func (*LogoutResponse) ProtoMessage ¶
func (*LogoutResponse) ProtoMessage()
func (*LogoutResponse) ProtoReflect ¶
func (x *LogoutResponse) ProtoReflect() protoreflect.Message
func (*LogoutResponse) Reset ¶
func (x *LogoutResponse) Reset()
func (*LogoutResponse) String ¶
func (x *LogoutResponse) String() string
type RequestPasswordResetRequest ¶
type RequestPasswordResetRequest struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// contains filtered or unexported fields
}
Password reset
func (*RequestPasswordResetRequest) Descriptor
deprecated
func (*RequestPasswordResetRequest) Descriptor() ([]byte, []int)
Deprecated: Use RequestPasswordResetRequest.ProtoReflect.Descriptor instead.
func (*RequestPasswordResetRequest) GetEmail ¶
func (x *RequestPasswordResetRequest) GetEmail() string
func (*RequestPasswordResetRequest) ProtoMessage ¶
func (*RequestPasswordResetRequest) ProtoMessage()
func (*RequestPasswordResetRequest) ProtoReflect ¶
func (x *RequestPasswordResetRequest) ProtoReflect() protoreflect.Message
func (*RequestPasswordResetRequest) Reset ¶
func (x *RequestPasswordResetRequest) Reset()
func (*RequestPasswordResetRequest) String ¶
func (x *RequestPasswordResetRequest) String() string
type RequestPasswordResetResponse ¶
type RequestPasswordResetResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
func (*RequestPasswordResetResponse) Descriptor
deprecated
func (*RequestPasswordResetResponse) Descriptor() ([]byte, []int)
Deprecated: Use RequestPasswordResetResponse.ProtoReflect.Descriptor instead.
func (*RequestPasswordResetResponse) GetSuccess ¶
func (x *RequestPasswordResetResponse) GetSuccess() bool
func (*RequestPasswordResetResponse) ProtoMessage ¶
func (*RequestPasswordResetResponse) ProtoMessage()
func (*RequestPasswordResetResponse) ProtoReflect ¶
func (x *RequestPasswordResetResponse) ProtoReflect() protoreflect.Message
func (*RequestPasswordResetResponse) Reset ¶
func (x *RequestPasswordResetResponse) Reset()
func (*RequestPasswordResetResponse) String ¶
func (x *RequestPasswordResetResponse) String() string
type ResetPasswordRequest ¶
type ResetPasswordRequest struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` // Plain password, will be hashed server-side
// contains filtered or unexported fields
}
func (*ResetPasswordRequest) Descriptor
deprecated
func (*ResetPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.
func (*ResetPasswordRequest) GetNewPassword ¶
func (x *ResetPasswordRequest) GetNewPassword() string
func (*ResetPasswordRequest) GetToken ¶
func (x *ResetPasswordRequest) GetToken() string
func (*ResetPasswordRequest) ProtoMessage ¶
func (*ResetPasswordRequest) ProtoMessage()
func (*ResetPasswordRequest) ProtoReflect ¶
func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message
func (*ResetPasswordRequest) Reset ¶
func (x *ResetPasswordRequest) Reset()
func (*ResetPasswordRequest) String ¶
func (x *ResetPasswordRequest) String() string
type ResetPasswordResponse ¶
type ResetPasswordResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
func (*ResetPasswordResponse) Descriptor
deprecated
func (*ResetPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResetPasswordResponse.ProtoReflect.Descriptor instead.
func (*ResetPasswordResponse) GetSuccess ¶
func (x *ResetPasswordResponse) GetSuccess() bool
func (*ResetPasswordResponse) ProtoMessage ¶
func (*ResetPasswordResponse) ProtoMessage()
func (*ResetPasswordResponse) ProtoReflect ¶
func (x *ResetPasswordResponse) ProtoReflect() protoreflect.Message
func (*ResetPasswordResponse) Reset ¶
func (x *ResetPasswordResponse) Reset()
func (*ResetPasswordResponse) String ¶
func (x *ResetPasswordResponse) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct{}
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
func (UnimplementedUserServiceServer) GetUserByEmail ¶
func (UnimplementedUserServiceServer) GetUserByEmail(context.Context, *GetUserByEmailRequest) (*GetUserByEmailResponse, error)
func (UnimplementedUserServiceServer) GetUserByUsername ¶
func (UnimplementedUserServiceServer) GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*GetUserByUsernameResponse, error)
func (UnimplementedUserServiceServer) ListUsers ¶
func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
func (UnimplementedUserServiceServer) Login ¶
func (UnimplementedUserServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedUserServiceServer) Logout ¶
func (UnimplementedUserServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
func (UnimplementedUserServiceServer) RequestPasswordReset ¶
func (UnimplementedUserServiceServer) RequestPasswordReset(context.Context, *RequestPasswordResetRequest) (*RequestPasswordResetResponse, error)
func (UnimplementedUserServiceServer) ResetPassword ¶
func (UnimplementedUserServiceServer) ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
func (UnimplementedUserServiceServer) VerifyEmail ¶
func (UnimplementedUserServiceServer) VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
DisplayName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Email *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
EmailVerified *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
Password *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` // Plain password, will be hashed server-side
// contains filtered or unexported fields
}
Update user
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetDisplayName ¶
func (x *UpdateUserRequest) GetDisplayName() *wrapperspb.StringValue
func (*UpdateUserRequest) GetEmail ¶
func (x *UpdateUserRequest) GetEmail() *wrapperspb.StringValue
func (*UpdateUserRequest) GetEmailVerified ¶
func (x *UpdateUserRequest) GetEmailVerified() *wrapperspb.BoolValue
func (*UpdateUserRequest) GetId ¶
func (x *UpdateUserRequest) GetId() string
func (*UpdateUserRequest) GetPassword ¶
func (x *UpdateUserRequest) GetPassword() *wrapperspb.StringValue
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type UpdateUserResponse ¶
type UpdateUserResponse struct {
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateUserResponse) Descriptor
deprecated
func (*UpdateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead.
func (*UpdateUserResponse) GetUser ¶
func (x *UpdateUserResponse) GetUser() *User
func (*UpdateUserResponse) ProtoMessage ¶
func (*UpdateUserResponse) ProtoMessage()
func (*UpdateUserResponse) ProtoReflect ¶
func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message
func (*UpdateUserResponse) Reset ¶
func (x *UpdateUserResponse) Reset()
func (*UpdateUserResponse) String ¶
func (x *UpdateUserResponse) String() string
type User ¶
type User struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
EmailVerified bool `protobuf:"varint,5,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
LastLoginAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_login_at,json=lastLoginAt,proto3" json:"last_login_at,omitempty"`
AccountLocked bool `protobuf:"varint,8,opt,name=account_locked,json=accountLocked,proto3" json:"account_locked,omitempty"`
FailedLoginAttempts int32 `protobuf:"varint,9,opt,name=failed_login_attempts,json=failedLoginAttempts,proto3" json:"failed_login_attempts,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) GetAccountLocked ¶
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetDisplayName ¶
func (*User) GetEmailVerified ¶
func (*User) GetFailedLoginAttempts ¶
func (*User) GetLastLoginAt ¶
func (x *User) GetLastLoginAt() *timestamppb.Timestamp
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface {
// Core CRUD operations
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
GetUserByEmail(ctx context.Context, in *GetUserByEmailRequest, opts ...grpc.CallOption) (*GetUserByEmailResponse, error)
GetUserByUsername(ctx context.Context, in *GetUserByUsernameRequest, opts ...grpc.CallOption) (*GetUserByUsernameResponse, error)
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
// Authentication operations
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
// Password management
RequestPasswordReset(ctx context.Context, in *RequestPasswordResetRequest, opts ...grpc.CallOption) (*RequestPasswordResetResponse, error)
ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error)
// Email verification
VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error)
}
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
// Core CRUD operations
CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
GetUserByEmail(context.Context, *GetUserByEmailRequest) (*GetUserByEmailResponse, error)
GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*GetUserByUsernameResponse, error)
UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
// Authentication operations
Login(context.Context, *LoginRequest) (*LoginResponse, error)
Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
// Password management
RequestPasswordReset(context.Context, *RequestPasswordResetRequest) (*RequestPasswordResetResponse, error)
ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error)
// Email verification
VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error)
// contains filtered or unexported methods
}
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.
type VerifyEmailRequest ¶
type VerifyEmailRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Email verification
func (*VerifyEmailRequest) Descriptor
deprecated
func (*VerifyEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyEmailRequest.ProtoReflect.Descriptor instead.
func (*VerifyEmailRequest) GetId ¶
func (x *VerifyEmailRequest) GetId() string
func (*VerifyEmailRequest) ProtoMessage ¶
func (*VerifyEmailRequest) ProtoMessage()
func (*VerifyEmailRequest) ProtoReflect ¶
func (x *VerifyEmailRequest) ProtoReflect() protoreflect.Message
func (*VerifyEmailRequest) Reset ¶
func (x *VerifyEmailRequest) Reset()
func (*VerifyEmailRequest) String ¶
func (x *VerifyEmailRequest) String() string
type VerifyEmailResponse ¶
type VerifyEmailResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
func (*VerifyEmailResponse) Descriptor
deprecated
func (*VerifyEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyEmailResponse.ProtoReflect.Descriptor instead.
func (*VerifyEmailResponse) GetSuccess ¶
func (x *VerifyEmailResponse) GetSuccess() bool
func (*VerifyEmailResponse) ProtoMessage ¶
func (*VerifyEmailResponse) ProtoMessage()
func (*VerifyEmailResponse) ProtoReflect ¶
func (x *VerifyEmailResponse) ProtoReflect() protoreflect.Message
func (*VerifyEmailResponse) Reset ¶
func (x *VerifyEmailResponse) Reset()
func (*VerifyEmailResponse) String ¶
func (x *VerifyEmailResponse) String() string