Documentation
¶
Index ¶
- type Bucket
- type Data
- type HTTPTriggerEvent
- type HTTPTriggerRequestContext
- type HTTPTriggerResponse
- type KafkaData
- type KafkaDataHeader
- type KafkaEventBridgeEvent
- type MnsQueueEvent
- type MnsTopicEvent
- type Object
- type ObjectMeta
- type Oss
- type OssEvent
- type OssEventRecord
- type Parameter
- type RequestParameters
- type ResponseElements
- type RocketMQData
- type RocketMQEvent
- type SlsEvent
- type Source
- type TimerEvent
- type UserIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPTriggerEvent ¶ added in v0.2.8
type HTTPTriggerEvent struct { Version *string `json:"version"` // HTTP 触发器请求事件版本 RawPath *string `json:"rawPath"` // 未经解析的路径 Body *string `json:"body"` // 请求体 IsBase64Encoded *bool `json:"isBase64Encoded"` // 请求体是否以 Base64 编码 Headers *map[string]string `json:"headers"` // HTTP 请求头 QueryParameters *map[string]string `json:"queryParameters"` // 查询 Param // RequestContext 包含请求的上下文信息 TriggerContext HTTPTriggerRequestContext `json:"requestContext"` }
HTTPTriggerEvent 事件输入
type HTTPTriggerRequestContext ¶ added in v0.2.8
type HTTPTriggerRequestContext struct { AccountId *string `json:"accountId"` // 账户 ID DomainName *string `json:"domainName"` // 域名 DomainPrefix *string `json:"domainPrefix"` // 域名前缀 // Http 结构体包含 HTTP 请求的详细信息 Http struct { Method *string `json:"method"` // 请求方法 Path *string `json:"path"` // 请求路径 Protocol *string `json:"protocol"` // 请求协议 SourceIp *string `json:"sourceIp"` // 请求来源 IP UserAgent *string `json:"userAgent"` // 客户端标识,如: Mozilla/5.0 } `json:"http"` RequestId *string `json:"requestId"` // 请求 ID Time *string `json:"time"` // 请求时间 TimeEpoch *string `json:"timeEpoch"` // 时间戳(epoch 时间) }
HTTPTriggerRequestContext 用于存储上下文信息
type HTTPTriggerResponse ¶ added in v0.2.8
type HTTPTriggerResponse struct { StatusCode int `json:"statusCode"` Headers map[string]string `json:"headers"` IsBase64Encoded bool `json:"isBase64Encoded"` Body string `json:"body"` }
HTTPTriggerResponse 定义了 HTTP 响应的结构体 主要包括状态码、头部信息、是否以 Base64 编码、响应体四个部分
type KafkaDataHeader ¶ added in v0.2.2
type KafkaEventBridgeEvent ¶ added in v0.2.2
type KafkaEventBridgeEvent struct { Data *KafkaData `json:"data"` Id *string `json:"id"` Source *string `json:"source"` SpecVersion *string `json:"specversion"` Type *string `json:"type"` DataContentType *string `json:"datacontenttype"` Time *string `json:"time"` Subject *string `json:"subject"` AliyunAccountId *string `json:"aliyunaccountid"` }
type MnsQueueEvent ¶ added in v0.2.1
type MnsQueueEvent struct { ID *string `json:"id"` Source *string `json:"source"` Specversion *string `json:"specversion"` Type *string `json:"type"` Datacontenttype *string `json:"datacontenttype"` Subject *string `json:"subject"` Time time.Time `json:"time"` Aliyunaccountid *string `json:"aliyunaccountid"` Aliyunpublishtime time.Time `json:"aliyunpublishtime"` Aliyunoriginalaccountid *string `json:"aliyunoriginalaccountid"` Aliyuneventbusname *string `json:"aliyuneventbusname"` Aliyunregionid *string `json:"aliyunregionid"` Aliyunpublishaddr *string `json:"aliyunpublishaddr"` Data *Data `json:"data"` }
type MnsTopicEvent ¶ added in v0.2.1
type MnsTopicEvent struct { TopicOwner *string `json:"TopicOwner"` Message *string `json:"Message"` Subscriber *string `json:"Subscriber"` PublishTime time.Time `json:"PublishTime"` SubscriptionName *string `json:"SubscriptionName"` MessageMD5 *string `json:"MessageMD5"` TopicName *string `json:"TopicName"` MessageID *string `json:"MessageId"` }
type Object ¶
type Object struct { DeltaSize *int `json:"deltaSize"` ETag *string `json:"eTag"` Key *string `json:"key"` ObjectMeta *ObjectMeta `json:"objectMeta"` Size *int `json:"size"` }
type ObjectMeta ¶
type ObjectMeta struct {
MimeType *string `json:"mimeType"`
}
type OssEvent ¶
type OssEvent struct {
Events []*OssEventRecord `json:"events"`
}
type OssEventRecord ¶
type OssEventRecord struct { EventName *string `json:"eventName"` EventSource *string `json:"eventSource"` EventTime *time.Time `json:"eventTime"` EventVersion *string `json:"eventVersion"` Oss *Oss `json:"oss"` Region *string `json:"region"` RequestParameters *RequestParameters `json:"requestParameters"` ResponseElements *ResponseElements `json:"responseElements"` UserIdentity *UserIdentity `json:"userIdentity"` }
type RequestParameters ¶
type RequestParameters struct {
SourceIPAddress *string `json:"sourceIPAddress"`
}
type ResponseElements ¶
type ResponseElements struct {
RequestID *string `json:"requestId"`
}
type RocketMQData ¶ added in v0.2.8
type RocketMQEvent ¶ added in v0.2.8
type RocketMQEvent struct { ID *string `json:"id"` Source *string `json:"source"` SpecVersion *string `json:"specversion"` Type *string `json:"type"` DataContentType *string `json:"datacontenttype"` Subject *string `json:"subject"` Time *time.Time `json:"time"` AliyunAccountId *string `json:"aliyunaccountid"` AliyunPublishTime *time.Time `json:"aliyunpublishtime"` AliyunOriginalAccountId *string `json:"aliyunoriginalaccountid"` AliyunEventBusName *string `json:"aliyuneventbusname"` AliyunRegionId *string `json:"aliyunregionid"` AliyunPublishAddr *string `json:"aliyunpublishaddr"` Data *RocketMQData `json:"data"` }
type TimerEvent ¶ added in v0.2.2
type UserIdentity ¶
type UserIdentity struct {
PrincipalID *string `json:"principalId"`
}
Click to show internal directories.
Click to hide internal directories.