mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-22 01:24:58 +02:00
25 lines
636 B
Go
25 lines
636 B
Go
package core
|
|
|
|
// Report defines an output file produced by a workflow
|
|
type Report struct {
|
|
Name string `yaml:"name"`
|
|
Path string `yaml:"path"`
|
|
Type string `yaml:"type"` // text, csv, json, etc.
|
|
Description string `yaml:"description"`
|
|
}
|
|
|
|
// IsTextReport returns true if this is a text report
|
|
func (r *Report) IsTextReport() bool {
|
|
return r.Type == "text" || r.Type == ""
|
|
}
|
|
|
|
// IsCSVReport returns true if this is a CSV report
|
|
func (r *Report) IsCSVReport() bool {
|
|
return r.Type == "csv"
|
|
}
|
|
|
|
// IsJSONReport returns true if this is a JSON report
|
|
func (r *Report) IsJSONReport() bool {
|
|
return r.Type == "json"
|
|
}
|