Documentation
¶
Overview ¶
Package message contains all the objects that are sent between the server and client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct {
Authorization string `json:"authorization,omitempty"`
Host string `json:"host,omitempty"`
XAmzDate string `json:"x-amz-date,omitempty"`
XAmzSecurityToken string `json:"x-amz-security-token,omitempty"`
XAPIKey string `json:"x-api-key,omitempty"`
}
Authorization contains the client authentication details. See https://docs.aws.amazon.com/appsync/latest/eventapi/event-api-websocket-protocol.html#authorization-formatting-by-mode for more information on authorization formatting.
type ReceiveEvent ¶
ReceiveEvent are the event identifiers that are used for reporting success or failed of individual events.
type ReceiveMessage ¶
type ReceiveMessage struct {
ConnectionTimeoutMs int `json:"connectionTimeoutMs,omitempty"`
Errors []ErrorData `json:"errors,omitempty"`
Event string `json:"event,omitempty"`
Failed []ReceiveEvent `json:"failed,omitempty"`
Successful []ReceiveEvent `json:"successful,omitempty"`
ID string `json:"id,omitempty"`
Type ReceiveType `json:"type"`
}
ReceiveMessage are messages that are received from the Appsync Event server.
type ReceiveType ¶
type ReceiveType string
ReceiveType is the message types that can be received from the Appsync Event server.
const ( ConnectionAckType ReceiveType = "connection_ack" ConnectionErrType ReceiveType = "connection_error" ErrorType ReceiveType = "error" KeepAliveType ReceiveType = "ka" PublishErrType ReceiveType = "publish_error" PublishSuccessType ReceiveType = "publish_success" SubscribeErrType ReceiveType = "subscribe_error" SubscribeSuccessType ReceiveType = "subscribe_success" SubscriptionBroadcastErrorType ReceiveType = "broadcast_error" SubscriptionDataType ReceiveType = "data" UnsubscribeErrType ReceiveType = "unsubscribe_error" UnsubscribeSuccessType ReceiveType = "unsubscribe_success" )
type SendMessage ¶
type SendMessage struct {
Authorization *Authorization `json:"authorization,omitempty"`
Channel string `json:"channel,omitempty"`
Events []string `json:"events,omitempty"`
ID string `json:"id,omitempty"`
Type SendType `json:"type"`
}
SendMessage are messages that are sent to the Appsync Event server.
type SendType ¶
type SendType string
SendType is the message types that are sent to the Appsync Event server.
type SubscriptionMessage ¶
type SubscriptionMessage struct {
Errors []ErrorData `json:"errors,omitempty"`
Event string `json:"event,omitempty"`
Type ReceiveType `json:"type"`
}
SubscriptionMessage are the subscription event messages received from the Appsync Event server.