xml

package
v0.0.0-...-660a5ed Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Key string      `xml:"key,omitempty"`
	Val interface{} `xml:"value,omitempty"`
}

Field type designates how a metadata element should be displayed, in XML

As such, each mapped item in an event.Event's metadata will be converted to an object containing key / value elements.

func Mappify

func Mappify(data map[string]interface{}) []Field

Mappify function will take in a metadata map[string]interface{}, and convert it into a slice of (XML) Fields.

type FmtXML

type FmtXML struct{}

FmtXML struct describes the different manipulations and processing that a XML LogFormatter can apply to an event.Event

func (*FmtXML) Format

func (f *FmtXML) Format(log *e.Event) (buf []byte, err error)

Format method will take in a pointer to an event.Event; and returns a buffer and an error.

This method will process the input event.Event and marshal it according to this LogFormatter

Jump to

Keyboard shortcuts

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