Documentation ¶
Index ¶
- Constants
- func NetworkdUnitsPath() string
- func SystemdDropinsPath(unitName string) string
- func SystemdUnitsPath() string
- type File
- type Util
- func (u Util) AuthorizeSSHKeys(c types.User) error
- func (u Util) CreateGroup(g types.Group) error
- func (u Util) CreateUser(c types.User) error
- func (u Util) EnableUnit(unit types.SystemdUnit) error
- func (u Util) JoinPath(path ...string) string
- func (u Util) MaskUnit(unit types.SystemdUnit) error
- func (u Util) SetPasswordHash(c types.User) error
- func (u Util) WriteFile(f *File) error
Constants ¶
View Source
const ( DefaultDirectoryPermissions os.FileMode = 0755 DefaultFilePermissions os.FileMode = 0644 )
View Source
const (
DefaultPresetPermissions os.FileMode = 0644
)
Variables ¶
This section is empty.
Functions ¶
func NetworkdUnitsPath ¶
func NetworkdUnitsPath() string
func SystemdDropinsPath ¶
func SystemdUnitsPath ¶
func SystemdUnitsPath() string
Types ¶
type File ¶
type File struct { io.ReadCloser hash.Hash Path types.Path Mode os.FileMode Uid int Gid int // contains filtered or unexported fields }
func FileFromNetworkdUnit ¶
func FileFromNetworkdUnit(unit types.NetworkdUnit) *File
func FileFromSystemdUnit ¶
func FileFromSystemdUnit(unit types.SystemdUnit) *File
func FileFromUnitDropin ¶
func FileFromUnitDropin(unit types.SystemdUnit, dropin types.SystemdUnitDropIn) *File
func RenderFile ¶
RenderFile returns a *File with a Reader that downloads, hashes, and decompresses the incoming data. It returns nil if f had invalid options. Errors reading/verifying/decompressing the file will present themselves when the Reader is actually read from.
type Util ¶
Util encapsulates logging and destdir indirection for the util methods.
func (Util) AuthorizeSSHKeys ¶
Add the provided SSH public keys to the user's authorized keys.
func (Util) CreateGroup ¶
CreateGroup creates the group as described.
func (Util) CreateUser ¶
CreateUser creates the user as described.
func (Util) EnableUnit ¶
func (u Util) EnableUnit(unit types.SystemdUnit) error
func (Util) SetPasswordHash ¶
SetPasswordHash sets the password hash of the specified user.
Click to show internal directories.
Click to hide internal directories.