Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, i interface{})
Types ¶
type CompilerResponse ¶
type CompilerResponse struct { Formatted string `json:"formatted,omitempty"` Events []*goplay.CompileEvent `json:"events,omitempty"` }
type ErrorResponse ¶
type ErrorResponse struct { Error string `json:"error"` // contains filtered or unexported fields }
func Errorf ¶
func Errorf(code int, format string, args ...interface{}) ErrorResponse
Errorf creates error response
func NewErrorResponse ¶
func NewErrorResponse(err error) ErrorResponse
func (ErrorResponse) Write ¶
func (r ErrorResponse) Write(w http.ResponseWriter) http.ResponseWriter
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) FormatCode ¶
func (s *Service) FormatCode(w http.ResponseWriter, r *http.Request)
func (*Service) GetSuggestion ¶
func (s *Service) GetSuggestion(w http.ResponseWriter, r *http.Request)
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.