Versions in this module Expand all Collapse all v0 v0.2.0 Oct 3, 2026 v0.1.0 Oct 1, 2026 Changes in this version + type CreateGroupOpts struct + GID int + Name string + System bool + type CreateUserOpts struct + GID int + Groups []string + Home string + Name string + PasswordHash string + Shell string + System bool + UID int + type Darwin struct + func NewDarwinProvider() *Darwin + func (d *Darwin) AddKey(_ context.Context, _ string, _ SSHKey) (*SSHKeyResult, error) + func (d *Darwin) ChangePassword(_ context.Context, _ string, _ string) (*Result, error) + func (d *Darwin) CreateGroup(_ context.Context, _ CreateGroupOpts) (*GroupResult, error) + func (d *Darwin) CreateUser(_ context.Context, _ CreateUserOpts) (*Result, error) + func (d *Darwin) DeleteGroup(_ context.Context, _ string) (*GroupResult, error) + func (d *Darwin) DeleteUser(_ context.Context, _ string) (*Result, error) + func (d *Darwin) GetGroup(_ context.Context, _ string) (*Group, error) + func (d *Darwin) GetUser(_ context.Context, _ string) (*User, error) + func (d *Darwin) ListGroups(_ context.Context) ([]Group, error) + func (d *Darwin) ListKeys(_ context.Context, _ string) ([]SSHKey, error) + func (d *Darwin) ListUsers(_ context.Context) ([]User, error) + func (d *Darwin) RemoveKey(_ context.Context, _ string, _ string) (*SSHKeyResult, error) + func (d *Darwin) UpdateGroup(_ context.Context, _ string, _ UpdateGroupOpts) (*GroupResult, error) + func (d *Darwin) UpdateUser(_ context.Context, _ string, _ UpdateUserOpts) (*Result, error) + type Debian struct + func NewDebianProvider(logger *slog.Logger, fs avfs.VFS, execManager exec.Manager) *Debian + func (d *Debian) AddKey(ctx context.Context, username string, key SSHKey) (*SSHKeyResult, error) + func (d *Debian) ChangePassword(ctx context.Context, name string, passwordHash string) (*Result, error) + func (d *Debian) CreateGroup(ctx context.Context, opts CreateGroupOpts) (*GroupResult, error) + func (d *Debian) CreateUser(ctx context.Context, opts CreateUserOpts) (*Result, error) + func (d *Debian) DeleteGroup(ctx context.Context, name string) (*GroupResult, error) + func (d *Debian) DeleteUser(ctx context.Context, name string) (*Result, error) + func (d *Debian) GetGroup(ctx context.Context, name string) (*Group, error) + func (d *Debian) GetUser(ctx context.Context, name string) (*User, error) + func (d *Debian) ListGroups(ctx context.Context) ([]Group, error) + func (d *Debian) ListKeys(ctx context.Context, username string) ([]SSHKey, error) + func (d *Debian) ListUsers(ctx context.Context) ([]User, error) + func (d *Debian) RemoveKey(ctx context.Context, username string, fingerprint string) (*SSHKeyResult, error) + func (d *Debian) UpdateGroup(ctx context.Context, name string, opts UpdateGroupOpts) (*GroupResult, error) + func (d *Debian) UpdateUser(ctx context.Context, name string, opts UpdateUserOpts) (*Result, error) + type Group struct + GID int + Members []string + Name string + type GroupResult struct + Changed bool + Error string + Name string + type Linux struct + func NewLinuxProvider() *Linux + func (l *Linux) AddKey(_ context.Context, _ string, _ SSHKey) (*SSHKeyResult, error) + func (l *Linux) ChangePassword(_ context.Context, _ string, _ string) (*Result, error) + func (l *Linux) CreateGroup(_ context.Context, _ CreateGroupOpts) (*GroupResult, error) + func (l *Linux) CreateUser(_ context.Context, _ CreateUserOpts) (*Result, error) + func (l *Linux) DeleteGroup(_ context.Context, _ string) (*GroupResult, error) + func (l *Linux) DeleteUser(_ context.Context, _ string) (*Result, error) + func (l *Linux) GetGroup(_ context.Context, _ string) (*Group, error) + func (l *Linux) GetUser(_ context.Context, _ string) (*User, error) + func (l *Linux) ListGroups(_ context.Context) ([]Group, error) + func (l *Linux) ListKeys(_ context.Context, _ string) ([]SSHKey, error) + func (l *Linux) ListUsers(_ context.Context) ([]User, error) + func (l *Linux) RemoveKey(_ context.Context, _ string, _ string) (*SSHKeyResult, error) + func (l *Linux) UpdateGroup(_ context.Context, _ string, _ UpdateGroupOpts) (*GroupResult, error) + func (l *Linux) UpdateUser(_ context.Context, _ string, _ UpdateUserOpts) (*Result, error) + type Provider interface + AddKey func(ctx context.Context, username string, key SSHKey) (*SSHKeyResult, error) + ChangePassword func(ctx context.Context, name string, passwordHash string) (*Result, error) + CreateGroup func(ctx context.Context, opts CreateGroupOpts) (*GroupResult, error) + CreateUser func(ctx context.Context, opts CreateUserOpts) (*Result, error) + DeleteGroup func(ctx context.Context, name string) (*GroupResult, error) + DeleteUser func(ctx context.Context, name string) (*Result, error) + GetGroup func(ctx context.Context, name string) (*Group, error) + GetUser func(ctx context.Context, name string) (*User, error) + ListGroups func(ctx context.Context) ([]Group, error) + ListKeys func(ctx context.Context, username string) ([]SSHKey, error) + ListUsers func(ctx context.Context) ([]User, error) + RemoveKey func(ctx context.Context, username string, fingerprint string) (*SSHKeyResult, error) + UpdateGroup func(ctx context.Context, name string, opts UpdateGroupOpts) (*GroupResult, error) + UpdateUser func(ctx context.Context, name string, opts UpdateUserOpts) (*Result, error) + type Result struct + Changed bool + Error string + Name string + type SSHKey struct + Comment string + Fingerprint string + RawLine string + Type string + type SSHKeyResult struct + Changed bool + type UpdateGroupOpts struct + Members []string + type UpdateUserOpts struct + Groups []string + Home string + Lock *bool + Shell string + type User struct + GID int + Groups []string + Home string + Locked bool + Name string + Shell string + UID int