user

package
v0.0.0-...-2540391 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	GID   int
	Name  string
	Users []string
}

Group represents a group account.

type User

type User struct {
	UID   int
	GID   int
	Name  string
	Home  string
	Shell string
}

User represents a user account.

type UserCred

type UserCred struct {
	User *user.User
	Cred *syscall.Credential
}

UserCred contains user's credential and user info.

func GetUserCred

func GetUserCred(username string) (*UserCred, error)

GetUserCred returns a credential of specified user.

func GetUserCredByUID

func GetUserCredByUID(uid string) (*UserCred, error)

GetUserCredByUID returns a credential of specified user.

Jump to

Keyboard shortcuts

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