Documentation ¶
Index ¶
- type S
- func (s *S) CreateGroup(ctx context.Context, req *userV1.CreateGroupRequest) (*userV1.CreateGroupResponse, error)
- func (s *S) GetGroup(ctx context.Context, req *userV1.GetGroupRequest) (*userV1.GetGroupResponse, error)
- func (s *S) GetUser(ctx context.Context, req *userV1.GetUserRequest) (*userV1.GetUserResponse, error)
- func (s *S) GetUserInfo(ctx context.Context, req *userV1.GetUserInfoRequest) (*userV1.GetUserInfoResponse, error)
- func (s *S) GetUserPassKey(ctx context.Context, req *userV1.GetUserPassKeyRequest) (*userV1.GetUserPassKeyResponse, error)
- func (s *S) GroupAddUser(ctx context.Context, req *userV1.GroupAddUserRequest) (*userV1.GroupAddUserResponse, error)
- func (s *S) GroupRemoveUser(ctx context.Context, req *userV1.GroupRemoveUserRequest) (*userV1.GroupRemoveUserResponse, error)
- func (s *S) GroupUserUpdate(ctx context.Context, req *userV1.GroupUserUpdateRequest) (*userV1.GroupUserUpdateResponse, error)
- func (s *S) UpdateGroup(ctx context.Context, req *userV1.UpdateGroupRequest) (*userV1.UpdateGroupResponse, error)
- func (s *S) UpdatePassword(ctx context.Context, req *userV1.UpdatePasswordRequest) (*userV1.UpdatePasswordResponse, error)
- func (s *S) UpdateUser(ctx context.Context, req *userV1.UpdateUserRequest) (*userV1.UpdateUserResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S ¶
type S struct { Log *zap.SugaredLogger userV1.UnimplementedUserServiceServer }
func (*S) CreateGroup ¶
func (s *S) CreateGroup(ctx context.Context, req *userV1.CreateGroupRequest) (*userV1.CreateGroupResponse, error)
func (*S) GetGroup ¶
func (s *S) GetGroup(ctx context.Context, req *userV1.GetGroupRequest) (*userV1.GetGroupResponse, error)
func (*S) GetUser ¶
func (s *S) GetUser(ctx context.Context, req *userV1.GetUserRequest) (*userV1.GetUserResponse, error)
GetUser retrieves a user's information based on the provided request, ensuring proper authentication and input validation.
func (*S) GetUserInfo ¶
func (s *S) GetUserInfo(ctx context.Context, req *userV1.GetUserInfoRequest) (*userV1.GetUserInfoResponse, error)
func (*S) GetUserPassKey ¶
func (s *S) GetUserPassKey(ctx context.Context, req *userV1.GetUserPassKeyRequest) (*userV1.GetUserPassKeyResponse, error)
func (*S) GroupAddUser ¶
func (s *S) GroupAddUser(ctx context.Context, req *userV1.GroupAddUserRequest) (*userV1.GroupAddUserResponse, error)
func (*S) GroupRemoveUser ¶
func (s *S) GroupRemoveUser(ctx context.Context, req *userV1.GroupRemoveUserRequest) (*userV1.GroupRemoveUserResponse, error)
func (*S) GroupUserUpdate ¶
func (s *S) GroupUserUpdate(ctx context.Context, req *userV1.GroupUserUpdateRequest) (*userV1.GroupUserUpdateResponse, error)
GroupUserUpdate updates a user's metadata within a group, enforcing authentication, authorization, and validation checks.
func (*S) UpdateGroup ¶
func (s *S) UpdateGroup(ctx context.Context, req *userV1.UpdateGroupRequest) (*userV1.UpdateGroupResponse, error)
UpdateGroup updates a group's information based on the provided request, ensuring the caller is authenticated, the request is valid, and has necessary permissions. It returns an error if the user is unauthenticated, the group ID is empty, or the user lacks sufficient permissions to update the group.
func (*S) UpdatePassword ¶
func (s *S) UpdatePassword(ctx context.Context, req *userV1.UpdatePasswordRequest) (*userV1.UpdatePasswordResponse, error)
UpdatePassword updates a user's password based on the provided old and new password, ensuring the user is authenticated and the old password is correct. It returns an error if the user is unauthenticated, the old password doesn't match, or there's an internal error during the update process.
func (*S) UpdateUser ¶
func (s *S) UpdateUser(ctx context.Context, req *userV1.UpdateUserRequest) (*userV1.UpdateUserResponse, error)
UpdateUser updates a user's information based on the provided request, ensuring authentication, input validation, and authorization.