Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Levels = []Level{ LevelDebug, LevelInfo, LevelNotice, LevelWarning, LevelErr, LevelAlert, LevelEmerg, LevelCrit, }
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func NewApiClient ¶
func NewApiClient(options ...ApiClientOption) *ApiClient
func (*ApiClient) GetReportHashInfo ¶
func (client *ApiClient) GetReportHashInfo(hash string) ([]ReportLogEntry, error)
type ApiClientOption ¶
func WithUrl ¶
func WithUrl(uri string) ApiClientOption
WithUrl - ApiClientOption set the URL of the PuppetDB API
type Node ¶
type Node struct { Deactivated interface{} `json:"deactivated"` LatestReportHash string `json:"latest_report_hash"` FactsEnvironment string `json:"facts_environment"` CachedCatalogStatus string `json:"cached_catalog_status"` ReportEnvironment string `json:"report_environment"` LatestReportCorrectiveChange interface{} `json:"latest_report_corrective_change"` CatalogEnvironment string `json:"catalog_environment"` FactsTimestamp time.Time `json:"facts_timestamp"` LatestReportNoop bool `json:"latest_report_noop"` Expired interface{} `json:"expired"` LatestReportNoopPending bool `json:"latest_report_noop_pending"` ReportTimestamp time.Time `json:"report_timestamp"` Certname string `json:"certname"` CatalogTimestamp time.Time `json:"catalog_timestamp"` LatestReportJobId interface{} `json:"latest_report_job_id"` LatestReportStatus ReportStatus `json:"latest_report_status"` }
type ReportData ¶
type ReportData struct { Host string `yaml:"host"` Logs []ReportLogEntry `yaml:"logs"` Environment string `yaml:"environment"` Status ReportStatus `yaml:"status"` }
type ReportLogEntry ¶
type ReportLogEntry struct { File interface{} `json:"file" yaml:"file"` Line interface{} `json:"line" yaml:"line"` Tags []string `json:"tags" yaml:"tags"` Time time.Time `json:"time" yaml:"time"` Level string `json:"level" yaml:"level"` Source string `json:"source" yaml:"source"` Message string `json:"message" yaml:"message"` }
ReportLogEntry - representation of https://puppet.com/docs/puppet/7/format_report.html#format_report-puppet-util-log
type ReportStatus ¶
type ReportStatus string
const ( ReportStatusChanged ReportStatus = "changed" ReportStatusFailed ReportStatus = "failed" ReportStatusUnchanged ReportStatus = "unchanged" )
func (ReportStatus) ToNumeric ¶
func (s ReportStatus) ToNumeric() uint8
Click to show internal directories.
Click to hide internal directories.