user

package
v0.20.0 Latest Latest
Warning

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

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

Documentation

Overview

user provides an extended User struct to simplify usage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	*user.User
	Groupname string
	// For convenience so users don't need to strconv themselves.
	UidNo int
	GidNo int
}

User represents a user account.

func Current

func Current() (*User, error)

Current returns the current user.

func Lookup

func Lookup(username string) (*User, error)

Lookup looks up a user by username.

func LookupId

func LookupId(uid string) (*User, error)

LookupId looks up a user by userid.

Jump to

Keyboard shortcuts

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