Documentation
¶
Index ¶
- type APIGatewayProxyRequest
- type APIGatewayProxyRequestContext
- type APIGatewayProxyResponse
- type APIGatewayRequestIdentity
- type APIGatewayWebSocketAction
- type APIGatewayWebSocketActionType
- type APIGatewayWebSocketConnection
- type APIGatewayWebSocketConnectionRequest
- type APIGatewayWebSocketConnectionResponse
- type CMQEvent
- type CMQEventEntity
- type CMQEventRecord
- type COSBucket
- type COSEntity
- type COSEvent
- type COSEventEntity
- type COSEventRecord
- type COSObject
- type COSRequestParameters
- type CkafkaEvent
- type CkafkaEventEntity
- type CkafkaEventRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIGatewayProxyRequest ¶
type APIGatewayProxyRequest struct { Path string `json:"path"` // The url path be called QueryString map[string]string `json:"queryString"` // Query string in request HTTPMethod string `json:"httpMethod"` // HTTP method Headers map[string]string `json:"headers"` QueryStringParameters map[string]string `json:"queryStringParameters,omitempty"` PathParameters map[string]string `json:"pathParameters,omitempty"` HeaderParameters map[string]string `json:"headerParameters,omitempty"` StageVariables map[string]string `json:"stageVariables,omitempty"` RequestContext APIGatewayProxyRequestContext `json:"requestContext"` Body string `json:"body,omitempty"` IsBase64Encoded bool `json:"isBase64Encoded,omitempty"` }
APIGatewayProxyRequest contains data coming from the API Gateway proxy in integration way
type APIGatewayProxyRequestContext ¶
type APIGatewayProxyRequestContext struct { ServiceID string `json:"serviceId"` Path string `json:"path"` HTTPMethod string `json:"httpMethod"` RequestID string `json:"requestId"` Stage string `json:"stage"` Identity APIGatewayRequestIdentity `json:"identity"` SourceIP string `json:"sourceIp"` WebsocketEnable bool `json:"websocketEnable,omitempty"` }
APIGatewayProxyRequestContext contains the information of service and api config in api gateway
type APIGatewayProxyResponse ¶
type APIGatewayProxyResponse struct { StatusCode int `json:"statusCode"` Headers map[string]string `json:"headers"` Body string `json:"body"` IsBase64Encoded bool `json:"isBase64Encoded,omitempty"` }
APIGatewayProxyResponse contains the response to be returned to API Gateway to answer the request in integration way
type APIGatewayRequestIdentity ¶
type APIGatewayRequestIdentity struct {
SecretID string `json:"secretId,omitempty"`
}
APIGatewayRequestIdentity contains identity information for the request caller.
type APIGatewayWebSocketAction ¶
type APIGatewayWebSocketAction struct { Action APIGatewayWebSocketActionType `json:"action"` SecConnectionID string `json:"secConnectionID"` DataType string `json:"dataType"` Data string `json:"data"` }
APIGatewayWebSocketAction contains websocket send and recv data or action info.
type APIGatewayWebSocketActionType ¶
type APIGatewayWebSocketActionType string
APIGatewayWebSocketActionType defines the type of websocket action
const ( Connecting APIGatewayWebSocketActionType = "connecting" Closing APIGatewayWebSocketActionType = "closing" DataSend APIGatewayWebSocketActionType = "data send" DataRecv APIGatewayWebSocketActionType = "data recv" )
APIGatewayWebSocketActionType define values
type APIGatewayWebSocketConnection ¶
type APIGatewayWebSocketConnection struct { Action APIGatewayWebSocketActionType `json:"action"` SecConnectionID string `json:"secConnectionID"` SecWebSocketProtocol string `json:"secWebSocketProtocol"` SecWebSocketExtensions string `json:"secWebSocketExtensions"` }
APIGatewayWebSocketConnection contains websocket connecting info.
type APIGatewayWebSocketConnectionRequest ¶
type APIGatewayWebSocketConnectionRequest struct { RequestContext APIGatewayProxyRequestContext `json:"requestContext"` WebSocketConn APIGatewayWebSocketConnection `json:"websocket"` }
APIGatewayWebSocketConnectionRequest contains connection info send to cloud function
type APIGatewayWebSocketConnectionResponse ¶
type APIGatewayWebSocketConnectionResponse struct { ErrNumber int `json:"errNo"` ErrMesg string `json:"errMsg"` WebSocketConn APIGatewayWebSocketConnection `json:"websocket"` }
APIGatewayWebSocketConnectionResponse contains info need to response to api gateway
type CMQEvent ¶
type CMQEvent struct {
Records []CMQEventRecord `json:"Records"`
}
CMQEvent received as list
type CMQEventEntity ¶
type CMQEventEntity struct { Type string `json:"type"` TopicOwner int64 `json:"topicOwner"` TopicName string `json:"topicName"` SubscriptionName string `json:"subscriptionName"` PublishTime string `json:"publishTime"` MsgID string `json:"msgId"` RequestID string `json:"requestId"` MsgBody string `json:"msgBody"` MsgTag []string `json:"-"` }
func (*CMQEventEntity) UnmarshalJSON ¶
func (entity *CMQEventEntity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface
type CMQEventRecord ¶
type CMQEventRecord struct {
CMQEventEntity CMQEventEntity `json:"CMQ"`
}
CMQEventRecord contains CMQ Event info
type COSEvent ¶
type COSEvent struct {
Records []COSEventRecord `json:"Records"`
}
COSEvent received as list
type COSEventEntity ¶
type COSEventEntity struct { EventName string `json:"eventName"` EventVersion string `json:"eventVersion"` EventSource string `json:"eventSource"` EventTime int64 `json:"eventTime"` EventQueue string `json:"eventQueue"` RequestParameters COSRequestParameters `json:"requestParameters"` ReservedInfo string `json:"reservedInfo"` RequestID int64 `json:"reqid"` }
type COSEventRecord ¶
type COSEventRecord struct { Event COSEventEntity `json:"event"` COS COSEntity `json:"cos"` }
COSEventRecord contains Event info and COS info
type COSRequestParameters ¶
type CkafkaEvent ¶
type CkafkaEvent struct {
Records []CkafkaEventRecord `json:"Records"`
}
CkafkaEvent received as list
type CkafkaEventEntity ¶
type CkafkaEventRecord ¶
type CkafkaEventRecord struct {
CkafkaEventEntity CkafkaEventEntity `json:"Ckafka"`
}
CkafkaEventRecord contains Ckafka Event info