resource

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr struct {
	Address   string `json:"address"`
	Reachable bool   `json:"reachable"`
	Timeout   int64  `json:"timeout"`
}

func NewAddr

func NewAddr(sysAddr system.Addr) *Addr

func (*Addr) Validate

func (h *Addr) Validate(sys *system.System) []TestResult

type Command

type Command struct {
	Command    string   `json:"command"`
	ExitStatus string   `json:"exit-status"`
	Stdout     []string `json:"stdout"`
	Stderr     []string `json:"stderr"`
}

func NewCommand

func NewCommand(sysCommand system.Command) *Command

func (*Command) Validate

func (c *Command) Validate(sys *system.System) []TestResult

type DNS

type DNS struct {
	Host        string   `json:"host"`
	Resolveable bool     `json:"resolveable"`
	Addrs       []string `json:"addrs,omitempty"`
	Timeout     int64    `json:"timeout"`
}

func NewDNS

func NewDNS(sysDNS system.DNS) *DNS

func (*DNS) Validate

func (d *DNS) Validate(sys *system.System) []TestResult

type File

type File struct {
	Path     string   `json:"path"`
	Exists   bool     `json:"exists"`
	Mode     string   `json:"mode,omitempty"`
	Owner    string   `json:"owner,omitempty"`
	Group    string   `json:"group,omitempty"`
	LinkedTo string   `json:"linked-to,omitempty"`
	Filetype string   `json:"filetype,omitempty"`
	Contains []string `json:"contains"`
}

func NewFile

func NewFile(sysFile system.File) *File

func (*File) Validate

func (f *File) Validate(sys *system.System) []TestResult

type Gossfile

type Gossfile struct {
	Path string `json:"path"`
}

func NewGossfile

func NewGossfile(sysGossfile system.Gossfile) *Gossfile

type Group

type Group struct {
	Groupname string `json:"groupname"`
	Exists    bool   `json:"exists"`
	Gid       string `json:"gid,omitempty"`
}

func NewGroup

func NewGroup(sysGroup system.Group) *Group

func (*Group) Validate

func (s *Group) Validate(sys *system.System) []TestResult

type Package

type Package struct {
	Name      string   `json:"name"`
	Installed bool     `json:"installed"`
	Versions  []string `json:"versions,omitempty"`
}

func NewPackage

func NewPackage(sysPackage system.Package) *Package

func (*Package) Validate

func (p *Package) Validate(sys *system.System) []TestResult

type Port

type Port struct {
	Port      string `json:"port"`
	Listening bool   `json:"listening"`
	IP        string `json:"ip,omitempty"`
}

func NewPort

func NewPort(sysPort system.Port) *Port

func (*Port) Validate

func (p *Port) Validate(sys *system.System) []TestResult

type Process

type Process struct {
	Executable string `json:"executable"`
	Running    bool   `json:"running"`
}

func NewProcess

func NewProcess(sysProcess system.Process) *Process

func (*Process) Validate

func (p *Process) Validate(sys *system.System) []TestResult

type Resource

type Resource interface {
	Validate(*system.System) []TestResult
}

type Service

type Service struct {
	Service string `json:"service"`
	Enabled bool   `json:"enabled"`
	Running bool   `json:"running"`
}

func NewService

func NewService(sysService system.Service) *Service

func (*Service) Validate

func (s *Service) Validate(sys *system.System) []TestResult

type TestResult

type TestResult struct {
	Result   bool
	Desc     string
	Duration time.Duration
}

func ValidateContains

func ValidateContains(title, property string, expectedValues []string, method func() (io.Reader, error)) TestResult

func ValidateValue

func ValidateValue(title, property, expectedValue interface{}, method func() (interface{}, error)) TestResult

func ValidateValues

func ValidateValues(title, property string, expectedValues []string, method func() ([]string, error)) TestResult

type User

type User struct {
	Username string   `json:"username"`
	Exists   bool     `json:"exists"`
	UID      string   `json:"uid,omitempty"`
	Gid      string   `json:"gid,omitempty"`
	Groups   []string `json:"groups,omitempty"`
	Home     string   `json:"home,omitempty"`
}

func NewUser

func NewUser(sysUser system.User) *User

func (*User) Validate

func (s *User) Validate(sys *system.System) []TestResult

Jump to

Keyboard shortcuts

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