blueprint

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePositionMap

func CreatePositionMap(tree *schema.TreeNode) map[string][]*schema.TreeNode

CreatePositionMap creates a map of positions to tree nodes for a given tree. This allows for efficient lookup of elements in a blueprint based on their starting location.

This produces a list of tree nodes for each start position key, with the element with the smallest range being the last element in the list (Due to order of traversal).

This uses the `PositionKey` function to encode the start position as a string key. Positions are expected to be 1-indexed, further conversion is needed to produce 0-indexed positions compatible with the LSP.

func DetermineDocFormat

func DetermineDocFormat(docURI lsp.URI) schema.SpecFormat

DetermineDocFormat determines the document format based on the file extension.

func LoadProviders

func LoadProviders(ctx context.Context) (map[string]provider.Provider, error)

LoadProviders deals with loading initial providers to be used for validating and in providing other LSP features for blueprint such as function signatures, hover information and completion items.

The language server uses the deploy engine plugin system to load gRPC provider plugins at a later stage.

func LoadTransformers

func LoadTransformers(ctx context.Context) (map[string]transform.SpecTransformer, error)

LoadTransformers deals with loading initial transformers to be used for validating and in providing other LSP features for blueprint such as hover information.

The language server uses the deploy engine plugin system to load gRPC transformer plugins at a later stage.

func ParseJWCCNode

func ParseJWCCNode(content string) (*json.Node, error)

ParseJWCCNode parses the given JSON with Commas and Comments content and returns the root node of the JSON document hierarchy that can be used for things like extracting document symbols.

func ParseYAMLNode

func ParseYAMLNode(content string) (*yaml.Node, error)

ParseYAMLNode parses the given YAML content and returns the root node of the YAML document hierarchy that can be used for things like extracting document symbols.

func PositionKey

func PositionKey(pos *source.Position) string

PositionKey encodes a position as a string key. This produces a key of the form `line:column`. If the provided source meta struct is nil, `1:1` is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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