event

package
v1.0.1-0...-20e81f0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	NotificationConfig string     `json:"notificationConfig"`
	ObjectId           string     `json:"objectId"`
	BucketId           string     `json:"bucketId"`
	EventTime          *time.Time `json:"eventTime"`
	EventType          string     `json:"eventTime"`
}

Attributes represents attributes

type PubsubBucketNotification

type PubsubBucketNotification struct {
	Attributes *Attributes `json:"attributes"`
}

PubsubBucketNotification

func (*PubsubBucketNotification) StorageEvent

func (e *PubsubBucketNotification) StorageEvent() *StorageEvent

StorageEvent returns a storage event

type S3Event

type S3Event events.S3Event

S3Event represents s3 event

func NewS3EventForURL

func NewS3EventForURL(URL string) *S3Event

NewS3EventForURL creates s3 events for supplied URL

func NewS3EventFromJSON

func NewS3EventFromJSON(data []byte) (*S3Event, error)

NewS3EventFromJSON creates a new s3 events

func (S3Event) Each

func (e S3Event) Each(handler func(URL string) error) error

Each iterates each record calling supplied handler with the record URL

func (S3Event) URL

func (e S3Event) URL() string

type StorageEvent

type StorageEvent struct {
	Bucket string `json:"bucket"`
	Name   string `json:"name"`
}

StorageEvent is the payload of a GCS event.

func (StorageEvent) ProxyDestURL

func (e StorageEvent) ProxyDestURL(destBucket string) string

ProxyDestURL returns dest URL

func (StorageEvent) URL

func (e StorageEvent) URL() string

URL returns event source URL

Jump to

Keyboard shortcuts

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