job

package
v0.0.0-...-c4e97f3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootAws

func BootAws() *session.Session

BootAws starts aws session

func CatPath

func CatPath(ctx context.Context, svc *s3.S3, bucket, path string) (map[string]string, error)

CatPath - lists S3 path and returns a string map of keys to their values

func Do

func Do(ctx context.Context, i input) (err error)

Do - entry point for lambda function

func ToString

func ToString(ctx context.Context, downloader *s3manager.Downloader, bucket string, item string) (string, bool)

ToString - "cat" an s3 object to string and if not found return "" and false

func ToStringP

func ToStringP(ctx context.Context, downloader *s3manager.Downloader, log *log.Logger, bucket string, item string) string

ToStringP - "cat" s3 key to string and if not found panic

Types

type Event

type Event struct {
	EventName       string    `json:"eventName"`
	EventTime       time.Time `json:"eventTime"`
	S3Bucket        string    `json:"s3Bucket"`
	S3Key           string    `json:"s3Key"`
	ETag            string    `json:"eTag"`
	RuleID          string    `json:"ruleID"`
	RequestID       string    `json:"requestID"`
	PrincipalID     string    `json:"principalID"`
	SourceIPAddress string    `json:"sourceIPAddress"`
	AwsRegion       string    `json:"awsRegion"`
}

Event - S3 event that we pass around lambda function

Jump to

Keyboard shortcuts

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