Documentation ¶
Index ¶
- Variables
- func GenerateReadme(mortems []MortemData) string
- func ParseDate(content string) (time.Time, error)
- func ParseDetect(content string) (time.Duration, error)
- func ParseDowntime(content string) (time.Duration, error)
- func ParseOwner(content string) (string, error)
- func ParseResolve(content string) (time.Duration, error)
- func ParseSeverity(content string) (string, error)
- func ParseTitle(content string) (string, error)
- type DatadogReporter
- func (d *DatadogReporter) ReportDetect(detect time.Duration, severity string) error
- func (d *DatadogReporter) ReportDowntime(downtime time.Duration, severity string) error
- func (d *DatadogReporter) ReportResolve(resolve time.Duration, severity string) error
- func (d *DatadogReporter) ReportSeverity(severity string) error
- type File
- type GitHub
- type LocalFileService
- type MortemCollector
- type MortemData
- type RepoFileService
- type RepoFiles
- type ReportingService
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoDate = errors.New("no date of format \"July 1, 2020\" (no st, nd, th)")
View Source
var ErrNoDetect = errors.New("no time to detect of format \"| Time to Detect | x unit[, y smaller_unit] |\"")
View Source
var ErrNoDowntime = errors.New("no total downtime format \"| Total Downtime | x unit[, y smaller_unit] |\"")
View Source
var ErrNoOwner = errors.New("no owner of format \"Owner: First Last\"")
View Source
var ErrNoResolve = errors.New("no time to resolve of format \"| Time to Resolve | x unit[, y smaller_unit] |\"")
View Source
var ErrNoSeverity = errors.New("no severity of format \"| Severity | sev |\"")
View Source
var ErrNoTitle = errors.New("no title of format \"# Title Here\"")
Functions ¶
func GenerateReadme ¶
func GenerateReadme(mortems []MortemData) string
func ParseOwner ¶
func ParseSeverity ¶
func ParseTitle ¶
Types ¶
type DatadogReporter ¶ added in v1.2.1
type DatadogReporter struct {
// contains filtered or unexported fields
}
func (*DatadogReporter) ReportDetect ¶ added in v1.2.1
func (d *DatadogReporter) ReportDetect(detect time.Duration, severity string) error
func (*DatadogReporter) ReportDowntime ¶ added in v1.2.1
func (d *DatadogReporter) ReportDowntime(downtime time.Duration, severity string) error
func (*DatadogReporter) ReportResolve ¶ added in v1.2.1
func (d *DatadogReporter) ReportResolve(resolve time.Duration, severity string) error
func (*DatadogReporter) ReportSeverity ¶ added in v1.2.1
func (d *DatadogReporter) ReportSeverity(severity string) error
type File ¶
func (*File) GetContent ¶
type GitHub ¶
type GitHub struct {
// contains filtered or unexported fields
}
func (*GitHub) CommitNewFiles ¶
type LocalFileService ¶
type LocalFileService struct {
// contains filtered or unexported fields
}
func (*LocalFileService) CommitNewFiles ¶
func (s *LocalFileService) CommitNewFiles(files *RepoFiles) error
func (*LocalFileService) GetFiles ¶
func (s *LocalFileService) GetFiles() (*RepoFiles, error)
type MortemCollector ¶
type MortemCollector struct { Repo RepoFileService Reporter ReportingService // contains filtered or unexported fields }
func NewMortemCollector ¶
func NewMortemCollector(fileService RepoFileService) MortemCollector
func NewMortemReportingCollector ¶ added in v1.2.1
func NewMortemReportingCollector(fileService RepoFileService, reportingService ReportingService) MortemCollector
func (*MortemCollector) Check ¶
func (m *MortemCollector) Check() (RepoFiles, error)
func (*MortemCollector) Collect ¶
func (m *MortemCollector) Collect() error
type MortemData ¶
type MortemData struct { File string `json:"file"` Title string `json:"title"` Owner string `json:"owner"` Date time.Time `json:"date"` Severity string `json:"severity"` Detect time.Duration `json:"detect"` Resolve time.Duration `json:"resolve"` Downtime time.Duration `json:"total_down"` }
func NewMortemData ¶
func NewMortemData(content, path string) (MortemData, error)
type RepoFileService ¶
func NewGitHubService ¶
func NewGitHubService(token, fullRepository, ref string) RepoFileService
func NewLocalFileService ¶
func NewLocalFileService(repoPath string) RepoFileService
type RepoFiles ¶
type RepoFiles struct {
Files []*File
}
func (*RepoFiles) AddExecutableFile ¶ added in v1.2.1
func (*RepoFiles) ToTreeEntries ¶
type ReportingService ¶ added in v1.2.1
type ReportingService interface { ReportSeverity(string) error ReportDetect(detect time.Duration, severity string) error ReportResolve(resolve time.Duration, severity string) error ReportDowntime(downtime time.Duration, severity string) error }
func NewDatadogReporter ¶ added in v1.2.1
func NewDatadogReporter() ReportingService
Source Files ¶
Click to show internal directories.
Click to hide internal directories.