output

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldAwsRegion          string = "AwsRegion"
	FieldErrorCode          string = "ErrorCode"
	FieldErrorMessage       string = "ErrorMessage"
	FieldEventID            string = "EventID"
	FieldEventName          string = "EventName"
	FieldEventSource        string = "EventSource"
	FieldEventTime          string = "EventTime"
	FieldEventType          string = "EventType"
	FieldRecipientAccountID string = "RecipientAccountID"
	FieldUserIdentityArn    string = "UserIdentity.Arn"
)
View Source
const (
	TypeJson  string = "json"
	TypeTable string = "table"
)

Variables

View Source
var (
	FieldAccessors map[string]FieldAccessor = map[string]FieldAccessor{}
)

Functions

This section is empty.

Types

type FieldAccessor

type FieldAccessor func(r *trail.Record) string

type Json

type Json struct {
	// contains filtered or unexported fields
}

func NewJson

func NewJson(o Options) *Json

func (Json) Flush

func (o Json) Flush() error

func (*Json) Type

func (o *Json) Type() string

func (*Json) Write

func (o *Json) Write(w io.Writer, r *trail.Record) error

type Options

type Options struct {
	Fields     []string
	ErrorsOnly bool
}

type Output

type Output interface {
	Type() string
	Write(w io.Writer, r *trail.Record) error
	Flush() error
}

type RecordFieldResolver

type RecordFieldResolver struct {
	// contains filtered or unexported fields
}

func NewRecordValueAccessor

func NewRecordValueAccessor(r *trail.Record) RecordFieldResolver

func (RecordFieldResolver) Value

func (r RecordFieldResolver) Value(field string) string

type Table

type Table struct {
	// contains filtered or unexported fields
}

func NewTable

func NewTable(w io.Writer, o Options) *Table

func (*Table) Flush

func (o *Table) Flush() error

func (*Table) Type

func (o *Table) Type() string

func (*Table) Write

func (o *Table) Write(w io.Writer, r *trail.Record) error

Jump to

Keyboard shortcuts

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