Documentation
¶
Index ¶
- type ConfigurationId
- type EventConfig
- type EventFilter
- type EventGlacierData
- type EventMeta
- type EventObjectData
- type EventRecord
- type EventRequestParams
- type EventResponseElements
- type EventRestoreData
- type EventS3BucketData
- type EventS3Data
- type EventSchema
- type EventType
- type EventUserIdentity
- type Kafka
- type NatsEventSender
- type S3EventSender
- func InitEventSender(cfg *EventConfig) (S3EventSender, error)
- func InitKafkaEventService(url, topic, key string, filter EventFilter) (S3EventSender, error)
- func InitNatsEventService(url, topic string, filter EventFilter) (S3EventSender, error)
- func InitWebhookEventSender(url string, filter EventFilter) (S3EventSender, error)
- type Webhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationId ¶
type ConfigurationId string
const ( ConfigurationIdKafka ConfigurationId = "kafka-global" ConfigurationIdNats ConfigurationId = "nats-global" ConfigurationIdWebhook ConfigurationId = "webhook-global" )
This field will be changed after implementing per bucket notifications
type EventConfig ¶
type EventFilter ¶
func (EventFilter) Filter ¶
func (ef EventFilter) Filter(event EventType) bool
func (EventFilter) Validate ¶
func (ef EventFilter) Validate() error
type EventGlacierData ¶
type EventGlacierData struct {
RestoreEventData EventRestoreData `json:"restoreEventData"`
}
type EventObjectData ¶
type EventRecord ¶
type EventRecord struct {
EventVersion string `json:"eventVersion"`
EventSource string `json:"eventSource"`
AwsRegion string `json:"awsRegion"`
EventTime string `json:"eventTime"`
EventName EventType `json:"eventName"`
UserIdentity EventUserIdentity `json:"userIdentity"`
RequestParameters EventRequestParams `json:"requestParameters"`
ResponseElements EventResponseElements `json:"responseElements"`
S3 EventS3Data `json:"s3"`
GlacierEventData EventGlacierData `json:"glacierEventData"`
}
type EventRequestParams ¶
type EventRequestParams struct {
SourceIPAddress string `json:"sourceIPAddress"`
}
type EventResponseElements ¶
type EventRestoreData ¶
type EventS3BucketData ¶
type EventS3BucketData struct {
Name string `json:"name"`
OwnerIdentity EventUserIdentity `json:"ownerIdentity"`
Arn string `json:"arn"`
}
type EventS3Data ¶
type EventS3Data struct {
S3SchemaVersion string `json:"s3SchemaVersion"`
ConfigurationId ConfigurationId `json:"configurationId"`
Bucket EventS3BucketData `json:"bucket"`
Object EventObjectData `json:"object"`
}
type EventSchema ¶
type EventSchema struct {
Records []EventRecord
}
type EventType ¶
type EventType string
const ( EventObjectCreated EventType = "s3:ObjectCreated:*" // ObjectCreated EventObjectCreatedPut EventType = "s3:ObjectCreated:Put" EventObjectCreatedPost EventType = "s3:ObjectCreated:Post" EventObjectCreatedCopy EventType = "s3:ObjectCreated:Copy" EventCompleteMultipartUpload EventType = "s3:ObjectCreated:CompleteMultipartUpload" EventObjectRemoved EventType = "s3:ObjectRemoved:*" EventObjectRemovedDelete EventType = "s3:ObjectRemoved:Delete" EventObjectRemovedDeleteObjects EventType = "s3:ObjectRemoved:DeleteObjects" // non AWS custom type for DeleteObjects EventObjectTagging EventType = "s3:ObjectTagging:*" // ObjectTagging EventObjectTaggingPut EventType = "s3:ObjectTagging:Put" EventObjectTaggingDelete EventType = "s3:ObjectTagging:Delete" EventObjectAclPut EventType = "s3:ObjectAcl:Put" EventObjectRestore EventType = "s3:ObjectRestore:*" // ObjectRestore EventObjectRestorePost EventType = "s3:ObjectRestore:Post" EventObjectRestoreCompleted EventType = "s3:ObjectRestore:Completed" )
type EventUserIdentity ¶
type EventUserIdentity struct {
PrincipalId string `json:"PrincipalId"`
}
type NatsEventSender ¶
type NatsEventSender struct {
// contains filtered or unexported fields
}
func (*NatsEventSender) Close ¶
func (ns *NatsEventSender) Close() error
type S3EventSender ¶
func InitEventSender ¶
func InitEventSender(cfg *EventConfig) (S3EventSender, error)
func InitKafkaEventService ¶
func InitKafkaEventService(url, topic, key string, filter EventFilter) (S3EventSender, error)
func InitNatsEventService ¶
func InitNatsEventService(url, topic string, filter EventFilter) (S3EventSender, error)
func InitWebhookEventSender ¶
func InitWebhookEventSender(url string, filter EventFilter) (S3EventSender, error)
Click to show internal directories.
Click to hide internal directories.