Documentation ¶
Index ¶
- Constants
- type CompletionOptions
- type InitializeResult
- type JSONRPCError
- type JSONRPCResponse
- func CreateEnvironmentVariablesResp(req request.JSONRPCRequest, envs interface{}) JSONRPCResponse
- func CreateSuccessResponse(requestID int, result interface{}) JSONRPCResponse
- func DefaultResp(req request.JSONRPCRequest) JSONRPCResponse
- func ErrorResp(req request.JSONRPCRequest, errorCode int, errorMsg string) JSONRPCResponse
- func InvalidReqAfterShutdown(req request.JSONRPCRequest) JSONRPCResponse
- type ServerCapabilities
Constants ¶
View Source
const ( ErrInvalidAfterShutdown = -32000 ErrUnsupportedFeature = -32001 ErrInvalidURI = -32002 ErrUnexpectedURIScheme = -32003 ErrInvalidRequest = -32600 ErrMethodNotFound = -32601 ErrInternalError = -32603 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletionOptions ¶
type InitializeResult ¶
type InitializeResult struct {
Capabilities ServerCapabilities `json:"capabilities"`
}
type JSONRPCError ¶
type JSONRPCResponse ¶
type JSONRPCResponse struct { ID int `json:"id"` Result interface{} `json:"result"` JSONRPC string `json:"jsonrpc"` Error *JSONRPCError `json:"error,omitempty"` }
func CreateEnvironmentVariablesResp ¶
func CreateEnvironmentVariablesResp(req request.JSONRPCRequest, envs interface{}) JSONRPCResponse
func CreateSuccessResponse ¶
func CreateSuccessResponse(requestID int, result interface{}) JSONRPCResponse
Utility function to create a general success response
func DefaultResp ¶
func DefaultResp(req request.JSONRPCRequest) JSONRPCResponse
func ErrorResp ¶
func ErrorResp(req request.JSONRPCRequest, errorCode int, errorMsg string) JSONRPCResponse
Utility function to create a general error response
func InvalidReqAfterShutdown ¶
func InvalidReqAfterShutdown(req request.JSONRPCRequest) JSONRPCResponse
type ServerCapabilities ¶
type ServerCapabilities struct { TextDocumentSync int `json:"textDocumentSync"` Completion *CompletionOptions `json:"completion,omitempty"` HoverProvider bool `json:"hoverProvider,omitempty"` SuggestL2Envs bool `json:"suggestL2Env,omitempty"` }
Click to show internal directories.
Click to hide internal directories.