papertrail

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 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, hReq handlers.HandlerRequest) (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