spec

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: BSD-2-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

func NewDevice

func NewDevice(target string, type_, major, minor int) Device

func (Device) FileAttr

func (t Device) FileAttr() *FileAttr

func (Device) Major

func (d Device) Major() int

func (Device) Minor

func (d Device) Minor() int

func (Device) Source

func (d Device) Source() string

func (Device) Target

func (t Device) Target() string

func (Device) Type

func (d Device) Type() int

type Directory

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

func NewDirectory

func NewDirectory(target string) Directory

func (Directory) FileAttr

func (t Directory) FileAttr() *FileAttr

func (Directory) Source

func (d Directory) Source() string

func (Directory) Target

func (t Directory) Target() string

type FileAttr

type FileAttr struct {
	Uid  int // User id
	Gid  int // Group id
	Mode int // File mode
}

General file attributes: if these are not specified in the spec, these will default to root:root with mode 0755 for type Directory and root:root with mode 0644 for RegularFile, Device and Link.

type Link struct {
	// contains filtered or unexported fields
}
func NewLink(source, target string, hardLink bool) Link

func (Link) FileAttr

func (t Link) FileAttr() *FileAttr
func (l Link) HardLink() bool

func (Link) Source

func (l Link) Source() string

func (Link) Target

func (t Link) Target() string

type RegularFile

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

func NewRegularFile

func NewRegularFile(source, target string) RegularFile

func (RegularFile) FileAttr

func (t RegularFile) FileAttr() *FileAttr

func (RegularFile) Source

func (r RegularFile) Source() string

func (RegularFile) Target

func (t RegularFile) Target() string

type Run

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

func NewRun

func NewRun(command string) Run

func (Run) Command

func (r Run) Command() string

func (Run) FileAttr

func (r Run) FileAttr() *FileAttr

func (Run) Source

func (r Run) Source() string

func (Run) Target

func (r Run) Target() string

type Statement

type Statement interface {
	// Source outside the chroot, may be empty
	Source() string

	// Target inside the chroot, may be empty
	Target() string

	// Filesystem attributes, may return nil
	FileAttr() *FileAttr
}

type Statements

type Statements []Statement

func Parse

func Parse(filename string) (Statements, error)

func (Statements) Len

func (s Statements) Len() int

func (Statements) Less

func (s Statements) Less(i, j int) bool

func (Statements) Swap

func (s Statements) Swap(i, j int)

Jump to

Keyboard shortcuts

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