Documentation ¶
Overview ¶
Package osidm implements an identity manager using os functions.
For testing only, should not be used in a production environment.
Index ¶
- func SetUser(name string) (avfs.UserReader, error)
- func User() avfs.UserReader
- type OsGroup
- type OsIdm
- func (idm *OsIdm) AdminGroup() avfs.GroupReader
- func (idm *OsIdm) AdminUser() avfs.UserReader
- func (idm *OsIdm) Features() avfs.Features
- func (idm *OsIdm) GroupAdd(name string) (avfs.GroupReader, error)
- func (idm *OsIdm) GroupDel(name string) error
- func (idm *OsIdm) HasFeature(feature avfs.Features) bool
- func (idm *OsIdm) LookupGroup(name string) (avfs.GroupReader, error)
- func (idm *OsIdm) LookupGroupId(gid int) (avfs.GroupReader, error)
- func (idm *OsIdm) LookupUser(name string) (avfs.UserReader, error)
- func (idm *OsIdm) LookupUserId(uid int) (avfs.UserReader, error)
- func (idm *OsIdm) OSType() avfs.OSType
- func (idm *OsIdm) SetUser(name string) (avfs.UserReader, error)
- func (idm *OsIdm) Type() string
- func (idm *OsIdm) User() avfs.UserReader
- func (idm *OsIdm) UserAdd(name, groupName string) (avfs.UserReader, error)
- func (idm *OsIdm) UserDel(name string) error
- type OsUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OsGroup ¶ added in v0.3.2
type OsGroup struct {
// contains filtered or unexported fields
}
OsGroup is the implementation of avfs.GroupReader.
type OsIdm ¶
type OsIdm struct {
// contains filtered or unexported fields
}
OsIdm implements a rudimentary identity manager using the avfs.IdentityMgr interface.
func (*OsIdm) AdminGroup ¶ added in v0.3.2
func (idm *OsIdm) AdminGroup() avfs.GroupReader
AdminGroup returns the administrator (root) group.
func (*OsIdm) AdminUser ¶ added in v0.3.2
func (idm *OsIdm) AdminUser() avfs.UserReader
AdminUser returns the administrator (root) user.
func (*OsIdm) Features ¶ added in v0.2.0
Features returns the set of features provided by the file system or identity manager.
func (*OsIdm) GroupAdd ¶
func (idm *OsIdm) GroupAdd(name string) (avfs.GroupReader, error)
GroupAdd adds a new group.
func (*OsIdm) HasFeature ¶ added in v0.2.0
HasFeature returns true if the file system or identity manager provides a given feature.
func (*OsIdm) LookupGroup ¶
func (idm *OsIdm) LookupGroup(name string) (avfs.GroupReader, error)
LookupGroup looks up a group by name. If the group cannot be found, the returned error is of type UnknownGroupError.
func (*OsIdm) LookupGroupId ¶
func (idm *OsIdm) LookupGroupId(gid int) (avfs.GroupReader, error)
LookupGroupId looks up a group by groupid. If the group cannot be found, the returned error is of type UnknownGroupIdError.
func (*OsIdm) LookupUser ¶
func (idm *OsIdm) LookupUser(name string) (avfs.UserReader, error)
LookupUser looks up a user by username. If the user cannot be found, the returned error is of type UnknownUserError.
func (*OsIdm) LookupUserId ¶
func (idm *OsIdm) LookupUserId(uid int) (avfs.UserReader, error)
LookupUserId looks up a user by userid. If the user cannot be found, the returned error is of type UnknownUserIdError.
func (*OsIdm) OSType ¶ added in v0.3.2
OSType returns the operating system type of the identity manager.
func (*OsIdm) SetUser ¶ added in v0.3.2
func (idm *OsIdm) SetUser(name string) (avfs.UserReader, error)
SetUser sets and returns the current user. If the user is not found, the returned error is of type UnknownUserError.
type OsUser ¶ added in v0.3.2
type OsUser struct {
// contains filtered or unexported fields
}
OsUser is the implementation of avfs.UserReader.