Documentation ¶
Index ¶
- func NewCORSDisablerWrapper(parent http.Handler) http.Handler
- func SpaFileServer(root http.Dir) http.Handler
- func ValidateContentLength(r *http.Request) error
- func WrapHandler(h HandlerFunc, guards ...GuardFn) http.HandlerFunc
- func WriteJSON(w http.ResponseWriter, i interface{})
- type BuildResponse
- type ErrorResponse
- type GuardFn
- type HTTPError
- type HandlerFunc
- type RunResponse
- type Service
- func (s *Service) HandleArtifactRequest(w http.ResponseWriter, r *http.Request) error
- func (s *Service) HandleCompile(w http.ResponseWriter, r *http.Request) error
- func (s *Service) HandleFormatCode(w http.ResponseWriter, r *http.Request) error
- func (s *Service) HandleGetSnippet(w http.ResponseWriter, r *http.Request) error
- func (s *Service) HandleGetSuggestion(w http.ResponseWriter, r *http.Request) error
- func (s *Service) HandleRunCode(w http.ResponseWriter, r *http.Request) error
- func (s *Service) HandleShare(w http.ResponseWriter, r *http.Request) error
- func (s *Service) Mount(r *mux.Router)
- type ShareResponse
- type SnippetResponse
- type SuggestionRequest
- type SuggestionsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateContentLength ¶ added in v1.4.1
func WrapHandler ¶ added in v1.4.1
func WrapHandler(h HandlerFunc, guards ...GuardFn) http.HandlerFunc
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, i interface{})
Types ¶
type BuildResponse ¶ added in v1.3.0
type ErrorResponse ¶
type ErrorResponse struct { Error string `json:"error"` // contains filtered or unexported fields }
func NewErrorResponse ¶
func NewErrorResponse(err error) *ErrorResponse
func (*ErrorResponse) Write ¶
func (r *ErrorResponse) Write(w http.ResponseWriter) http.ResponseWriter
type HTTPError ¶ added in v1.4.1
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError is HTTP response error
func NewHTTPError ¶ added in v1.4.1
func (*HTTPError) WriteResponse ¶ added in v1.4.1
func (err *HTTPError) WriteResponse(rw http.ResponseWriter)
type HandlerFunc ¶ added in v1.4.1
type HandlerFunc func(http.ResponseWriter, *http.Request) error
type RunResponse ¶ added in v1.3.0
type RunResponse struct { Formatted string `json:"formatted,omitempty"` Events []*goplay.CompileEvent `json:"events,omitempty"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) HandleArtifactRequest ¶ added in v1.3.0
func (*Service) HandleCompile ¶ added in v1.3.0
func (*Service) HandleFormatCode ¶ added in v1.3.0
func (*Service) HandleGetSnippet ¶ added in v1.3.0
func (*Service) HandleGetSuggestion ¶ added in v1.3.0
func (*Service) HandleRunCode ¶ added in v1.3.0
func (*Service) HandleShare ¶ added in v1.3.0
type ShareResponse ¶ added in v1.1.0
type ShareResponse struct {
}type SnippetResponse ¶ added in v1.1.0
type SuggestionRequest ¶
type SuggestionRequest struct { PackageName string `json:"packageName"` Value string `json:"value"` }
func (SuggestionRequest) Trim ¶
func (sr SuggestionRequest) Trim() SuggestionRequest
type SuggestionsResponse ¶
type SuggestionsResponse struct {
Suggestions []*analyzer.CompletionItem `json:"suggestions"`
}
func (SuggestionsResponse) Write ¶
func (r SuggestionsResponse) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.