mode

package
v0.0.0-...-215933a Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileModeDiff

type FileModeDiff struct {
	Actual   os.FileMode
	Expected os.FileMode
}

FileModeDiff shows a diff of the file modes

func (*FileModeDiff) Changes

func (diff *FileModeDiff) Changes() bool

Changes returns true if the expected file mode differs from the current mode

func (*FileModeDiff) Current

func (diff *FileModeDiff) Current() string

Current shows the current file mode

func (*FileModeDiff) Original

func (diff *FileModeDiff) Original() string

Original shows the original file mode

type Mode

type Mode struct {
	resource.Status

	Destination string
	Mode        os.FileMode
}

Mode monitors the mode of a file

func (*Mode) Apply

func (t *Mode) Apply() (resource.TaskStatus, error)

Apply the changes the Mode

func (*Mode) Check

Check whether the Destination has the right Mode

func (*Mode) Validate

func (t *Mode) Validate() error

Validate Mode

type Preparer

type Preparer struct {
	// Destination specifies which file will be modified by this resource. The
	// file must exist on the system (for example, having been created with
	// `file.content`.)
	Destination string `hcl:"destination" required:"true"`

	// Mode is the mode of the file, specified in octal.
	Mode *uint32 `hcl:"mode" base:"8" required:"true"`
}

Preparer for file Mode

Mode monitors the mode of a file

func (*Preparer) Prepare

func (p *Preparer) Prepare(render resource.Renderer) (resource.Task, error)

Prepare this resource for use

Jump to

Keyboard shortcuts

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