server

package
v2.968.6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0 Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNodeNotFound         = errors.New("unable to find node at position")
	ErrNoDocumentationFound = errors.New("no documentation found")
)
View Source
var (
	DefaultTimeout = time.Minute
)

Functions

This section is empty.

Types

type Document

type Document struct {
	URI               protocol.DocumentUri
	RunningDiagnostic bool
	Content           string
	ParsedDoc         *openapi.OpenAPI            // Parsed OpenAPI document
	Index             *openapi.Index              // Document index for finding references
	ParseErrors       []error                     // Errors from parsing the document
	ReservedChecker   *oas.DynamicReservedChecker // Dynamic reserved property checker
}

type LanguageServer

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

func NewSpeakeasyServer

func NewSpeakeasyServer(version string, fs filesystem.FileSystem) *LanguageServer

func (*LanguageServer) HandleHover

func (s *LanguageServer) HandleHover(params *protocol.HoverParams) (*protocol.Hover, error)

func (*LanguageServer) HandlePrepareRename

func (s *LanguageServer) HandlePrepareRename(params *protocol.PrepareRenameParams) (*protocol.RangeWithPlaceholder, error)

func (*LanguageServer) HandleRename

func (s *LanguageServer) HandleRename(params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)

func (*LanguageServer) Validate

func (s *LanguageServer) Validate(ctx context.Context, schema []byte) []protocol.Diagnostic

type Logger

type Logger interface {
	Error(message string, keysAndValues ...any)
	Errorf(format string, args ...any)
	Warning(message string, keysAndValues ...any)
	Warningf(format string, args ...any)
	Info(message string, keysAndValues ...any)
	Infof(format string, args ...any)
	Debug(message string, keysAndValues ...any)
	Debugf(format string, args ...any)
}

type Server

type Server struct {
	//nolint:containedctx
	Context      context.Context
	Handler      glsp.Handler
	Log          Logger
	Timeout      time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

func (*Server) ServeStream

func (s *Server) ServeStream(stream io.ReadWriteCloser)

Jump to

Keyboard shortcuts

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