dummyidm

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotImplementedIdm = New() //nolint:gochecknoglobals // Used as default Idm for other file systems.

NotImplementedIdm is the default identity manager for all file systems.

Functions

This section is empty.

Types

type DummyGroup added in v0.3.2

type DummyGroup struct {
	// contains filtered or unexported fields
}

DummyGroup is the implementation of avfs.GroupReader.

func NewGroup added in v0.3.2

func NewGroup(name string, gid int) *DummyGroup

func (*DummyGroup) Gid added in v0.3.2

func (g *DummyGroup) Gid() int

Gid returns the Group ID.

func (*DummyGroup) Name added in v0.3.2

func (g *DummyGroup) Name() string

Name returns the Group name.

type DummyIdm

type DummyIdm struct {
	// contains filtered or unexported fields
}

DummyIdm represent a non implemented identity manager using the avfs.IdentityMgr interface.

func New

func New() *DummyIdm

New create a new identity manager.

func (*DummyIdm) AdminGroup added in v0.3.2

func (idm *DummyIdm) AdminGroup() avfs.GroupReader

AdminGroup returns the administrators (root) group.

func (*DummyIdm) AdminUser added in v0.3.2

func (idm *DummyIdm) AdminUser() avfs.UserReader

AdminUser returns the administrator (root) user.

func (*DummyIdm) Features added in v0.2.0

func (idm *DummyIdm) Features() avfs.Features

Features returns the set of features provided by the file system or identity manager.

func (*DummyIdm) GroupAdd

func (idm *DummyIdm) GroupAdd(name string) (avfs.GroupReader, error)

GroupAdd adds a new group.

func (*DummyIdm) GroupDel

func (idm *DummyIdm) GroupDel(name string) error

GroupDel deletes an existing group.

func (*DummyIdm) HasFeature added in v0.2.0

func (idm *DummyIdm) HasFeature(feature avfs.Features) bool

HasFeature returns true if the file system or identity manager provides a given feature.

func (*DummyIdm) LookupGroup

func (idm *DummyIdm) 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 (*DummyIdm) LookupGroupId

func (idm *DummyIdm) 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 (*DummyIdm) LookupUser

func (idm *DummyIdm) 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 (*DummyIdm) LookupUserId

func (idm *DummyIdm) 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 (*DummyIdm) OSType added in v0.3.2

func (idm *DummyIdm) OSType() avfs.OSType

OSType returns the operating system type of the identity manager.

func (*DummyIdm) Type

func (idm *DummyIdm) Type() string

Type returns the type of the fileSystem or Identity manager.

func (*DummyIdm) UserAdd

func (idm *DummyIdm) UserAdd(name, groupName string) (avfs.UserReader, error)

UserAdd adds a new user.

func (*DummyIdm) UserDel

func (idm *DummyIdm) UserDel(name string) error

UserDel deletes an existing group.

type DummyUser added in v0.3.2

type DummyUser struct {
	// contains filtered or unexported fields
}

DummyUser is the implementation of avfs.UserReader.

func NewUser added in v0.3.2

func NewUser(name string, uid, gid int) *DummyUser

func (*DummyUser) Gid added in v0.3.2

func (u *DummyUser) Gid() int

Gid returns the primary Group ID of the User.

func (*DummyUser) IsAdmin added in v0.3.2

func (u *DummyUser) IsAdmin() bool

IsAdmin returns true if the user has administrator (root) privileges.

func (*DummyUser) Name added in v0.3.2

func (u *DummyUser) Name() string

Name returns the username.

func (*DummyUser) Uid added in v0.3.2

func (u *DummyUser) Uid() int

Uid returns the User ID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL