{"modulePath":"github.com/foxcpp/maddy","version":"v0.3.3","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parser\n\nPackage parser provides utilities for parsing of structured log messsages generated by maddy.\n\n## Constants\n\n```go\nconst (\n\tISO8601_UTC = \"2006-01-02T15:04:05.000Z\"\n)\n```\n\n## Types\n\n```go\ntype MalformedMsg struct {\n\tDesc string\n\tErr  error\n}\n```\n\n```go\nfunc (m MalformedMsg) Error() string\n```\n\n```go\ntype Msg struct {\n\tStamp   time.Time\n\tDebug   bool\n\tModule  string\n\tMessage string\n\tContext map[string]interface{}\n}\n```\n\n```go\nfunc Parse(line string) (Msg, error)\n```\nParse parses the message from the maddy log file.\n\nIt assumes standard file output, including the \\[debug] tag and ISO 8601 timestamp at the start of each line. Timestamp is assumed to be in the UTC, as it is enforced by maddy.\n\nJSON context values are unmarshalled without any additional processing, notably that means that all numbers are represented as float64.\n\n","path":"github.com/foxcpp/maddy/pkg/logparser","name":"parser","synopsis":"Package parser provides utilities for parsing of structured log messsages generated by maddy.","isRedistributable":true}
