Documentation ¶
Index ¶
- type Bucket
- type ErrInvalidEventName
- type Event
- type Identity
- type Log
- type Metadata
- type Name
- func (name Name) Expand() []Name
- func (name Name) MarshalJSON() ([]byte, error)
- func (name Name) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (name Name) Mask() uint64
- func (name Name) String() string
- func (name *Name) UnmarshalJSON(data []byte) error
- func (name *Name) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Object
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { Name string `json:"name"` OwnerIdentity Identity `json:"ownerIdentity"` ARN string `json:"arn"` }
Bucket represents bucket metadata of the event.
type ErrInvalidEventName ¶
type ErrInvalidEventName struct {
Name string
}
ErrInvalidEventName - invalid event name error.
func (ErrInvalidEventName) Error ¶
func (err ErrInvalidEventName) Error() string
type Event ¶
type Event struct { EventVersion string `json:"eventVersion"` EventSource string `json:"eventSource"` AwsRegion string `json:"awsRegion"` EventTime string `json:"eventTime"` EventName Name `json:"eventName"` UserIdentity Identity `json:"userIdentity"` RequestParameters map[string]string `json:"requestParameters"` ResponseElements map[string]string `json:"responseElements"` S3 Metadata `json:"s3"` Source Source `json:"source"` Type madmin.TraceType `json:"-"` }
Event represents event notification information defined in http://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html.
type Identity ¶
type Identity struct {
PrincipalID string `json:"principalId"`
}
Identity represents access key who caused the event.
type Metadata ¶
type Metadata struct { SchemaVersion string `json:"s3SchemaVersion"` ConfigurationID string `json:"configurationId"` Bucket Bucket `json:"bucket"` Object Object `json:"object"` }
Metadata represents event metadata.
type Name ¶
type Name int
Name - event type enum. Refer http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#notification-how-to-event-types-and-destinations for most basic values we have since extend this and its not really much applicable other than a reference point. "s3:Replication:OperationCompletedReplication" is a MinIO extension.
const ( ObjectAccessedGet Name = 1 + iota ObjectAccessedGetRetention ObjectAccessedGetLegalHold ObjectAccessedHead ObjectCreatedCompleteMultipartUpload ObjectCreatedCopy ObjectCreatedPost ObjectCreatedPut ObjectCreatedPutRetention ObjectCreatedPutLegalHold ObjectCreatedPutTagging ObjectCreatedDeleteTagging ObjectRemovedDelete ObjectRemovedDeleteMarkerCreated BucketCreated BucketRemoved ObjectReplicationFailed ObjectReplicationComplete ObjectReplicationMissedThreshold ObjectReplicationReplicatedAfterThreshold ObjectReplicationNotTracked ObjectRestorePost ObjectRestoreCompleted ObjectTransitionFailed ObjectTransitionComplete ObjectManyVersions PrefixManyFolders ObjectAccessedAll ObjectCreatedAll ObjectRemovedAll ObjectReplicationAll ObjectRestoreAll ObjectTransitionAll ObjectScannerAll Everything )
Values of event Name
func (Name) MarshalJSON ¶
MarshalJSON - encodes to JSON data.
func (Name) MarshalXML ¶
MarshalXML - encodes to XML data.
func (*Name) UnmarshalJSON ¶
UnmarshalJSON - decodes JSON data.
func (*Name) UnmarshalXML ¶
UnmarshalXML - decodes XML data.
type Object ¶
type Object struct { Key string `json:"key"` Size int64 `json:"size,omitempty"` ETag string `json:"eTag,omitempty"` ContentType string `json:"contentType,omitempty"` UserMetadata map[string]string `json:"userMetadata,omitempty"` VersionID string `json:"versionId,omitempty"` Sequencer string `json:"sequencer"` }
Object represents object metadata of the event.