entities

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2015 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scan

func Scan() common.Entities

Scan returns a slice of all the defined entities. If an error is encountered during the scan, it will be reported on stdout, and nil is returned.

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group represents a UNIX group (as registered in /etc/group). It implements the Entity interface and is handled accordingly.

func (Group) Apply

func (g Group) Apply(withForce bool)

Apply performs the complete application algorithm for the given Entity. If the group does not exist yet, it is created. If it does exist, but some attributes do not match, it will be updated, but only if withForce is given.

func (Group) EntityID

func (g Group) EntityID() string

EntityID implements the Entity interface for Group.

func (Group) RenderDiff

func (group Group) RenderDiff() ([]byte, error)

RenderDiff implements the common.Entity interface.

func (Group) Report

func (g Group) Report() *shared.Report

Report implements the Entity interface for Group.

type User

type User struct {
	// contains filtered or unexported fields
}

User represents a UNIX user account (as registered in /etc/passwd). It implements the Entity interface and is handled accordingly.

func (User) Apply

func (u User) Apply(withForce bool)

Apply performs the complete application algorithm for the given Entity. If the group does not exist yet, it is created. If it does exist, but some attributes do not match, it will be updated, but only if withForce is given.

func (User) EntityID

func (u User) EntityID() string

EntityID implements the Entity interface for User.

func (User) RenderDiff

func (user User) RenderDiff() ([]byte, error)

RenderDiff implements the common.Entity interface.

func (User) Report

func (u User) Report() *shared.Report

Report implements the Entity interface for User.

Jump to

Keyboard shortcuts

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