|
|
@ -453,6 +453,7 @@ type eventArgs struct { |
|
|
|
BucketName string |
|
|
|
BucketName string |
|
|
|
Object ObjectInfo |
|
|
|
Object ObjectInfo |
|
|
|
ReqParams map[string]string |
|
|
|
ReqParams map[string]string |
|
|
|
|
|
|
|
RespElements map[string]string |
|
|
|
Host string |
|
|
|
Host string |
|
|
|
Port string |
|
|
|
Port string |
|
|
|
UserAgent string |
|
|
|
UserAgent string |
|
|
@ -474,6 +475,13 @@ func (args eventArgs) ToEvent() event.Event { |
|
|
|
eventTime := UTCNow() |
|
|
|
eventTime := UTCNow() |
|
|
|
uniqueID := fmt.Sprintf("%X", eventTime.UnixNano()) |
|
|
|
uniqueID := fmt.Sprintf("%X", eventTime.UnixNano()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
respElements := map[string]string{ |
|
|
|
|
|
|
|
"x-amz-request-id": uniqueID, |
|
|
|
|
|
|
|
"x-minio-origin-endpoint": getOriginEndpoint(), // Minio specific custom elements.
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if args.RespElements["content-length"] != "" { |
|
|
|
|
|
|
|
respElements["content-length"] = args.RespElements["content-length"] |
|
|
|
|
|
|
|
} |
|
|
|
newEvent := event.Event{ |
|
|
|
newEvent := event.Event{ |
|
|
|
EventVersion: "2.0", |
|
|
|
EventVersion: "2.0", |
|
|
|
EventSource: "minio:s3", |
|
|
|
EventSource: "minio:s3", |
|
|
@ -482,10 +490,7 @@ func (args eventArgs) ToEvent() event.Event { |
|
|
|
EventName: args.EventName, |
|
|
|
EventName: args.EventName, |
|
|
|
UserIdentity: event.Identity{creds.AccessKey}, |
|
|
|
UserIdentity: event.Identity{creds.AccessKey}, |
|
|
|
RequestParameters: args.ReqParams, |
|
|
|
RequestParameters: args.ReqParams, |
|
|
|
ResponseElements: map[string]string{ |
|
|
|
ResponseElements: respElements, |
|
|
|
"x-amz-request-id": uniqueID, |
|
|
|
|
|
|
|
"x-minio-origin-endpoint": getOriginEndpoint(), // Minio specific custom elements.
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
S3: event.Metadata{ |
|
|
|
S3: event.Metadata{ |
|
|
|
SchemaVersion: "1.0", |
|
|
|
SchemaVersion: "1.0", |
|
|
|
ConfigurationID: "Config", |
|
|
|
ConfigurationID: "Config", |
|
|
|