domain

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjectCreatedEvent = "s3:ObjectCreated"
	ObjectRemovedEvent = "s3:ObjectRemoved"
)
View Source
const (
	ObjectCreatedFilter = "s3:ObjectCreated:*"
	ObjectRemovedFilter = "s3:ObjectRemoved:*"
	PrefixFilter        = "prefix"
	SuffixFilter        = "suffix"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudFunction

type CloudFunction string

func (CloudFunction) Invoke

func (c CloudFunction) Invoke(invoker CloudFunctionInvoker) func(interface{})

type CloudFunctionConfiguration

type CloudFunctionConfiguration struct {
	Events        []string `xml:"Event"`
	Filter        Filter
	Id            string
	CloudFunction CloudFunction
}

func (CloudFunctionConfiguration) CreateObservable

func (c CloudFunctionConfiguration) CreateObservable(source rxgo.Observable) rxgo.Observable

func (CloudFunctionConfiguration) FilterEvents

func (c CloudFunctionConfiguration) FilterEvents(i interface{}) bool

type CloudFunctionInvoker

type CloudFunctionInvoker interface {
	Invoke(string) func(interface{})
}

type EventFunction

type EventFunction func(string, interface{})

type Filter

type Filter struct {
	S3Key S3Key
}

func (Filter) FilterEvents

func (f Filter) FilterEvents(i interface{}) bool

type FilterRule

type FilterRule struct {
	Name  string
	Value string
}

func (FilterRule) FilterKey

func (f FilterRule) FilterKey(key string) bool

type JsonTime

type JsonTime time.Time

func (JsonTime) MarshalJSON

func (t JsonTime) MarshalJSON() ([]byte, error)

func (*JsonTime) UnmarshalJSON

func (t *JsonTime) UnmarshalJSON(bytes []byte) error

type LambdaRecord

type LambdaRecord struct {
	EventVersion      string                  `json:"eventVersion"`
	EventSource       string                  `json:"eventSource"`
	AwsRegion         string                  `json:"awsRegion"`
	EventTime         JsonTime                `json:"eventTime"`
	EventName         string                  `json:"eventName"`
	UserIdentity      LambdaUserIdentity      `json:"userIdentity"`
	RequestParameters LambdaRequestParameters `json:"requestParameters"`
	ResponseElements  LambdaResponseElements  `json:"responseElements"`
	S3                S3Record                `json:"s3"`
}

type LambdaRequestParameters

type LambdaRequestParameters struct {
	SourceIPAddress string `json:"sourceIPAddress"`
}

type LambdaResponseElements

type LambdaResponseElements struct {
	RequestId string `json:"x-amz-request-id"`
	Id2       string `json:"x-amz-id-2"`
}

type LambdaUserIdentity

type LambdaUserIdentity struct {
	PrincipalId string `json:"principalId"`
}

type NotificationConfiguration

type NotificationConfiguration struct {
	CloudFunctionConfigurations []CloudFunctionConfiguration `xml:"CloudFunctionConfiguration"`
}

func (NotificationConfiguration) Start

func (n NotificationConfiguration) Start(invoker CloudFunctionInvoker) (chan rxgo.Item, context.Context)

type NotificationEvent

type NotificationEvent struct {
	Bucket   string
	Key      string // S3 Object key
	Event    string // S3 event (i.e. s3:ObjectCreated", "s3:ObjectRemoved", etc.)
	SourceIp string
	Size     int64
}

type S3Bucket

type S3Bucket struct {
	Name          string                `json:"name"`
	OwnerIdentity S3BucketOwnerIdentity `json:"ownerIdentity"`
	Arn           string                `json:"arn"`
}

type S3BucketOwnerIdentity

type S3BucketOwnerIdentity struct {
	PrincipalId string `json:"principalId"`
}

type S3Key

type S3Key struct {
	FilterRules []FilterRule `xml:"FilterRule"`
}

type S3Object

type S3Object struct {
	Key       string `json:"key"`
	Size      int64  `json:"size"`
	ETag      string `json:"eTag"`
	Sequencer string `json:"sequencer"`
}

type S3Record

type S3Record struct {
	S3SchemaVersion string   `json:"s3SchemaVersion"`
	ConfigurationId string   `json:"configurationId"`
	Bucket          S3Bucket `json:"bucket"`
	Object          S3Object `json:"object"`
}

Jump to

Keyboard shortcuts

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