server

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extra

type Extra struct {
	NodesPorts map[string]map[string]src.Interface `json:"nodesPorts"` // components -> nodes -> interface
}

type GetFileViewRequest

type GetFileViewRequest struct {
	WorkspaceURI URI `json:"workspaceUri"`
	Document     struct {
		URI      URI    `json:"uri"`
		FileName string `json:"fileName"`
	} `json:"document"`
}

type GetFileViewResponce

type GetFileViewResponce struct {
	File  src.File `json:"file"`
	Extra Extra    `json:"extra"` // info that is not presented in the file but needed for rendering
}

type Handler

type Handler struct {
	*protocol.Handler

	GetFileView func(glspCtx *glsp.Context, params GetFileViewRequest) (GetFileViewResponce, error)
}

func BuildHandler

func BuildHandler(logger commonlog.Logger, serverName string, indexer indexer.Indexer) *Handler

func (Handler) Handle

func (h Handler) Handle(glspCtx *glsp.Context) (response any, validMethod bool, validParams bool, err error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (Server) Exit

func (s Server) Exit(_ *glsp.Context) error

func (*Server) GetFileView

func (s *Server) GetFileView(glspCtx *glsp.Context, req GetFileViewRequest) (GetFileViewResponce, error)

func (*Server) Initialize

func (s *Server) Initialize(glspCtx *glsp.Context, params *protocol.InitializeParams) (any, error)

func (*Server) Initialized

func (s *Server) Initialized(glspCtx *glsp.Context, params *protocol.InitializedParams) error

func (Server) SetTrace

func (s Server) SetTrace(_ *glsp.Context, params *protocol.SetTraceParams) error

func (*Server) Shutdown

func (s *Server) Shutdown(context *glsp.Context) error

func (*Server) TextDocumentDidChange

func (s *Server) TextDocumentDidChange(glspCtx *glsp.Context, params *protocol.DidChangeTextDocumentParams) error

type URI

type URI struct {
	Path   string `json:"path"`
	FSPath string `json:"fsPath"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL