server

package
v2.935.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

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