Documentation ¶
Index ¶
- Constants
- Variables
- type Addr
- type AddrMap
- func (r AddrMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Addr, error)
- func (r AddrMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Addr, system.Addr, bool)
- func (ret *AddrMap) UnmarshalJSON(data []byte) error
- func (ret *AddrMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Command
- type CommandMap
- func (r CommandMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Command, error)
- func (r CommandMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Command, system.Command, bool)
- func (ret *CommandMap) UnmarshalJSON(data []byte) error
- func (ret *CommandMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type DNS
- type DNSMap
- func (r DNSMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*DNS, error)
- func (r DNSMap) AppendSysResourceIfExists(sr string, sys *system.System) (*DNS, system.DNS, bool)
- func (ret *DNSMap) UnmarshalJSON(data []byte) error
- func (ret *DNSMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type File
- type FileMap
- func (r FileMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*File, error)
- func (r FileMap) AppendSysResourceIfExists(sr string, sys *system.System) (*File, system.File, bool)
- func (ret *FileMap) UnmarshalJSON(data []byte) error
- func (ret *FileMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Gossfile
- type GossfileMap
- func (r GossfileMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Gossfile, error)
- func (r GossfileMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Gossfile, system.Gossfile, bool)
- func (ret *GossfileMap) UnmarshalJSON(data []byte) error
- func (ret *GossfileMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Group
- type GroupMap
- func (r GroupMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Group, error)
- func (r GroupMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Group, system.Group, bool)
- func (ret *GroupMap) UnmarshalJSON(data []byte) error
- func (ret *GroupMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type HTTP
- type HTTPMap
- func (r HTTPMap) AppendSysResource(src string, sys *system.System, config util.Config) (*HTTP, error)
- func (r HTTPMap) AppendSysResourceIfExists(sr string, sys *system.System) (*HTTP, system.HTTP, bool)
- func (ret *HTTPMap) UnmarshalJSON(data []byte) error
- func (ret *HTTPMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Interface
- type InterfaceMap
- func (r InterfaceMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Interface, error)
- func (r InterfaceMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Interface, system.Interface, bool)
- func (ret *InterfaceMap) UnmarshalJSON(data []byte) error
- func (ret *InterfaceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type KernelParam
- type KernelParamMap
- func (r KernelParamMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*KernelParam, error)
- func (r KernelParamMap) AppendSysResourceIfExists(sr string, sys *system.System) (*KernelParam, system.KernelParam, bool)
- func (ret *KernelParamMap) UnmarshalJSON(data []byte) error
- func (ret *KernelParamMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Matching
- type MatchingMap
- type Mount
- type MountMap
- func (r MountMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Mount, error)
- func (r MountMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Mount, system.Mount, bool)
- func (ret *MountMap) UnmarshalJSON(data []byte) error
- func (ret *MountMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Package
- type PackageMap
- func (r PackageMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Package, error)
- func (r PackageMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Package, system.Package, bool)
- func (ret *PackageMap) UnmarshalJSON(data []byte) error
- func (ret *PackageMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Port
- type PortMap
- func (r PortMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Port, error)
- func (r PortMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Port, system.Port, bool)
- func (ret *PortMap) UnmarshalJSON(data []byte) error
- func (ret *PortMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Process
- type ProcessMap
- func (r ProcessMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Process, error)
- func (r ProcessMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Process, system.Process, bool)
- func (ret *ProcessMap) UnmarshalJSON(data []byte) error
- func (ret *ProcessMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Resource
- type ResourceRead
- type Service
- type ServiceMap
- func (r ServiceMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Service, error)
- func (r ServiceMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Service, system.Service, bool)
- func (ret *ServiceMap) UnmarshalJSON(data []byte) error
- func (ret *ServiceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type TestResult
- type User
- type UserMap
- func (r UserMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*User, error)
- func (r UserMap) AppendSysResourceIfExists(sr string, sys *system.System) (*User, system.User, bool)
- func (ret *UserMap) UnmarshalJSON(data []byte) error
- func (ret *UserMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
Constants ¶
View Source
const ( Value = iota Values Contains Header )
View Source
const ( SUCCESS = iota FAIL SKIP )
View Source
const DefaultTimeoutMS = 500
View Source
const TimeoutMS = 5000
Variables ¶
View Source
var BlacklistedAutoAddHeaders = [...]string{"Set-Cookie", "set-cookie", "Date", "date"}
Functions ¶
This section is empty.
Types ¶
type Addr ¶
type Addr struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Address string `json:"-" yaml:"-"` Reachable matcher `json:"reachable" yaml:"reachable"` Timeout int `json:"timeout" yaml:"timeout"` }
Addr resource validates a addr, i.e. tcp://127.0.0.1:80
type AddrMap ¶ added in v0.0.4
func (AddrMap) AppendSysResource ¶ added in v0.0.4
func (AddrMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*AddrMap) UnmarshalJSON ¶ added in v0.0.4
func (*AddrMap) UnmarshalYAML ¶ added in v0.1.0
type Command ¶
type Command struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Command string `json:"-" yaml:"-"` ExitStatus matcher `json:"exit-status" yaml:"exit-status"` Stdout []string `json:"stdout" yaml:"stdout"` Stderr []string `json:"stderr" yaml:"stderr"` Timeout int `json:"timeout" yaml:"timeout"` }
type CommandMap ¶ added in v0.0.4
func (CommandMap) AppendSysResource ¶ added in v0.0.4
func (CommandMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*CommandMap) UnmarshalJSON ¶ added in v0.0.4
func (ret *CommandMap) UnmarshalJSON(data []byte) error
func (*CommandMap) UnmarshalYAML ¶ added in v0.1.0
func (ret *CommandMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type DNS ¶
type DNS struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Host string `json:"-" yaml:"-"` Resolveable matcher `json:"resolveable,omitempty" yaml:"resolveable,omitempty"` Resolvable matcher `json:"resolvable" yaml:"resolvable"` Addrs matcher `json:"addrs,omitempty" yaml:"addrs,omitempty"` Timeout int `json:"timeout" yaml:"timeout"` Server string `json:"server,omitempty" yaml:"server,omitempty"` }
DNS represents the DNS resource
type DNSMap ¶ added in v0.0.4
func (DNSMap) AppendSysResource ¶ added in v0.0.4
func (DNSMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*DNSMap) UnmarshalJSON ¶ added in v0.0.4
func (*DNSMap) UnmarshalYAML ¶ added in v0.1.0
type File ¶
type File struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Path string `json:"-" yaml:"-"` Exists matcher `json:"exists" yaml:"exists"` Mode matcher `json:"mode,omitempty" yaml:"mode,omitempty"` Size matcher `json:"size,omitempty" yaml:"size,omitempty"` Owner matcher `json:"owner,omitempty" yaml:"owner,omitempty"` Group matcher `json:"group,omitempty" yaml:"group,omitempty"` LinkedTo matcher `json:"linked-to,omitempty" yaml:"linked-to,omitempty"` Filetype matcher `json:"filetype,omitempty" yaml:"filetype,omitempty"` Contains []string `json:"contains" yaml:"contains"` Md5 matcher `json:"md5,omitempty" yaml:"md5,omitempty"` Sha256 matcher `json:"sha256,omitempty" yaml:"sha256,omitempty"` }
type FileMap ¶ added in v0.0.4
func (FileMap) AppendSysResource ¶ added in v0.0.4
func (FileMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*FileMap) UnmarshalJSON ¶ added in v0.0.4
func (*FileMap) UnmarshalYAML ¶ added in v0.1.0
type Gossfile ¶
type Gossfile struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Path string `json:"-" yaml:"-"` }
func NewGossfile ¶
type GossfileMap ¶ added in v0.0.4
func (GossfileMap) AppendSysResource ¶ added in v0.0.4
func (GossfileMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*GossfileMap) UnmarshalJSON ¶ added in v0.0.4
func (ret *GossfileMap) UnmarshalJSON(data []byte) error
func (*GossfileMap) UnmarshalYAML ¶ added in v0.1.0
func (ret *GossfileMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Group ¶
type GroupMap ¶ added in v0.0.4
func (GroupMap) AppendSysResource ¶ added in v0.0.4
func (GroupMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*GroupMap) UnmarshalJSON ¶ added in v0.0.4
func (*GroupMap) UnmarshalYAML ¶ added in v0.1.0
type HTTP ¶ added in v0.1.10
type HTTP struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` HTTP string `json:"-" yaml:"-"` Status matcher `json:"status" yaml:"status"` AllowInsecure bool `json:"allow-insecure" yaml:"allow-insecure"` NoFollowRedirects bool `json:"no-follow-redirects" yaml:"no-follow-redirects"` Timeout int `json:"timeout" yaml:"timeout"` Body []string `json:"body" yaml:"body"` Username string `json:"username,omitempty" yaml:"username,omitempty"` Password string `json:"password,omitempty" yaml:"password,omitempty"` Headers map[string][]string `json:"headers,omitempty" yaml:"headers,omitempty"` RequestHeaders map[string][]string `json:"request-headers,omitempty" yaml:"request-headers,omitempty"` Cert string `json:"cert,omitempty" yaml:"cert,omitempty"` Key string `json:"key,omitempty" yaml:"key,omitempty"` }
type HTTPMap ¶ added in v0.1.10
func (HTTPMap) AppendSysResource ¶ added in v0.1.10
func (HTTPMap) AppendSysResourceIfExists ¶ added in v0.1.10
func (*HTTPMap) UnmarshalJSON ¶ added in v0.1.10
func (*HTTPMap) UnmarshalYAML ¶ added in v0.1.10
type Interface ¶ added in v0.1.8
type Interface struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Name string `json:"-" yaml:"-"` Exists matcher `json:"exists" yaml:"exists"` Addrs matcher `json:"addrs,omitempty" yaml:"addrs,omitempty"` MTU matcher `json:"mtu,omitempty" yaml:"mtu,omitempty"` }
func NewInterface ¶ added in v0.1.8
type InterfaceMap ¶ added in v0.1.8
func (InterfaceMap) AppendSysResource ¶ added in v0.1.8
func (InterfaceMap) AppendSysResourceIfExists ¶ added in v0.1.8
func (*InterfaceMap) UnmarshalJSON ¶ added in v0.1.8
func (ret *InterfaceMap) UnmarshalJSON(data []byte) error
func (*InterfaceMap) UnmarshalYAML ¶ added in v0.1.8
func (ret *InterfaceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type KernelParam ¶ added in v0.1.8
type KernelParam struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Key string `json:"-" yaml:"-"` Value matcher `json:"value" yaml:"value"` }
func NewKernelParam ¶ added in v0.1.8
func NewKernelParam(sysKernelParam system.KernelParam, config util.Config) (*KernelParam, error)
func (*KernelParam) GetMeta ¶ added in v0.1.8
func (r *KernelParam) GetMeta() meta
func (*KernelParam) GetTitle ¶ added in v0.1.8
func (r *KernelParam) GetTitle() string
FIXME: Can this be refactored?
func (*KernelParam) ID ¶ added in v0.1.8
func (a *KernelParam) ID() string
func (*KernelParam) SetID ¶ added in v0.1.8
func (a *KernelParam) SetID(id string)
func (*KernelParam) Validate ¶ added in v0.1.8
func (a *KernelParam) Validate(sys *system.System) []TestResult
type KernelParamMap ¶ added in v0.1.8
type KernelParamMap map[string]*KernelParam
func (KernelParamMap) AppendSysResource ¶ added in v0.1.8
func (r KernelParamMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*KernelParam, error)
func (KernelParamMap) AppendSysResourceIfExists ¶ added in v0.1.8
func (r KernelParamMap) AppendSysResourceIfExists(sr string, sys *system.System) (*KernelParam, system.KernelParam, bool)
func (*KernelParamMap) UnmarshalJSON ¶ added in v0.1.8
func (ret *KernelParamMap) UnmarshalJSON(data []byte) error
func (*KernelParamMap) UnmarshalYAML ¶ added in v0.1.8
func (ret *KernelParamMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Matching ¶ added in v0.3.3
type Matching struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Content interface{} `json:"content,omitempty" yaml:"content,omitempty"` Id string `json:"-" yaml:"-"` Matches matcher `json:"matches" yaml:"matches"` }
type MatchingMap ¶ added in v0.3.3
func (*MatchingMap) UnmarshalJSON ¶ added in v0.3.3
func (ret *MatchingMap) UnmarshalJSON(data []byte) error
func (*MatchingMap) UnmarshalYAML ¶ added in v0.3.3
func (ret *MatchingMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Mount ¶ added in v0.1.8
type Mount struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` MountPoint string `json:"-" yaml:"-"` Exists matcher `json:"exists" yaml:"exists"` Opts matcher `json:"opts,omitempty" yaml:"opts,omitempty"` Source matcher `json:"source,omitempty" yaml:"source,omitempty"` Filesystem matcher `json:"filesystem,omitempty" yaml:"filesystem,omitempty"` }
type MountMap ¶ added in v0.1.8
func (MountMap) AppendSysResource ¶ added in v0.1.8
func (MountMap) AppendSysResourceIfExists ¶ added in v0.1.8
func (*MountMap) UnmarshalJSON ¶ added in v0.1.8
func (*MountMap) UnmarshalYAML ¶ added in v0.1.8
type Package ¶
type Package struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Name string `json:"-" yaml:"-"` Installed matcher `json:"installed" yaml:"installed"` Versions matcher `json:"versions,omitempty" yaml:"versions,omitempty"` PackageManager string `json:"package-manager,omitempty" yaml:"package-manager,omitempty"` }
type PackageMap ¶ added in v0.0.4
func (PackageMap) AppendSysResource ¶ added in v0.0.4
func (PackageMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*PackageMap) UnmarshalJSON ¶ added in v0.0.4
func (ret *PackageMap) UnmarshalJSON(data []byte) error
func (*PackageMap) UnmarshalYAML ¶ added in v0.1.0
func (ret *PackageMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Port ¶
type PortMap ¶ added in v0.0.4
func (PortMap) AppendSysResource ¶ added in v0.0.4
func (PortMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*PortMap) UnmarshalJSON ¶ added in v0.0.4
func (*PortMap) UnmarshalYAML ¶ added in v0.1.0
type Process ¶
type ProcessMap ¶ added in v0.0.4
func (ProcessMap) AppendSysResource ¶ added in v0.0.4
func (ProcessMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*ProcessMap) UnmarshalJSON ¶ added in v0.0.4
func (ret *ProcessMap) UnmarshalJSON(data []byte) error
func (*ProcessMap) UnmarshalYAML ¶ added in v0.1.0
func (ret *ProcessMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Resource ¶
type Resource interface { Validate(*system.System) []TestResult SetID(string) }
A Resource defines a type on which tests can be executed, i.e. http or file
type ResourceRead ¶ added in v0.1.1
type Service ¶
type ServiceMap ¶ added in v0.0.4
func (ServiceMap) AppendSysResource ¶ added in v0.0.4
func (ServiceMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*ServiceMap) UnmarshalJSON ¶ added in v0.0.4
func (ret *ServiceMap) UnmarshalJSON(data []byte) error
func (*ServiceMap) UnmarshalYAML ¶ added in v0.1.0
func (ret *ServiceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type TestResult ¶
type TestResult struct { Successful bool `json:"successful" yaml:"successful"` ResourceId string `json:"resource-id" yaml:"resource-id"` ResourceType string `json:"resource-type" yaml:"resource-type"` Title string `json:"title" yaml:"title"` Meta meta `json:"meta" yaml:"meta"` TestType int `json:"test-type" yaml:"test-type"` Result int `json:"result" yaml:"result"` Property string `json:"property" yaml:"property"` Err error `json:"err" yaml:"err"` Expected []string `json:"expected" yaml:"expected"` Found []string `json:"found" yaml:"found"` Human string `json:"human" yaml:"human"` Duration time.Duration `json:"duration" yaml:"duration"` }
func ValidateContains ¶
func ValidateContains(res ResourceRead, property string, expectedValues []string, method func() (io.Reader, error), skip bool) TestResult
func ValidateValue ¶
func ValidateValue(res ResourceRead, property string, expectedValue interface{}, actual interface{}, skip bool) TestResult
type User ¶
type User struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"` Username string `json:"-" yaml:"-"` Exists matcher `json:"exists" yaml:"exists"` UID matcher `json:"uid,omitempty" yaml:"uid,omitempty"` GID matcher `json:"gid,omitempty" yaml:"gid,omitempty"` Groups matcher `json:"groups,omitempty" yaml:"groups,omitempty"` Home matcher `json:"home,omitempty" yaml:"home,omitempty"` Shell matcher `json:"shell,omitempty" yaml:"shell,omitempty"` }
type UserMap ¶ added in v0.0.4
func (UserMap) AppendSysResource ¶ added in v0.0.4
func (UserMap) AppendSysResourceIfExists ¶ added in v0.0.4
func (*UserMap) UnmarshalJSON ¶ added in v0.0.4
func (*UserMap) UnmarshalYAML ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.