complete

package
v0.0.0-...-f5b6858 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package complete provides types to aid with auto-completion of Flux scripts in editors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Completer

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

Completer provides methods for suggestions in Flux queries.

func DefaultCompleter

func DefaultCompleter() Completer

DefaultCompleter creates a completer with builtin scope and declarations.

func NewCompleter

func NewCompleter(scope *interpreter.Scope, declarations semantic.DeclarationScope) Completer

NewCompleter creates a new completer from scope and declarations.

func (Completer) Declaration

func (c Completer) Declaration(name string) (semantic.VariableDeclaration, error)

Declaration returns a declaration based on the expression name, if one exists.

func (Completer) FunctionNames

func (c Completer) FunctionNames() []string

FunctionNames returns the names of all function declarations.

func (Completer) FunctionSuggestion

func (c Completer) FunctionSuggestion(name string) (FunctionSuggestion, error)

FunctionSuggestion returns information needed for autocomplete suggestions for the function with the given name.

func (Completer) Names

func (c Completer) Names() []string

Names returns the slice of names of declared expressions.

type FunctionSuggestion

type FunctionSuggestion struct {
	Params map[string]string
}

FunctionSuggestion provides suggestion information about a function.

Jump to

Keyboard shortcuts

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