@@ -22,19 +22,36 @@ import "time"
22
22
// API represents the api event
23
23
type API struct {
24
24
Version string `json:"version"`
25
+ Type string `json:"type,omitempty"`
25
26
DeploymentID string `json:"deploymentid,omitempty"`
26
27
SiteName string `json:"siteName,omitempty"`
27
28
Time time.Time `json:"time"`
28
- Event string `json:"event"`
29
-
30
- Type string `json:"type,omitempty"`
31
-
32
- API struct {
33
- Name string `json:"name,omitempty"`
34
- Bucket string `json:"bucket,omitempty"`
35
- Object string `json:"object,omitempty"`
36
- StatusCode int `json:"statusCode,omitempty"`
37
- } `json:"api"`
29
+ Name string `json:"name,omitempty"`
30
+ Bucket string `json:"bucket,omitempty"`
31
+ Object string `json:"object,omitempty"`
32
+ VersionID string `json:"versionId,omitempty"`
33
+ External bool `json:"external,omitempty"`
34
+ CallInfo * CallInfo `json:"callInfo,omitempty"`
35
+ }
38
36
39
- Error string `json:"error,omitempty"`
37
+ // CallInfo represents the info for the external call
38
+ type CallInfo struct {
39
+ StatusCode int `json:"statusCode,omitempty"`
40
+ InputBytes int64 `json:"rx"`
41
+ OutputBytes int64 `json:"tx"`
42
+ HeaderBytes int64 `json:"txHeaders,omitempty"`
43
+ TimeToFirstByte string `json:"timeToFirstByte,omitempty"`
44
+ TimeToResponse string `json:"timeToResponse,omitempty"`
45
+ RemoteHost string `json:"remotehost,omitempty"`
46
+ RequestID string `json:"requestID,omitempty"`
47
+ UserAgent string `json:"userAgent,omitempty"`
48
+ ReqPath string `json:"requestPath,omitempty"`
49
+ ReqHost string `json:"requestHost,omitempty"`
50
+ ReqNode string `json:"requestNode,omitempty"`
51
+ ReqClaims map [string ]interface {} `json:"requestClaims,omitempty"`
52
+ ReqQuery map [string ]string `json:"requestQuery,omitempty"`
53
+ ReqHeader map [string ]string `json:"requestHeader,omitempty"`
54
+ RespHeader map [string ]string `json:"responseHeader,omitempty"`
55
+ AccessKey string `json:"accessKey,omitempty"`
56
+ ParentUser string `json:"parentUser,omitempty"`
40
57
}
0 commit comments