referencecompletion

package
v0.0.0-...-36d6306 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ArrayStringValuePrefix = "Array"
View Source
const MapStringValuePrefix = "Map"

Variables

This section is empty.

Functions

This section is empty.

Types

type ReferenceCompletionCreator

type ReferenceCompletionCreator struct {
	PathMap map[string]ReferenceCompletionDetails
}

func NewReferenceCompletionCreator

func NewReferenceCompletionCreator() ReferenceCompletionCreator

func (ReferenceCompletionCreator) Add

func (c ReferenceCompletionCreator) Add(value any)

func (*ReferenceCompletionCreator) AddWithKey

func (c *ReferenceCompletionCreator) AddWithKey(key string, data any)

func (ReferenceCompletionCreator) FindMatch

func (c ReferenceCompletionCreator) FindMatch(query string) []fuzzyfinder.Rank

func (ReferenceCompletionCreator) FindMatchAndCalcCompletionData

func (c ReferenceCompletionCreator) FindMatchAndCalcCompletionData(query string) []ReferenceCompletionItem

func (ReferenceCompletionCreator) FindNextLevel

func (c ReferenceCompletionCreator) FindNextLevel(query string) []fuzzyfinder.Rank

FindNextLevel returns only the immediate next-level children matching the query. For "response." it returns ["response.body", "response.status", "response.headers"] rather than all descendants. This enables VS Code-style drill-down completion.

func (ReferenceCompletionCreator) FindNextLevelCompletionData

func (c ReferenceCompletionCreator) FindNextLevelCompletionData(query string) []ReferenceCompletionItem

FindNextLevelCompletionData returns completion items for the next level only, with proper Kind detection and EndIndex set to the start of the segment name.

type ReferenceCompletionDetails

type ReferenceCompletionDetails struct {
	Count uint
}

type ReferenceCompletionItem

type ReferenceCompletionItem struct {
	Kind reference.ReferenceKind

	/** End token of the string to be completed, i.e. 'body' in 'response.bo|dy' */
	EndToken string
	/** Index of the completion start in the end token, i.e. 2 in 'bo|dy' of 'response.bo|dy' */
	EndIndex int32
	/** Number of items when reference is a map or an array */
	ItemCount *int32
	/** Environment names when reference is a variable */
	Environments []string
}

type ReferenceCompletionLookUp

type ReferenceCompletionLookUp struct {
	LookUpMap map[string]string
}

func NewReferenceCompletionLookup

func NewReferenceCompletionLookup() ReferenceCompletionLookUp

func (ReferenceCompletionLookUp) Add

func (c ReferenceCompletionLookUp) Add(value any)

func (ReferenceCompletionLookUp) AddWithKey

func (c ReferenceCompletionLookUp) AddWithKey(key string, value any)

func (ReferenceCompletionLookUp) GetValue

func (c ReferenceCompletionLookUp) GetValue(path string) (string, error)

Jump to

Keyboard shortcuts

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