Documentation ¶
Index ¶
- Variables
- type ConvertToMessage
- type Diagnostics
- type Element
- type ElementParser
- type Elements
- type ElementsConverter
- type ElementsProcessor
- type IntConverter
- type LineParser
- type LogMessageParser
- type LogTemplate
- type Manager
- type Message
- type MessageTemplate
- type NoProcess
- type Order
- type ParsingMethods
- type Printer
- type Provider
- type RegexParser
- type Severity
- type SeverityConvert
- type SeverityMap
- type SeverityNotFoundError
- type SplitParse
- type Trim
- type TrimFields
- type TrimMode
- type Trimmer
Constants ¶
This section is empty.
Variables ¶
View Source
var AllElements = [...]Element{ElementFile, ElementLine, ElementColumn, ElementSeverity, ElementMessage}
Functions ¶
This section is empty.
Types ¶
type ConvertToMessage ¶
type ConvertToMessage struct { IntConverter SeverityConvert }
func (ConvertToMessage) ConvertElements ¶
func (c ConvertToMessage) ConvertElements(elems []Elements, errs *errors.Errors) []Message
type Diagnostics ¶
type Element ¶
type Element int
ENUM(
File Message Column Line Severity Total
)
const ( // ElementFile is a Element of type File. ElementFile Element = iota // ElementMessage is a Element of type Message. ElementMessage // ElementColumn is a Element of type Column. ElementColumn // ElementLine is a Element of type Line. ElementLine // ElementSeverity is a Element of type Severity. ElementSeverity // ElementTotal is a Element of type Total. ElementTotal )
func ParseElement ¶
ParseElement attempts to convert a string to a Element.
func (Element) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Element) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type ElementParser ¶
type Elements ¶
type Elements [ElementTotal]string
type ElementsConverter ¶
type ElementsProcessor ¶
type IntConverter ¶
type LineParser ¶
type LogMessageParser ¶
type LogMessageParser struct {
// contains filtered or unexported fields
}
func (LogMessageParser) ParseLines ¶
func (lm LogMessageParser) ParseLines(lines []string) ([]Message, []error)
type LogTemplate ¶
type LogTemplate struct {
// contains filtered or unexported fields
}
func NewLogTemplate ¶
func NewLogTemplate(tpl string, log zerolog.Logger) LogTemplate
func (LogTemplate) ParseElements ¶
func (lt LogTemplate) ParseElements(r io.Reader) ([]Elements, []error)
func (*LogTemplate) WithOrder ¶
func (lt *LogTemplate) WithOrder(ord Order)
type Manager ¶
type Manager struct { Out io.Writer Diagnostics Diagnostics Printer Printer Log zerolog.Logger // contains filtered or unexported fields }
func (Manager) HandleDignosticsRequest ¶
type MessageTemplate ¶
type MessageTemplate struct {
// contains filtered or unexported fields
}
type Order ¶
type Order [ElementTotal]Element
type ParsingMethods ¶
type ParsingMethods struct { LinesToElements ElementParser Processor ElementsProcessor Converter ElementsConverter }
type RegexParser ¶
type RegexParser struct {
// contains filtered or unexported fields
}
type Severity ¶
type Severity int
ENUM(
Error Warning
)
func ParseSeverity ¶
ParseSeverity attempts to convert a string to a Severity.
func (Severity) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Severity) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type SeverityConvert ¶
type SeverityConvert struct { SeverityMap Choices []string }
func NewSeverityConverter ¶
func NewSeverityConverter(sm SeverityMap) SeverityConvert
type SeverityMap ¶
type SeverityNotFoundError ¶
func (SeverityNotFoundError) Error ¶
func (err SeverityNotFoundError) Error() string
type SplitParse ¶
type SplitParse struct {
// contains filtered or unexported fields
}
func NewSplitParse ¶
func NewSplitParse(sep string, order Order) SplitParse
type TrimFields ¶
type TrimFields struct {
// contains filtered or unexported fields
}
func NewTrimFields ¶
func NewTrimFields(trim Trimmer, fields []Element) TrimFields
func (TrimFields) ProcessElements ¶
func (tf TrimFields) ProcessElements(elems []Elements) []error
type TrimMode ¶
type TrimMode int
ENUM(
Left Right All
)
func ParseTrimMode ¶
ParseTrimMode attempts to convert a string to a TrimMode.
func (TrimMode) MarshalText ¶
MarshalText implements the text marshaller method.
func (TrimMode) TrimWhitespace ¶
func (*TrimMode) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
Click to show internal directories.
Click to hide internal directories.