Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWebSocketUpgrader ¶
NewWebSocketUpgrader creates a new websocket.Ugprader.
Types ¶
type CustomValidator ¶
type CustomValidator struct {
// contains filtered or unexported fields
}
CustomValidator used to validate incoming payloads (for now). https://echo.labstack.com/guide/request#validate-data
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
Validate incoming payloads (for now) that contain the struct tag `validate:"required"`.
type ErrorResponse ¶
type ErrorResponse struct {
Error interface{} `json:"error"`
}
ErrorResponse wraps `error` into a JSON object.
type MessageOut ¶
MessageOut is the structure of the message that gets sent to the WebSocket client.
type Server ¶
type Server struct { *echo.Echo // Wrap (using composition) *echo.Echo, allows us to pretend Server is echo.Echo. // contains filtered or unexported fields }
Server wraps *echo.Echo and stores the proxy once configured.
func NewServer ¶
func NewServer(checker model.ConditionalityChecker) *Server
NewServer returns new echo.Echo server.
type ValidationRunsIDResponse ¶
type ValidationRunsIDResponse struct {
Status string `json:"status"`
}
ValidationRunsIDResponse is the response to the `/api/validation-runs/:id` endpoint.
type ValidationRunsResponse ¶
type ValidationRunsResponse struct {
ID string `json:"id"`
}
ValidationRunsResponse is the response to the `/api/validation-runs` endpoint.
type WebSocketHandler ¶
type WebSocketHandler struct {
// contains filtered or unexported fields
}
WebSocketHandler for handling WebSocket connections.