Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Categories is a whitelist of valid categories that a postmortem can have. Categories = []string{ "automation", "cascading-failure", "cloud", "config-change", "postmortem", "hardware", "security", "time", "undescriptive", } Service = "postmortems" GCPProject = "icco-cloud" )
Functions ¶
func CategoriesContain ¶
CategoriesContain takes a string and decides if it is in the category whitelist.
func ExtractPostmortems ¶
ExtractPostmortems reads the collection of postmortems and extracts each postmortem to a separate file.
func GenerateJSON ¶
GenerateJSON outputs all content in JSON for parsing by our website.
func ToYaml ¶
func ToYaml(pm *Postmortem) (string, error)
ToYaml transforms a postmortem into yaml for the frontmatter.
Types ¶
type Postmortem ¶
type Postmortem struct { UUID string `yaml:"uuid"` URL string `yaml:"url"` StartTime time.Time `yaml:"start_time,omitempty"` EndTime time.Time `yaml:"end_time,omitempty"` Categories []string `yaml:"categories"` Company string `yaml:"company"` Product string `yaml:"product"` Description string `yaml:"-"` }
Postmortem is a structural representation of a postmortem summary and its metadata.
func Parse ¶
func Parse(f io.Reader) (*Postmortem, error)
Parse turns an io stream into a Postmortem type.
func ValidateDir ¶
func ValidateDir(d string) ([]*Postmortem, error)
ValidateDir takes a directory path and validates every file in there.
func ValidateFile ¶
func ValidateFile(filename string) (*Postmortem, error)
ValidateFile takes a file path and validates just that file.
func (*Postmortem) Save ¶
func (pm *Postmortem) Save(dir string) error
Save takes the in-memory representation of the postmortem file and stores it in a file.
Click to show internal directories.
Click to hide internal directories.