Documentation
¶
Index ¶
- Constants
- func HumanOutcomes() map[int]string
- func Ref(res Resource) string
- func Resources() map[string]Resource
- func YAMLKey(res Resource) string
- type Addr
- func (a *Addr) GetAddress() string
- func (a *Addr) GetMeta() meta
- func (a *Addr) GetTitle() string
- func (a *Addr) ID() string
- func (a *Addr) SetID(id string)
- func (a *Addr) SetSkip()
- func (a *Addr) TypeKey() string
- func (a *Addr) TypeName() string
- func (a *Addr) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *AddrMap) UnmarshalJSON(data []byte) error
- func (ret *AddrMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Command
- func (c *Command) GetExec() string
- func (c *Command) GetMeta() meta
- func (c *Command) GetTitle() string
- func (c *Command) ID() string
- func (c *Command) SetID(id string)
- func (c *Command) SetSkip()
- func (c *Command) TypeKey() string
- func (c *Command) TypeName() string
- func (c *Command) Validate(sys *system.System) []TestResult
- 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, error)
- 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, error)
- func (ret *DNSMap) UnmarshalJSON(data []byte) error
- func (ret *DNSMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Dependent
- type Discoverable
- type DiscoveryMeta
- type File
- func (f *File) GetMeta() meta
- func (f *File) GetPath() string
- func (f *File) GetTitle() string
- func (f *File) ID() string
- func (f *File) SetID(id string)
- func (f *File) SetSkip()
- func (f *File) TypeKey() string
- func (f *File) TypeName() string
- func (f *File) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *FileMap) UnmarshalJSON(data []byte) error
- func (ret *FileMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Group
- func (g *Group) GetGroupname() string
- func (g *Group) GetMeta() meta
- func (g *Group) GetTitle() string
- func (g *Group) ID() string
- func (g *Group) SetID(id string)
- func (g *Group) SetSkip()
- func (g *Group) TypeKey() string
- func (g *Group) TypeName() string
- func (g *Group) Validate(sys *system.System) []TestResult
- 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, error)
- 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(sr string, sys *system.System, config util.Config) (*HTTP, error)
- func (r HTTPMap) AppendSysResourceIfExists(sr string, sys *system.System) (*HTTP, system.HTTP, bool, error)
- func (ret *HTTPMap) UnmarshalJSON(data []byte) error
- func (ret *HTTPMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Interface
- func (i *Interface) GetMeta() meta
- func (i *Interface) GetName() string
- func (i *Interface) GetTitle() string
- func (i *Interface) ID() string
- func (i *Interface) SetID(id string)
- func (i *Interface) SetSkip()
- func (i *Interface) TypeKey() string
- func (i *Interface) TypeName() string
- func (i *Interface) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *InterfaceMap) UnmarshalJSON(data []byte) error
- func (ret *InterfaceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type KernelParam
- func (k *KernelParam) GetMeta() meta
- func (k *KernelParam) GetName() string
- func (k *KernelParam) GetTitle() string
- func (k *KernelParam) ID() string
- func (a *KernelParam) SetID(id string)
- func (a *KernelParam) SetSkip()
- func (a *KernelParam) TypeKey() string
- func (a *KernelParam) TypeName() string
- func (k *KernelParam) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *KernelParamMap) UnmarshalJSON(data []byte) error
- func (ret *KernelParamMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Matching
- func (r *Matching) GetMeta() meta
- func (r *Matching) GetTitle() string
- func (a *Matching) ID() string
- func (a *Matching) SetID(id string)
- func (a *Matching) SetSkip()
- func (a *Matching) TypeKey() string
- func (a *Matching) TypeName() string
- func (a *Matching) Validate(sys *system.System) []TestResult
- type MatchingMap
- type Mount
- func (m *Mount) GetMeta() meta
- func (m *Mount) GetMountPoint() string
- func (m *Mount) GetTitle() string
- func (m *Mount) ID() string
- func (m *Mount) SetID(id string)
- func (m *Mount) SetSkip()
- func (m *Mount) TypeKey() string
- func (m *Mount) TypeName() string
- func (m *Mount) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *MountMap) UnmarshalJSON(data []byte) error
- func (ret *MountMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Package
- func (p *Package) GetMeta() meta
- func (p *Package) GetName() string
- func (p *Package) GetTitle() string
- func (p *Package) ID() string
- func (p *Package) SetID(id string)
- func (p *Package) SetSkip()
- func (p *Package) TypeKey() string
- func (p *Package) TypeName() string
- func (p *Package) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *PackageMap) UnmarshalJSON(data []byte) error
- func (ret *PackageMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Port
- func (p *Port) GetMeta() meta
- func (p *Port) GetPort() string
- func (p *Port) GetTitle() string
- func (p *Port) ID() string
- func (p *Port) SetID(id string)
- func (p *Port) SetSkip()
- func (p *Port) TypeKey() string
- func (p *Port) TypeName() string
- func (p *Port) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *PortMap) UnmarshalJSON(data []byte) error
- func (ret *PortMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Process
- func (p *Process) GetComm() string
- func (p *Process) GetMeta() meta
- func (p *Process) GetTitle() string
- func (p *Process) ID() string
- func (p *Process) SetID(id string)
- func (p *Process) SetSkip()
- func (p *Process) TypeKey() string
- func (p *Process) TypeName() string
- func (p *Process) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *ProcessMap) UnmarshalJSON(data []byte) error
- func (ret *ProcessMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Registry
- func (r *Registry) GetMeta() meta
- func (r *Registry) GetName() string
- func (r *Registry) GetTitle() string
- func (r *Registry) ID() string
- func (r *Registry) SetID(id string)
- func (r *Registry) SetSkip()
- func (r *Registry) TypeKey() string
- func (r *Registry) TypeName() string
- func (r *Registry) Validate(sys *system.System) []TestResult
- type RegistryMap
- func (r RegistryMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Registry, error)
- func (r RegistryMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Registry, system.Registry, bool, error)
- func (ret *RegistryMap) UnmarshalJSON(data []byte) error
- func (ret *RegistryMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Resource
- type ResourceRead
- type Service
- func (s *Service) GetMeta() meta
- func (s *Service) GetName() string
- func (s *Service) GetTitle() string
- func (s *Service) ID() string
- func (s *Service) SetID(id string)
- func (s *Service) SetSkip()
- func (s *Service) TypeKey() string
- func (s *Service) TypeName() string
- func (s *Service) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *ServiceMap) UnmarshalJSON(data []byte) error
- func (ret *ServiceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type Syverfile
- func (g *Syverfile) GetMeta() meta
- func (g *Syverfile) GetSkip() bool
- func (g *Syverfile) GetSyverfile() string
- func (g *Syverfile) GetTitle() string
- func (g *Syverfile) ID() string
- func (g *Syverfile) SetID(id string)
- func (g *Syverfile) SetSkip()
- func (g *Syverfile) TypeKey() string
- func (g *Syverfile) TypeName() string
- func (g *Syverfile) Validate(sys *system.System) []TestResult
- type SyverfileMap
- func (r SyverfileMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*Syverfile, error)
- func (r SyverfileMap) AppendSysResourceIfExists(sr string, sys *system.System) (*Syverfile, system.Syverfile, bool, error)
- func (ret *SyverfileMap) UnmarshalJSON(data []byte) error
- func (ret *SyverfileMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type TestResult
- type User
- func (u *User) GetMeta() meta
- func (u *User) GetTitle() string
- func (u *User) GetUsername() string
- func (u *User) ID() string
- func (u *User) SetID(id string)
- func (u *User) SetSkip()
- func (u *User) TypeKey() string
- func (u *User) TypeName() string
- func (u *User) Validate(sys *system.System) []TestResult
- 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, error)
- func (ret *UserMap) UnmarshalJSON(data []byte) error
- func (ret *UserMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
- type ValidateError
Constants ¶
View Source
const ( AddrResourceKey = "addr" AddrResourceName = "Addr" )
View Source
const ( CommandResourceKey = "command" CommandResourceName = "Command" )
View Source
const ( DNSResourceKey = "dns" DNSResourceName = "DNS" )
View Source
const ( FileResourceKey = "file" FileResourceName = "File" )
View Source
const ( GroupResourceKey = "group" GroupResourceName = "Group" )
View Source
const ( HTTPResourceKey = "http" HTTPResourceName = "HTTP" )
View Source
const ( InterfaceResourceKey = "interface" InterfaceResourceName = "Interface" )
View Source
const ( KernelParamResourceKey = "kernel-param" KernelParamResourceName = "KernelParam" )
View Source
const ( MatchingResourceKey = "matching" MatchingResourceName = "Matching" )
View Source
const ( MountResourceKey = "mount" MountResourceName = "Mount" )
View Source
const ( PackageResourceKey = "package" PackageResourceName = "Package" )
View Source
const ( PortResourceKey = "port" PortResourceName = "Port" )
View Source
const ( ProcessResourceKey = "process" ProcessResourceName = "Process" )
View Source
const ( RegistryResourceKey = "registry" RegistryResourceName = "Registry" )
View Source
const ( ServiceResourceKey = "service" ServiceResourceName = "Service" )
View Source
const ( SyverFileResourceKey = "gossfile" SyverFileResourceName = "Gossfile" )
View Source
const ( UserResourceKey = "user" UserResourceName = "User" )
View Source
const ( Value = iota Values Contains )
View Source
const ( SUCCESS = iota FAIL SKIP UNKNOWN )
View Source
const ( OutcomePass = "pass" OutcomeFail = "fail" OutcomeSkip = "skip" OutcomeUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func HumanOutcomes ¶
Types ¶
type Addr ¶
type Addr struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Address string `json:"address,omitempty" yaml:"address,omitempty"`
LocalAddress string `json:"local-address,omitempty" yaml:"local-address,omitempty"`
Reachable matcher `json:"reachable" yaml:"reachable"`
Timeout int `json:"timeout" yaml:"timeout"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
func (*Addr) GetAddress ¶
type AddrMap ¶
func (AddrMap) AppendSysResource ¶
func (AddrMap) AppendSysResourceIfExists ¶
func (*AddrMap) UnmarshalJSON ¶
func (*AddrMap) UnmarshalYAML ¶
type Command ¶
type Command struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Exec string `json:"exec,omitempty" yaml:"exec,omitempty"`
ExitStatus matcher `json:"exit-status" yaml:"exit-status"`
Stdout matcher `json:"stdout" yaml:"stdout"`
Stderr matcher `json:"stderr" yaml:"stderr"`
Timeout int `json:"timeout" yaml:"timeout"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
type CommandMap ¶
func (CommandMap) AppendSysResource ¶
func (CommandMap) AppendSysResourceIfExists ¶
func (*CommandMap) UnmarshalJSON ¶
func (ret *CommandMap) UnmarshalJSON(data []byte) error
func (*CommandMap) UnmarshalYAML ¶
func (ret *CommandMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type DNS ¶
type DNS struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Resolve string `json:"resolve,omitempty" yaml:"resolve,omitempty"`
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"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
func (*DNS) GetResolve ¶
type DNSMap ¶
func (DNSMap) AppendSysResource ¶
func (DNSMap) AppendSysResourceIfExists ¶
func (*DNSMap) UnmarshalJSON ¶
func (*DNSMap) UnmarshalYAML ¶
type Discoverable ¶
Discoverable resources expose a register name for discovery output.
type DiscoveryMeta ¶
type DiscoveryMeta struct {
Register string `json:"register,omitempty" yaml:"register,omitempty"`
DependsOn []string `json:"depends-on,omitempty" yaml:"depends-on,omitempty"`
}
DiscoveryMeta holds optional discovery and dependency metadata shared by resources.
func (DiscoveryMeta) GetDependsOn ¶
func (d DiscoveryMeta) GetDependsOn() []string
func (DiscoveryMeta) GetRegister ¶
func (d DiscoveryMeta) GetRegister() string
type File ¶
type File struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
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"`
Uid matcher `json:"uid,omitempty" yaml:"uid,omitempty"`
Group matcher `json:"group,omitempty" yaml:"group,omitempty"`
Gid matcher `json:"gid,omitempty" yaml:"gid,omitempty"`
LinkedTo matcher `json:"linked-to,omitempty" yaml:"linked-to,omitempty"`
Filetype matcher `json:"filetype,omitempty" yaml:"filetype,omitempty"`
Contains matcher `json:"contains,omitempty" yaml:"contains,omitempty"`
Contents matcher `json:"contents" yaml:"contents"`
Md5 matcher `json:"md5,omitempty" yaml:"md5,omitempty"`
Sha256 matcher `json:"sha256,omitempty" yaml:"sha256,omitempty"`
Sha512 matcher `json:"sha512,omitempty" yaml:"sha512,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
type FileMap ¶
func (FileMap) AppendSysResource ¶
func (FileMap) AppendSysResourceIfExists ¶
func (*FileMap) UnmarshalJSON ¶
func (*FileMap) UnmarshalYAML ¶
type Group ¶
type Group struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Groupname string `json:"groupname,omitempty" yaml:"groupname,omitempty"`
Exists matcher `json:"exists" yaml:"exists"`
GID matcher `json:"gid,omitempty" yaml:"gid,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
func (*Group) GetGroupname ¶
type GroupMap ¶
func (GroupMap) AppendSysResource ¶
func (GroupMap) AppendSysResourceIfExists ¶
func (*GroupMap) UnmarshalJSON ¶
func (*GroupMap) UnmarshalYAML ¶
type HTTP ¶
type HTTP struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
URL string `json:"url,omitempty" yaml:"url,omitempty"`
Method string `json:"method,omitempty" yaml:"method,omitempty"`
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,omitempty" yaml:"timeout,omitempty"`
RequestHeader []string `json:"request-headers,omitempty" yaml:"request-headers,omitempty"`
RequestQueryParams map[string][]string `json:"request-query-params,omitempty" yaml:"request-query-params,omitempty"`
RequestBody string `json:"request-body,omitempty" yaml:"request-body,omitempty"`
Headers matcher `json:"headers,omitempty" yaml:"headers,omitempty"`
Body matcher `json:"body,omitempty" yaml:"body,omitempty"`
Username string `json:"username,omitempty" yaml:"username,omitempty"`
Password string `json:"password,omitempty" yaml:"password,omitempty"`
CAFile string `json:"ca-file,omitempty" yaml:"ca-file,omitempty"`
CertFile string `json:"cert-file,omitempty" yaml:"cert-file,omitempty"`
KeyFile string `json:"key-file,omitempty" yaml:"key-file,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
Proxy string `json:"proxy,omitempty" yaml:"proxy,omitempty"`
// contains filtered or unexported fields
}
type HTTPMap ¶
func (HTTPMap) AppendSysResource ¶
func (HTTPMap) AppendSysResourceIfExists ¶
func (*HTTPMap) UnmarshalJSON ¶
func (*HTTPMap) UnmarshalYAML ¶
type Interface ¶
type Interface struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Exists matcher `json:"exists" yaml:"exists"`
Addrs matcher `json:"addrs,omitempty" yaml:"addrs,omitempty"`
MTU matcher `json:"mtu,omitempty" yaml:"mtu,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
func NewInterface ¶
type InterfaceMap ¶
func (InterfaceMap) AppendSysResource ¶
func (InterfaceMap) AppendSysResourceIfExists ¶
func (*InterfaceMap) UnmarshalJSON ¶
func (ret *InterfaceMap) UnmarshalJSON(data []byte) error
func (*InterfaceMap) UnmarshalYAML ¶
func (ret *InterfaceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type KernelParam ¶
type KernelParam struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Key string `json:"-" yaml:"-"`
Value matcher `json:"value" yaml:"value"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
func NewKernelParam ¶
func NewKernelParam(sysKernelParam system.KernelParam, config util.Config) (*KernelParam, error)
func (*KernelParam) GetMeta ¶
func (k *KernelParam) GetMeta() meta
func (*KernelParam) GetName ¶
func (k *KernelParam) GetName() string
func (*KernelParam) GetTitle ¶
func (k *KernelParam) GetTitle() string
FIXME: Can this be refactored?
func (*KernelParam) ID ¶
func (k *KernelParam) ID() string
func (*KernelParam) SetID ¶
func (a *KernelParam) SetID(id string)
func (*KernelParam) SetSkip ¶
func (a *KernelParam) SetSkip()
func (*KernelParam) TypeKey ¶
func (a *KernelParam) TypeKey() string
func (*KernelParam) TypeName ¶
func (a *KernelParam) TypeName() string
func (*KernelParam) Validate ¶
func (k *KernelParam) Validate(sys *system.System) []TestResult
type KernelParamMap ¶
type KernelParamMap map[string]*KernelParam
func (KernelParamMap) AppendSysResource ¶
func (r KernelParamMap) AppendSysResource(sr string, sys *system.System, config util.Config) (*KernelParam, error)
func (KernelParamMap) AppendSysResourceIfExists ¶
func (r KernelParamMap) AppendSysResourceIfExists(sr string, sys *system.System) (*KernelParam, system.KernelParam, bool, error)
func (*KernelParamMap) UnmarshalJSON ¶
func (ret *KernelParamMap) UnmarshalJSON(data []byte) error
func (*KernelParamMap) UnmarshalYAML ¶
func (ret *KernelParamMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Matching ¶
type Matching struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Content any `json:"content,omitempty" yaml:"content,omitempty"`
AsReader bool `json:"as-reader,omitempty" yaml:"as-reader,omitempty"`
Matches matcher `json:"matches" yaml:"matches"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
type MatchingMap ¶
func (*MatchingMap) UnmarshalJSON ¶
func (ret *MatchingMap) UnmarshalJSON(data []byte) error
func (*MatchingMap) UnmarshalYAML ¶
func (ret *MatchingMap) UnmarshalYAML(unmarshal func(v any) error) error
type Mount ¶
type Mount struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
MountPoint string `json:"mountpoint,omitempty" yaml:"mountpoint,omitempty"`
Exists matcher `json:"exists" yaml:"exists"`
Opts matcher `json:"opts,omitempty" yaml:"opts,omitempty"`
VfsOpts matcher `json:"vfs-opts,omitempty" yaml:"vfs-opts,omitempty"`
Source matcher `json:"source,omitempty" yaml:"source,omitempty"`
Filesystem matcher `json:"filesystem,omitempty" yaml:"filesystem,omitempty"`
Timeout int `json:"timeout" yaml:"timeout"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
Usage matcher `json:"usage,omitempty" yaml:"usage,omitempty"`
// contains filtered or unexported fields
}
func (*Mount) GetMountPoint ¶
type MountMap ¶
func (MountMap) AppendSysResource ¶
func (MountMap) AppendSysResourceIfExists ¶
func (*MountMap) UnmarshalJSON ¶
func (*MountMap) UnmarshalYAML ¶
type Package ¶
type Package struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Installed matcher `json:"installed" yaml:"installed"`
Versions matcher `json:"versions,omitempty" yaml:"versions,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
type PackageMap ¶
func (PackageMap) AppendSysResource ¶
func (PackageMap) AppendSysResourceIfExists ¶
func (*PackageMap) UnmarshalJSON ¶
func (ret *PackageMap) UnmarshalJSON(data []byte) error
func (*PackageMap) UnmarshalYAML ¶
func (ret *PackageMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Port ¶
type Port struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Port string `json:"port,omitempty" yaml:"port,omitempty"`
Listening matcher `json:"listening" yaml:"listening"`
IP matcher `json:"ip,omitempty" yaml:"ip,omitempty"`
PID matcher `json:"pid,omitempty" yaml:"pid,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
type PortMap ¶
func (PortMap) AppendSysResource ¶
func (PortMap) AppendSysResourceIfExists ¶
func (*PortMap) UnmarshalJSON ¶
func (*PortMap) UnmarshalYAML ¶
type Process ¶
type Process struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Comm string `json:"comm,omitempty" yaml:"comm,omitempty"`
Running matcher `json:"running" yaml:"running"`
Status matcher `json:"status,omitempty" yaml:"status,omitempty"`
User matcher `json:"user,omitempty" yaml:"user,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
type ProcessMap ¶
func (ProcessMap) AppendSysResource ¶
func (ProcessMap) AppendSysResourceIfExists ¶
func (*ProcessMap) UnmarshalJSON ¶
func (ret *ProcessMap) UnmarshalJSON(data []byte) error
func (*ProcessMap) UnmarshalYAML ¶
func (ret *ProcessMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Registry ¶
type Registry struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Exists matcher `json:"exists" yaml:"exists"`
Value matcher `json:"value,omitempty" yaml:"value,omitempty"`
Type matcher `json:"type,omitempty" yaml:"type,omitempty"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
func NewRegistry ¶
type RegistryMap ¶
func (RegistryMap) AppendSysResource ¶
func (RegistryMap) AppendSysResourceIfExists ¶
func (*RegistryMap) UnmarshalJSON ¶
func (ret *RegistryMap) UnmarshalJSON(data []byte) error
func (*RegistryMap) UnmarshalYAML ¶
func (ret *RegistryMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type ResourceRead ¶
type Service ¶
type Service struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Enabled matcher `json:"enabled" yaml:"enabled"`
Running matcher `json:"running" yaml:"running"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
RunLevels matcher `json:"runlevels,omitempty" yaml:"runlevels,omitempty"`
// contains filtered or unexported fields
}
type ServiceMap ¶
func (ServiceMap) AppendSysResource ¶
func (ServiceMap) AppendSysResourceIfExists ¶
func (*ServiceMap) UnmarshalJSON ¶
func (ret *ServiceMap) UnmarshalJSON(data []byte) error
func (*ServiceMap) UnmarshalYAML ¶
func (ret *ServiceMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type Syverfile ¶
type Syverfile struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Path string `json:"-" yaml:"-"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
File string `json:"file,omitempty" yaml:"file,omitempty"`
}
func NewSyverfile ¶
func (*Syverfile) GetSyverfile ¶
type SyverfileMap ¶
func (SyverfileMap) AppendSysResource ¶
func (SyverfileMap) AppendSysResourceIfExists ¶
func (*SyverfileMap) UnmarshalJSON ¶
func (ret *SyverfileMap) UnmarshalJSON(data []byte) error
func (*SyverfileMap) UnmarshalYAML ¶
func (ret *SyverfileMap) UnmarshalYAML(unmarshal func(v interface{}) error) error
type TestResult ¶
type TestResult struct {
Successful bool `json:"successful" yaml:"successful"`
Skipped bool `json:"skipped" yaml:"skipped"`
// Resource data
ResourceId string `json:"resource-id" yaml:"resource-id"`
ResourceType string `json:"resource-type" yaml:"resource-type"`
Property string `json:"property" yaml:"property"`
// User added info
Title string `json:"title" yaml:"title"`
Meta meta `json:"meta" yaml:"meta"`
// Result
Result int `json:"result" yaml:"result"`
Err *ValidateError `json:"err" yaml:"err"`
MatcherResult matchers.MatcherResult `json:"matcher-result" yaml:"matcher-result"`
StartTime time.Time `json:"start-time" yaml:"start-time"`
EndTime time.Time `json:"end-time" yaml:"end-time"`
Duration time.Duration `json:"duration" yaml:"duration"`
}
func SkipResourceResults ¶
func SkipResourceResults(res Resource, reason string) []TestResult
SkipResourceResults emits skip results for every validated property on a resource.
func ValidateGomegaValue ¶
func ValidateGomegaValue(res ResourceRead, property string, expectedValue any, actual any, skip bool) TestResult
func ValidateValue ¶
func ValidateValue(res ResourceRead, property string, expectedValue any, actual any, skip bool) TestResult
func (TestResult) SortKey ¶
func (t TestResult) SortKey() string
func (TestResult) ToOutcome ¶
func (tr TestResult) ToOutcome() string
ToOutcome converts the enum to a human-friendly string.
type User ¶
type User struct {
DiscoveryMeta `yaml:",inline" json:",inline"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Meta meta `json:"meta,omitempty" yaml:"meta,omitempty"`
Username string `json:"username,omitempty" yaml:"username,omitempty"`
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"`
Skip bool `json:"skip,omitempty" yaml:"skip,omitempty"`
// contains filtered or unexported fields
}
func (*User) GetUsername ¶
type UserMap ¶
func (UserMap) AppendSysResource ¶
func (UserMap) AppendSysResourceIfExists ¶
func (*UserMap) UnmarshalJSON ¶
func (*UserMap) UnmarshalYAML ¶
type ValidateError ¶
type ValidateError string
func (ValidateError) Error ¶
func (g ValidateError) Error() string
Click to show internal directories.
Click to hide internal directories.