Documentation
¶
Index ¶
- type DummySyncer
- func (s *DummySyncer) AddGroup(ctx context.Context, g etcdpasswd.Group) error
- func (s *DummySyncer) AddUser(ctx context.Context, u *etcdpasswd.User) error
- func (s *DummySyncer) LockPassword(ctx context.Context, name string) error
- func (s *DummySyncer) LookupGroup(ctx context.Context, name string) (*etcdpasswd.Group, error)
- func (s *DummySyncer) LookupUser(ctx context.Context, name string) (*etcdpasswd.User, error)
- func (s *DummySyncer) RemoveGroup(ctx context.Context, name string) error
- func (s *DummySyncer) RemoveUser(ctx context.Context, name string) error
- func (s *DummySyncer) SetDisplayName(ctx context.Context, name, displayName string) error
- func (s *DummySyncer) SetPrimaryGroup(ctx context.Context, name, group string) error
- func (s *DummySyncer) SetPubKeys(ctx context.Context, name string, pubkeys []string) error
- func (s *DummySyncer) SetShell(ctx context.Context, name, shell string) error
- func (s *DummySyncer) SetSupplementalGroups(ctx context.Context, name string, groups []string) error
- type MockSyncer
- func (s *MockSyncer) AddGroup(ctx context.Context, group etcdpasswd.Group) error
- func (s *MockSyncer) AddUser(ctx context.Context, user *etcdpasswd.User) error
- func (s *MockSyncer) LockPassword(ctx context.Context, name string) error
- func (s *MockSyncer) LookupGroup(ctx context.Context, name string) (*etcdpasswd.Group, error)
- func (s *MockSyncer) LookupUser(ctx context.Context, name string) (*etcdpasswd.User, error)
- func (s *MockSyncer) RemoveGroup(ctx context.Context, name string) error
- func (s *MockSyncer) RemoveUser(ctx context.Context, name string) error
- func (s *MockSyncer) SetDisplayName(ctx context.Context, name, displayName string) error
- func (s *MockSyncer) SetPrimaryGroup(ctx context.Context, name, group string) error
- func (s *MockSyncer) SetPubKeys(ctx context.Context, name string, pubkeys []string) error
- func (s *MockSyncer) SetShell(ctx context.Context, name, shell string) error
- func (s *MockSyncer) SetSupplementalGroups(ctx context.Context, name string, groups []string) error
- type UbuntuSyncer
- func (s UbuntuSyncer) AddGroup(ctx context.Context, g etcdpasswd.Group) error
- func (s UbuntuSyncer) AddUser(ctx context.Context, u *etcdpasswd.User) error
- func (s UbuntuSyncer) LockPassword(ctx context.Context, name string) error
- func (s UbuntuSyncer) LookupGroup(ctx context.Context, name string) (*etcdpasswd.Group, error)
- func (s UbuntuSyncer) LookupUser(ctx context.Context, name string) (*etcdpasswd.User, error)
- func (s UbuntuSyncer) RemoveGroup(ctx context.Context, name string) error
- func (s UbuntuSyncer) RemoveUser(ctx context.Context, name string) error
- func (s UbuntuSyncer) SetDisplayName(ctx context.Context, name, displayName string) error
- func (s UbuntuSyncer) SetPrimaryGroup(ctx context.Context, name, group string) error
- func (s UbuntuSyncer) SetPubKeys(ctx context.Context, name string, pubkeys []string) error
- func (s UbuntuSyncer) SetShell(ctx context.Context, name, shell string) error
- func (s UbuntuSyncer) SetSupplementalGroups(ctx context.Context, name string, groups []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummySyncer ¶
type DummySyncer struct {
// contains filtered or unexported fields
}
DummySyncer emulates synchronization with OS-local users/groups.
func (*DummySyncer) AddGroup ¶
func (s *DummySyncer) AddGroup(ctx context.Context, g etcdpasswd.Group) error
AddGroup implements etcdpasswd.Syncer interface.
func (*DummySyncer) AddUser ¶
func (s *DummySyncer) AddUser(ctx context.Context, u *etcdpasswd.User) error
AddUser implements etcdpasswd.Syncer interface.
func (*DummySyncer) LockPassword ¶
func (s *DummySyncer) LockPassword(ctx context.Context, name string) error
LockPassword implements etcdpasswd.Syncer interface.
func (*DummySyncer) LookupGroup ¶
func (s *DummySyncer) LookupGroup(ctx context.Context, name string) (*etcdpasswd.Group, error)
LookupGroup implements etcdpasswd.Syncer interface.
func (*DummySyncer) LookupUser ¶
func (s *DummySyncer) LookupUser(ctx context.Context, name string) (*etcdpasswd.User, error)
LookupUser implements etcdpasswd.Syncer interface.
func (*DummySyncer) RemoveGroup ¶
func (s *DummySyncer) RemoveGroup(ctx context.Context, name string) error
RemoveGroup implements etcdpasswd.Syncer interface.
func (*DummySyncer) RemoveUser ¶
func (s *DummySyncer) RemoveUser(ctx context.Context, name string) error
RemoveUser implements etcdpasswd.Syncer interface.
func (*DummySyncer) SetDisplayName ¶
func (s *DummySyncer) SetDisplayName(ctx context.Context, name, displayName string) error
SetDisplayName implements etcdpasswd.Syncer interface.
func (*DummySyncer) SetPrimaryGroup ¶
func (s *DummySyncer) SetPrimaryGroup(ctx context.Context, name, group string) error
SetPrimaryGroup implements etcdpasswd.Syncer interface.
func (*DummySyncer) SetPubKeys ¶
SetPubKeys implements etcdpasswd.Syncer interface.
func (*DummySyncer) SetShell ¶
func (s *DummySyncer) SetShell(ctx context.Context, name, shell string) error
SetShell implements etcdpasswd.Syncer interface.
func (*DummySyncer) SetSupplementalGroups ¶
func (s *DummySyncer) SetSupplementalGroups(ctx context.Context, name string, groups []string) error
SetSupplementalGroups implements etcdpasswd.Syncer interface.
type MockSyncer ¶
type MockSyncer struct { Users map[string]*etcdpasswd.User Groups map[string]*etcdpasswd.Group LockedUsers map[string]bool }
MockSyncer is a memory-only synchronizer for tests.
func (*MockSyncer) AddGroup ¶
func (s *MockSyncer) AddGroup(ctx context.Context, group etcdpasswd.Group) error
AddGroup implements etcdpasswd.Syncer interface.
func (*MockSyncer) AddUser ¶
func (s *MockSyncer) AddUser(ctx context.Context, user *etcdpasswd.User) error
AddUser implements etcdpasswd.Syncer interface.
func (*MockSyncer) LockPassword ¶
func (s *MockSyncer) LockPassword(ctx context.Context, name string) error
LockPassword implements etcdpasswd.Syncer interface.
func (*MockSyncer) LookupGroup ¶
func (s *MockSyncer) LookupGroup(ctx context.Context, name string) (*etcdpasswd.Group, error)
LookupGroup implements etcdpasswd.Syncer interface.
func (*MockSyncer) LookupUser ¶
func (s *MockSyncer) LookupUser(ctx context.Context, name string) (*etcdpasswd.User, error)
LookupUser implements etcdpasswd.Syncer interface.
func (*MockSyncer) RemoveGroup ¶
func (s *MockSyncer) RemoveGroup(ctx context.Context, name string) error
RemoveGroup implements etcdpasswd.Syncer interface.
func (*MockSyncer) RemoveUser ¶
func (s *MockSyncer) RemoveUser(ctx context.Context, name string) error
RemoveUser implements etcdpasswd.Syncer interface.
func (*MockSyncer) SetDisplayName ¶
func (s *MockSyncer) SetDisplayName(ctx context.Context, name, displayName string) error
SetDisplayName implements etcdpasswd.Syncer interface.
func (*MockSyncer) SetPrimaryGroup ¶
func (s *MockSyncer) SetPrimaryGroup(ctx context.Context, name, group string) error
SetPrimaryGroup implements etcdpasswd.Syncer interface.
func (*MockSyncer) SetPubKeys ¶
SetPubKeys implements etcdpasswd.Syncer interface.
func (*MockSyncer) SetShell ¶
func (s *MockSyncer) SetShell(ctx context.Context, name, shell string) error
SetShell implements etcdpasswd.Syncer interface.
func (*MockSyncer) SetSupplementalGroups ¶
SetSupplementalGroups implements etcdpasswd.Syncer interface.
type UbuntuSyncer ¶
type UbuntuSyncer struct{}
UbuntuSyncer synchronizes with local users/groups of Debian/Ubuntu OS.
func (UbuntuSyncer) AddGroup ¶
func (s UbuntuSyncer) AddGroup(ctx context.Context, g etcdpasswd.Group) error
AddGroup implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) AddUser ¶
func (s UbuntuSyncer) AddUser(ctx context.Context, u *etcdpasswd.User) error
AddUser implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) LockPassword ¶
func (s UbuntuSyncer) LockPassword(ctx context.Context, name string) error
LockPassword implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) LookupGroup ¶
func (s UbuntuSyncer) LookupGroup(ctx context.Context, name string) (*etcdpasswd.Group, error)
LookupGroup implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) LookupUser ¶
func (s UbuntuSyncer) LookupUser(ctx context.Context, name string) (*etcdpasswd.User, error)
LookupUser implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) RemoveGroup ¶
func (s UbuntuSyncer) RemoveGroup(ctx context.Context, name string) error
RemoveGroup implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) RemoveUser ¶
func (s UbuntuSyncer) RemoveUser(ctx context.Context, name string) error
RemoveUser implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) SetDisplayName ¶
func (s UbuntuSyncer) SetDisplayName(ctx context.Context, name, displayName string) error
SetDisplayName implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) SetPrimaryGroup ¶
func (s UbuntuSyncer) SetPrimaryGroup(ctx context.Context, name, group string) error
SetPrimaryGroup implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) SetPubKeys ¶
SetPubKeys implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) SetShell ¶
func (s UbuntuSyncer) SetShell(ctx context.Context, name, shell string) error
SetShell implements etcdpasswd.Syncer interface.
func (UbuntuSyncer) SetSupplementalGroups ¶
func (s UbuntuSyncer) SetSupplementalGroups(ctx context.Context, name string, groups []string) error
SetSupplementalGroups implements etcdpasswd.Syncer interface.