Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecutor ¶
type CommandExecutor interface {
Run(ctx context.Context, name string, args ...string) (exitCode int, output string, err error)
RunAsUser(ctx context.Context, username string, name string, args ...string) (exitCode int, output string, err error)
RunWithInput(ctx context.Context, input string, name string, args ...string) (exitCode int, output string, err error)
}
CommandExecutor interface defines the contract for executing system commands This is duplicated here to avoid circular dependency with handlers package
type DefaultGroupService ¶
type DefaultGroupService struct {
// contains filtered or unexported fields
}
DefaultGroupService is the default implementation of GroupService
func NewDefaultGroupService ¶
func NewDefaultGroupService(executor CommandExecutor) *DefaultGroupService
NewDefaultGroupService creates a new DefaultGroupService
func (*DefaultGroupService) AddUserToGroups ¶
func (s *DefaultGroupService) AddUserToGroups(ctx context.Context, username string, gids []uint64) error
AddUserToGroups adds a user to one or more groups by GID
Click to show internal directories.
Click to hide internal directories.