scf

package
v0.0.0-...-13c9a7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 8

Documentation

Index

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 COSBucket

type COSBucket struct {
	Name   string `json:"name"`
	AppID  string `json:"appid"`
	Region string `json:"region"`
}

type COSEntity

type COSEntity struct {
	SchemaVersion  string    `json:"cosSchemaVersion"`
	NotificationID string    `json:"cosNotificationId"`
	Bucket         COSBucket `json:"cosBucket"`
	Object         COSObject `json:"cosObject"`
}

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 COSObject

type COSObject struct {
	Key      string            `json:"key"`
	Size     int64             `json:"size"`
	URL      string            `json:"url"`
	Metadata map[string]string `json:"meta"`
	VID      string            `json:"vid"`
}

type COSRequestParameters

type COSRequestParameters struct {
	SourceIP string            `json:"requestSourceIP"`
	Headers  map[string]string `json:"requestHeaders"`
}

type CkafkaEvent

type CkafkaEvent struct {
	Records []CkafkaEventRecord `json:"Records"`
}

CkafkaEvent received as list

type CkafkaEventEntity

type CkafkaEventEntity struct {
	Topic     string `json:"topic"`
	Partition int64  `json:"partition"`
	Offset    int64  `json:"offset"`
	MsgKey    string `json:"msgKey"`
	MsgBody   string `json:"msgBody"`
}

type CkafkaEventRecord

type CkafkaEventRecord struct {
	CkafkaEventEntity CkafkaEventEntity `json:"Ckafka"`
}

CkafkaEventRecord contains Ckafka Event info

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL