filesystem

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MPL-2.0 Imports: 9 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

func URIFromPath added in v0.2.0

func URIFromPath(path string) string

Types

type File added in v0.2.0

type File interface {
	FileHandler
	Text() []byte
	Lines() source.Lines
	Version() int
}

type FileChange added in v0.2.0

type FileChange interface {
	Text() string
	Range() hcl.Range
}

type FileChanges added in v0.2.0

type FileChanges []FileChange

type FileHandler added in v0.2.0

type FileHandler interface {
	URI() string
	FullPath() string
	Dir() string
	Filename() string
}

type FileNotOpenErr

type FileNotOpenErr struct {
	FileHandler FileHandler
}

func (*FileNotOpenErr) Error

func (e *FileNotOpenErr) Error() string

type FilePosition added in v0.2.0

type FilePosition interface {
	FileHandler
	Position() hcl.Pos
}

type Filesystem

type Filesystem interface {
	Open(File) error
	Change(VersionedFileHandler, FileChanges) error
	Close(FileHandler) error
	GetFile(FileHandler) (File, error)
}

type VersionedFileHandler added in v0.2.0

type VersionedFileHandler interface {
	FileHandler
	Version() int
}

Jump to

Keyboard shortcuts

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