qtypes_messages

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2017 License: Apache-2.0 Imports: 4 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sha1HashString

func Sha1HashString(s string) string

Types

type Base

type Base struct {
	BaseVersion   string
	ID            string
	Time          time.Time
	SourceID      int
	SourcePath    []string
	SourceSuccess bool
	Tags          map[string]string // Additional KV
}

func NewBase

func NewBase(src string) Base

func NewBaseFromBase

func NewBaseFromBase(src string, b Base) Base

func NewBaseFromOldBase

func NewBaseFromOldBase(src string, b qtypes.Base) Base

func NewTimedBase

func NewTimedBase(src string, t time.Time) Base

func (*Base) AppendSource

func (b *Base) AppendSource(src string)

func (*Base) GenDefaultID

func (b *Base) GenDefaultID() string

GenDefaultID uses "<source>-<time.UnixNano()>" and does a sha1 hash.

func (*Base) GetLastSource

func (b *Base) GetLastSource() string

func (*Base) GetMessageDigest

func (b *Base) GetMessageDigest() string

func (*Base) GetTimeRFC

func (b *Base) GetTimeRFC() string

func (*Base) GetTimeUnix

func (b *Base) GetTimeUnix() int64

func (*Base) GetTimeUnixNano

func (b *Base) GetTimeUnixNano() int64

func (*Base) InputsMatch

func (b *Base) InputsMatch(inputs []string) bool

func (*Base) IsLastSource

func (b *Base) IsLastSource(src string) bool

func (*Base) StopProcessing

func (b *Base) StopProcessing(p qtypes.Plugin, allowEmptyInput bool) bool

func (*Base) ToJSON added in v0.1.2

func (b *Base) ToJSON() map[string]interface{}

type Message added in v0.1.3

type Message struct {
	Base
	Message string
}

func NewMessage added in v0.1.3

func NewMessage(b Base, msg string) Message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL