yaml

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Copyright 2022, Pulumi Corporation. All rights reserved.

The logic specific to Pulumi YAML.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeIOWriter

func MakeIOWriter[T any](f func(Writer, T)) func(io.Writer, T)

func Methods

func Methods(host plugin.Host) *lsp.Methods

Create the set of methods necessary to implement a LSP server for Pulumi YAML.

func NewDocumentAnalysisPipeline

func NewDocumentAnalysisPipeline(c lsp.Client, text lsp.Document, loader schema.ReferenceLoader) *documentAnalysisPipeline

Creates a new asynchronous analysis pipeline, returning a handle to the process. To avoid a memory leak, ${RESULT}.cancel must be called.

Types

type Invoke

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

func (Invoke) Describe

func (f Invoke) Describe() (protocol.MarkupContent, bool)

func (Invoke) Range

func (o Invoke) Range() *protocol.Range

type KeyPos

type KeyPos = util.Tuple[protocol.Position, string]

type Object

type Object interface {
	Describe() (protocol.MarkupContent, bool)
	Range() *protocol.Range
	// contains filtered or unexported methods
}

An object in the schema that can be acted upon.

type Reference

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

func (*Reference) Describe

func (r *Reference) Describe() (protocol.MarkupContent, bool)

func (Reference) Range

func (o Reference) Range() *protocol.Range

type Resource

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

func (Resource) Describe

func (r Resource) Describe() (protocol.MarkupContent, bool)

func (Resource) Range

func (o Resource) Range() *protocol.Range

type SchemaCache

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

A server level cache for schema loading.

func (*SchemaCache) Loader

func (c *SchemaCache) Loader(client lsp.Client) schema.ReferenceLoader

func (SchemaCache) ResolveFunction

func (l SchemaCache) ResolveFunction(c lsp.Client, token, version string) (*schema.Function, error)

ResolveFunction resolves an arbitrary function token into an appropriate schema.Resource.

func (SchemaCache) ResolveResource

func (l SchemaCache) ResolveResource(c lsp.Client, token, version string) (*schema.Resource, error)

ResolveResource resolves an arbitrary resource token into an appropriate schema.Resource.

type SchemaLoader

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

func (SchemaLoader) LoadPackage

func (l SchemaLoader) LoadPackage(pkg string, version *semver.Version) (*schema.Package, error)

func (SchemaLoader) LoadPackageReference

func (l SchemaLoader) LoadPackageReference(pkg string, version *semver.Version) (schema.PackageReference, error)

type UnparsableError

type UnparsableError struct {
	Bail bool // If an attempt should be made to continue without the parsed schema
	// contains filtered or unexported fields
}

func (UnparsableError) Error

func (e UnparsableError) Error() string

type Writer

type Writer = func(msg string, args ...interface{})

Directories

Path Synopsis
Bind performs static analysis on a YAML document.
Bind performs static analysis on a YAML document.

Jump to

Keyboard shortcuts

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