Documentation
¶
Overview ¶
Package user provides the gRPC service for user and group management.
Index ¶
- type Service
- func (s Service) DeleteGroup(ctx context.Context, req *authd.DeleteGroupRequest) (*authd.Empty, error)
- func (s Service) DeleteUser(ctx context.Context, req *authd.DeleteUserRequest) (*authd.DeleteUserResponse, error)
- func (s Service) GetGroupByID(ctx context.Context, req *authd.GetGroupByIDRequest) (*authd.Group, error)
- func (s Service) GetGroupByName(ctx context.Context, req *authd.GetGroupByNameRequest) (*authd.Group, error)
- func (s Service) GetUserByID(ctx context.Context, req *authd.GetUserByIDRequest) (*authd.User, error)
- func (s Service) GetUserByName(ctx context.Context, req *authd.GetUserByNameRequest) (*authd.User, error)
- func (s Service) ListGroups(ctx context.Context, req *authd.Empty) (*authd.Groups, error)
- func (s Service) ListUsers(ctx context.Context, req *authd.Empty) (*authd.Users, error)
- func (s Service) LockUser(ctx context.Context, req *authd.LockUserRequest) (*authd.Empty, error)
- func (s Service) SetGroupID(ctx context.Context, req *authd.SetGroupIDRequest) (*authd.SetGroupIDResponse, error)
- func (s Service) SetHomeDir(ctx context.Context, req *authd.SetHomeDirRequest) (*authd.SetHomeDirResponse, error)
- func (s Service) SetShell(ctx context.Context, req *authd.SetShellRequest) (*authd.SetShellResponse, error)
- func (s Service) SetUserID(ctx context.Context, req *authd.SetUserIDRequest) (*authd.SetUserIDResponse, error)
- func (s Service) UnlockUser(ctx context.Context, req *authd.UnlockUserRequest) (*authd.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
authd.UnimplementedUserServiceServer
// contains filtered or unexported fields
}
Service is the implementation of the gRPC user service.
func NewService ¶
func NewService(ctx context.Context, userManager *users.Manager, brokerManager *brokers.Manager, permissionManager *permissions.Manager) Service
NewService returns a new gRPC user service.
func (Service) DeleteGroup ¶ added in v0.7.0
func (s Service) DeleteGroup(ctx context.Context, req *authd.DeleteGroupRequest) (*authd.Empty, error)
DeleteGroup removes the group with the given name from the authd database.
func (Service) DeleteUser ¶ added in v0.7.0
func (s Service) DeleteUser(ctx context.Context, req *authd.DeleteUserRequest) (*authd.DeleteUserResponse, error)
DeleteUser removes the user with the given name from the authd database.
func (Service) GetGroupByID ¶
func (s Service) GetGroupByID(ctx context.Context, req *authd.GetGroupByIDRequest) (*authd.Group, error)
GetGroupByID returns the group entry for the given group ID.
func (Service) GetGroupByName ¶
func (s Service) GetGroupByName(ctx context.Context, req *authd.GetGroupByNameRequest) (*authd.Group, error)
GetGroupByName returns the group entry for the given group name.
func (Service) GetUserByID ¶
func (s Service) GetUserByID(ctx context.Context, req *authd.GetUserByIDRequest) (*authd.User, error)
GetUserByID returns the user entry for the given user ID.
func (Service) GetUserByName ¶
func (s Service) GetUserByName(ctx context.Context, req *authd.GetUserByNameRequest) (*authd.User, error)
GetUserByName returns the user entry for the given username.
func (Service) ListGroups ¶
ListGroups returns all authd groups.
func (Service) SetGroupID ¶
func (s Service) SetGroupID(ctx context.Context, req *authd.SetGroupIDRequest) (*authd.SetGroupIDResponse, error)
SetGroupID sets the GID of a group.
func (Service) SetHomeDir ¶ added in v0.7.0
func (s Service) SetHomeDir(ctx context.Context, req *authd.SetHomeDirRequest) (*authd.SetHomeDirResponse, error)
SetHomeDir sets the home directory of a user.
func (Service) SetShell ¶ added in v0.7.0
func (s Service) SetShell(ctx context.Context, req *authd.SetShellRequest) (*authd.SetShellResponse, error)
SetShell sets the shell of a user.
func (Service) SetUserID ¶
func (s Service) SetUserID(ctx context.Context, req *authd.SetUserIDRequest) (*authd.SetUserIDResponse, error)
SetUserID sets the UID of a user.
func (Service) UnlockUser ¶
func (s Service) UnlockUser(ctx context.Context, req *authd.UnlockUserRequest) (*authd.Empty, error)
UnlockUser marks a user as unlocked.