sys

package
v0.0.0-...-01ee8fb Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sys contains types and functions useful for finding system information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupId

type GroupId uint32

A system group ID, aka GID.

type GroupRegistry

type GroupRegistry interface {
	FindById(id GroupId) (string, error)
	FindByName(name string) (GroupId, error)
}

GroupRegistry represents an object that knows about user account group names and IDs.

func NewGroupRegistry

func NewGroupRegistry() GroupRegistry

Return a group registry hooked up to the system's real group registry.

type NotFoundError

type NotFoundError string

NotFoundError is returned by registry lookup methods when the requested user or group cannot be found.

func (NotFoundError) Error

func (e NotFoundError) Error() string

type UserId

type UserId uint32

A system user ID, aka UID.

type UserRegistry

type UserRegistry interface {
	FindById(id UserId) (string, error)
	FindByName(name string) (UserId, error)
}

UserRegistry represents an object that knows about user account names and IDs.

func NewUserRegistry

func NewUserRegistry() UserRegistry

Return a user registry hooked up to the system's real user registry.

Directories

Path Synopsis
Package group allows group lookups by name or id.
Package group allows group lookups by name or id.

Jump to

Keyboard shortcuts

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