papertrail

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayName      = "Papertrail"
	HandlerKey       = "papertrail"
	MessageDirection = "out"
	DocumentationURL = "http://help.papertrailapp.com/kb/how-it-works/web-hooks/"
	MessageBodyType  = models.JSON
)

Variables

This section is empty.

Functions

func ExampleMessage

func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)

func NewHandler

func NewHandler() handlers.Handler

func Normalize

func Normalize(cfg config.Configuration, bytes []byte) (cc.Message, error)

Types

type PapertrailOutEvent

type PapertrailOutEvent struct {
	Id                int64
	ReceivedAt        string
	DisplayReceivedAt string
	SourceIP          string
	SourceName        string
	SourceId          int64
	Hostname          string
	Program           string
	Severity          string
	Facility          string
	Message           string
}

type PapertrailOutMessage

type PapertrailOutMessage struct {
	Events      []PapertrailOutEvent     `json:"events,omitempty"`
	SavedSearch PapertrailOutSavedSearch `json:"saved_search,omitempty"`
	MaxId       int64                    `json:"max_id,omitempty"`
	MinId       int64                    `json:"min_id,omitempty"`
}

func PapertrailOutMessageFromBytes

func PapertrailOutMessageFromBytes(bytes []byte) (PapertrailOutMessage, error)

type PapertrailOutSavedSearch

type PapertrailOutSavedSearch struct {
	Id            int64  `json:"id,omitempty"`
	Name          string `json:"name,omitempty"`
	Query         string `json:"query,omitempty"`
	HtmlEditURL   string `json:"html_edit_url,omitempty"`
	HtmlSearchURL string `json:"html_search_url,omitempty"`
}

Jump to

Keyboard shortcuts

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