summaryrefslogtreecommitdiff
path: root/vendor/gopkg.in/mcuadros/go-syslog.v2/format/format.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/mcuadros/go-syslog.v2/format/format.go')
-rw-r--r--vendor/gopkg.in/mcuadros/go-syslog.v2/format/format.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/gopkg.in/mcuadros/go-syslog.v2/format/format.go b/vendor/gopkg.in/mcuadros/go-syslog.v2/format/format.go
new file mode 100644
index 000000000..f77eb107c
--- /dev/null
+++ b/vendor/gopkg.in/mcuadros/go-syslog.v2/format/format.go
@@ -0,0 +1,29 @@
+package format
+
+import (
+ "bufio"
+ "time"
+
+ "gopkg.in/mcuadros/go-syslog.v2/internal/syslogparser"
+)
+
+type LogParts map[string]interface{}
+
+type LogParser interface {
+ Parse() error
+ Dump() LogParts
+ Location(*time.Location)
+}
+
+type Format interface {
+ GetParser([]byte) LogParser
+ GetSplitFunc() bufio.SplitFunc
+}
+
+type parserWrapper struct {
+ syslogparser.LogParser
+}
+
+func (w *parserWrapper) Dump() LogParts {
+ return LogParts(w.LogParser.Dump())
+}