files

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionScript string

ActionScript is the action script content.

View Source
var RuntimeVars string

RuntimeVars is the runtime variables script.

Functions

func DefaultHosts

func DefaultHosts() []byte

DefaultHosts creates the default hosts file.

func Group

func Group(path string, uid int, gids []int, customLookup UserGroupLookup) (content []byte, err error)

Group creates a group template based on content of file provided in path, updates content with current user information and returns content

func Hostname

func Hostname(hostname string) (content []byte, err error)

Hostname creates a hostname content with provided hostname and returns it

func Passwd

func Passwd(path string, home string, uid int, customLookup UserGroupLookup) (content []byte, err error)

Passwd creates a passwd template based on content of file provided in path, updates content with current user information and returns content.

func ResolvConf

func ResolvConf(dns []string) (content []byte, err error)

ResolvConf creates a resolv.conf content with provided dns list and returns it

Types

type UserGroupLookup added in v1.2.0

type UserGroupLookup interface {
	GetPwUID(uint32) (*user.User, error)
	GetGrGID(uint32) (*user.Group, error)
	Getgroups() ([]int, error)
}

Jump to

Keyboard shortcuts

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