xformer

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KinesisEventHeaderInfo

type KinesisEventHeaderInfo struct {
	InvocationID           string
	DeliveryStreamArn      string
	SourceKinesisStreamArn string
	Region                 string
}

KinesisEventHeaderInfo is the common header info in the KinesisFirehoseInput event

type XFormableData

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

XFormableData is the struct that supports transforming the record

func (*XFormableData) JMESPath

func (xf *XFormableData) JMESPath(pathSpec string) interface{}

JMESPath runs the query

func (*XFormableData) JMESPathAsFormattedString

func (xf *XFormableData) JMESPathAsFormattedString(pathSpec string, formatSpecifier string) interface{}

JMESPathAsFormattedString returns the value at pathSpec using the provided go format specifier

func (*XFormableData) JMESPathAsString

func (xf *XFormableData) JMESPathAsString(pathSpec string) interface{}

JMESPathAsString returns the value at pathSpec using a string formatter

func (*XFormableData) RegExpGroup

func (xf *XFormableData) RegExpGroup(regexpString string, groupName string) interface{}

RegExpGroup captures the output as a String

func (*XFormableData) RegExpGroupAsFormattedString

func (xf *XFormableData) RegExpGroupAsFormattedString(regexpString string,
	groupName string,
	formatSpecifier string) interface{}

RegExpGroupAsFormattedString captures the output as a String

func (*XFormableData) RegExpGroupAsJSON

func (xf *XFormableData) RegExpGroupAsJSON(regexpString string, groupName string) interface{}

RegExpGroupAsJSON captures the output as a JSON blob

type XFormer

type XFormer struct {
	Data                        *XFormableData
	KinesisEventHeader          *KinesisEventHeaderInfo
	RecordID                    string
	Metadata                    *awsEvents.KinesisFirehoseRecordMetadata
	ApproximateArrivalTimestamp awsEvents.MilliSecondsEpochTime
}

XFormer is the transformer

func NewKinesisFirehoseEventXFormer

func NewKinesisFirehoseEventXFormer(kinesisEventHeader *KinesisEventHeaderInfo,
	record *awsEvents.KinesisFirehoseEventRecord) (*XFormer, error)

NewKinesisFirehoseEventXFormer returns a new XFormer pointer initialized with the awsEvents.KinesisFirehoseEventRecord data

func (*XFormer) Error

func (xf *XFormer) Error() error

Error returns the potentially nil error from applying the transform

Jump to

Keyboard shortcuts

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