Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssetType ¶
type AssetType int
AssetType defines the valid types of assets a check can accept.
const ( // IP represents an IP assettype. IP AssetType = iota // Hostname represents a hostname assettype. Hostname // DomainName represents an domain name assettype. DomainName // AWSAccount represents an AWS account assettype. AWSAccount // IPRange represents an IP range assettype. IPRange // DockerImage represents a DockerImage asset type. DockerImage // WebAddress represents a WebAddress asset type. WebAddress // GitRepository represents a git repo asset type. GitRepository )
func (*AssetType) MarshalText ¶
MarshalText returns string representation of a AssetType instance.
func (*AssetType) UnmarshalText ¶
UnmarshalText creates a AssetType from its string representation.
type AssetTypes ¶
type AssetTypes []*AssetType
AssetTypes represents and array of asset types supported by a concrete checktype.
func (AssetTypes) Strings ¶
func (a AssetTypes) Strings() ([]string, error)
Strings converts a slice of Assettypes into a slice of strings.
type Checktype ¶
type Checktype struct { Name string `json:"name"` Description string `json:"description"` Timeout int `json:"timeout,omitempty"` Image string `json:"image"` Options map[string]interface{} `json:"options,omitempty"` RequiredVars []string `json:"required_vars"` QueueName string `json:"queue_name,omitempty"` Assets []string `json:"assets"` }
Checktype defines the data about a concrete checktype.
type ChecktypeRef ¶
type ChecktypeRef string
ChecktypeRef represents a checktype with an optional prefix denoting the repository (i.e. default/vulcan-zap vulcan-zap ).
type Checktypes ¶
type Checktypes map[ChecktypeRef]Checktype
Checktypes contains a collection of checktypes indexed by checktype name.
func (Checktypes) Checktype ¶
func (c Checktypes) Checktype(ref ChecktypeRef) (*Checktype, error)
Checktype returns a pointer to the a Checktype given is reference if it exists, otherwise it returns an error.
type Code ¶
type Code string
Code stores a directory path containing the definition of a checktype.
type JSONChecktypes ¶
type JSONChecktypes struct {
Checktypes []Checktype `json:"checktypes"`
}
JSONChecktypes defines the shape of a file containing the definition of a set of checkstypes.
type Manifest ¶
type Manifest struct { Description string Timeout int Options string RequiredVars []string QueueName string AssetTypes AssetTypes }
Manifest contains all the data defined in the manifest.
func ReadManifest ¶
ReadManifest reads a manifest file.
func (Manifest) UnmarshalOptions ¶
UnmarshalOptions returns the options interpreted as json.