{"modulePath":"github.com/newstack-cloud/ls-builder","version":"v0.2.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package common\n\n## Types\n\n```go\ntype CallFunc func(method string, params any, result any) error\n```\nCallFunc is a signature for a function that sends JSON-RPC requests. The result parameter should be a pointer to the value that the result should be unmarshaled into. This should only be used directly in the case where lsp.Dispatcher doesn't implement the method you need to call.\n\n```go\ntype Handler interface {\n\tHandle(ctx *LSPContext) (r any, validMethod bool, validParams bool, err error)\n}\n```\nHandler provides an interface for handling LSP requests.\n\n```go\ntype HandlerFunc func(ctx *LSPContext) (r any, validMethod bool, validParams bool, err error)\n```\nHandlerFunc provides a convenient way to define a handler with a plain function.\n\n```go\nfunc (f HandlerFunc) Handle(ctx *LSPContext) (r any, validMethod bool, validParams bool, err error)\n```\n\n```go\ntype LSPContext struct {\n\tMethod  string\n\tParams  json.RawMessage\n\tNotify  NotifyFunc\n\tCall    CallFunc\n\tContext context.Context\n}\n```\nLSPContext contains the context for an LSP request from a client.\n\n```go\ntype NotifyFunc func(method string, params any) error\n```\nNotifyFunc is a signature for a function that sends JSON-RPC notifications. This should only be used directly in the case where lsp.Dispatcher doesn't implement the method you need to call.\n\n","path":"github.com/newstack-cloud/ls-builder/common","name":"common","synopsis":"","isRedistributable":true}
