Documentation ¶
Index ¶
- Constants
- func NewInternalServerError(ctx context.Context) events.APIGatewayProxyResponse
- func NewPermissionDeniedResponse(ctx context.Context) events.APIGatewayProxyResponse
- func NewSuccessResponse(ctx context.Context, result interface{}) events.APIGatewayProxyResponse
- func NewValidationFailureResponse(ctx context.Context, result ValidationError) events.APIGatewayProxyResponse
- type ConnectionPoster
- type FieldValidationError
- type Message
- type MessageDispatcher
- type MessageType
- type Response
- type ValidationError
Constants ¶
View Source
const ( SessionCreated = MessageType("SESSION_CREATED") SessionUpdated = MessageType("SESSION_UPDATED") FacilitatorSessionLoaded = MessageType("FACILITATOR_SESSION_LOADED") SessionLoaded = MessageType("SESSION_LOADED") ErrorEncountered = MessageType("ERROR_ENCOUNTERED") )
Variables ¶
This section is empty.
Functions ¶
func NewInternalServerError ¶
func NewInternalServerError(ctx context.Context) events.APIGatewayProxyResponse
func NewPermissionDeniedResponse ¶
func NewPermissionDeniedResponse(ctx context.Context) events.APIGatewayProxyResponse
func NewSuccessResponse ¶
func NewSuccessResponse(ctx context.Context, result interface{}) events.APIGatewayProxyResponse
func NewValidationFailureResponse ¶
func NewValidationFailureResponse(ctx context.Context, result ValidationError) events.APIGatewayProxyResponse
Types ¶
type ConnectionPoster ¶
type ConnectionPoster interface {
PostToConnectionWithContext(ctx aws.Context, input *apigatewaymanagementapi.PostToConnectionInput, opts ...request.Option) (*apigatewaymanagementapi.PostToConnectionOutput, error)
}
type FieldValidationError ¶
type Message ¶
type Message struct { Type MessageType `json:"type"` Body interface{} `json:"body"` }
type MessageDispatcher ¶
func NewMessageDispatcher ¶
func NewMessageDispatcher(gateway ConnectionPoster) MessageDispatcher
type MessageType ¶
type MessageType string
type Response ¶
type Response struct { Result interface{} `json:"result"` RequestID string `json:"requestId"` }
type ValidationError ¶
type ValidationError struct { FieldErrors []FieldValidationError `json:"fieldErrors"` Errors []string `json:"errors"` }
Click to show internal directories.
Click to hide internal directories.