filesystem

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFile

func NewFile(fullPath string, content []byte) *file

func NewFilesystem

func NewFilesystem() *fsystem

Types

type FileNotOpenErr

type FileNotOpenErr struct {
	URI URI
}

func (*FileNotOpenErr) Error

func (e *FileNotOpenErr) Error() string

type Filesystem

type Filesystem interface {
	Open(lsp.TextDocumentItem) error
	Change(lsp.VersionedTextDocumentIdentifier, []lsp.TextDocumentContentChangeEvent) error
	Close(lsp.TextDocumentIdentifier) error
	URI(lsp.DocumentURI) URI
	HclBlockAtDocPosition(lsp.TextDocumentPositionParams) (*hcl.Block, hcl.Pos, error)
}

type InvalidHclPosErr

type InvalidHclPosErr struct {
	Pos     hcl.Pos
	InRange hcl.Range
}

func (*InvalidHclPosErr) Error

func (e *InvalidHclPosErr) Error() string

type InvalidLspPosErr

type InvalidLspPosErr struct {
	Pos lsp.Position
}

func (*InvalidLspPosErr) Error

func (e *InvalidLspPosErr) Error() string

type InvalidURIErr

type InvalidURIErr struct {
	URI URI
}

func (*InvalidURIErr) Error

func (e *InvalidURIErr) Error() string

type NoBlockFoundErr

type NoBlockFoundErr struct {
	AtPos hcl.Pos
}

func (*NoBlockFoundErr) Error

func (e *NoBlockFoundErr) Error() string

type URI

type URI string

func (URI) Dir

func (u URI) Dir() string

func (URI) Filename

func (u URI) Filename() string

func (URI) FullPath

func (u URI) FullPath() string

func (URI) LSPDocumentURI

func (u URI) LSPDocumentURI() lsp.DocumentURI

func (URI) PathParts

func (u URI) PathParts() (full, dir, filename string)

func (URI) Valid

func (u URI) Valid() bool

Jump to

Keyboard shortcuts

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