group

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGroupList

func GetGroupList(u *user.User) ([]string, error)

Types

type Group

type Group struct {
	Gid  string // group id
	Name string // group name
}

Group type

func CurrentGroup

func CurrentGroup() (*Group, error)

CurrentGroup returns the current group.

func LookupGroup

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

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

func LookupGroupID

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

LookupGroupID looks up a group by groupid. If the group cannot be found, the returned error is of type UnknownGroupIDError.

func (*Group) Members

func (g *Group) Members() ([]string, error)

Members returns the list of members of the group.

type UnknownGroupError

type UnknownGroupError string

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

func (UnknownGroupError) Error

func (e UnknownGroupError) Error() string

type UnknownGroupIDError

type UnknownGroupIDError int

UnknownGroupIDError is returned by LookupGroupID 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
y or Y : Canonical URL