group

package
Version: v0.0.0-...-7935e33 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: BSD-3-Clause, MPL-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Gid      uint32 // group id
	Name     string
	Password string
	Members  []string
}

Group represents a group entry

func List

func List() ([]*Group, error)

List returns a list of all group entries on the system.

func Lookup

func Lookup(groupname string) (*Group, error)

Lookup looks up a group by its name. If the group cannot be found, the error is of type UnknownGroupError.

func LookupId

func LookupId(gid string) (*Group, error)

LookupId looks up a group by its gid. If the group cannot be found, the error is of type UnknownGroupIdError.

func LookupUid

func LookupUid(uid string) ([]*Group, error)

LookupUId returns a list of groups a given userid is associated with. If the no groups can be found, the error is of type user.UnknownUserIdError.

func LookupUser

func LookupUser(username string) ([]*Group, error)

LookupUser returns a list of groups a given username is associated with. If the no groups can be found, the error is of type user.UnknownUserError.

type UnknownGroupError

type UnknownGroupError string

UnknownGroupError is returned by Lookup when a group cannot be found.

func (UnknownGroupError) Error

func (e UnknownGroupError) Error() string

type UnknownGroupIdError

type UnknownGroupIdError int

UnknownGroupIdError is returned by LookupId when a group cannot be found.

func (UnknownGroupIdError) Error

func (e UnknownGroupIdError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL