vfs

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	io.Reader
	io.Closer
}

File represents an open file, which will typically be the response body of a Pages request.

type ReadError added in v1.60.0

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

func NewReadError added in v1.60.0

func NewReadError(wrapped error) *ReadError

func (*ReadError) Error added in v1.60.0

func (r *ReadError) Error() string

func (*ReadError) Is added in v1.60.0

func (r *ReadError) Is(target error) bool

func (*ReadError) Unwrap added in v1.60.0

func (r *ReadError) Unwrap() error

type Root added in v1.24.0

type Root interface {
	Lstat(ctx context.Context, name string) (os.FileInfo, error)
	Readlink(ctx context.Context, name string) (string, error)
	Open(ctx context.Context, name string) (File, error)
}

Root abstracts the things Pages needs to serve a static site from a given root rootPath.

type SeekableFile added in v1.26.0

type SeekableFile interface {
	File
	io.Seeker
}

SeekableFile represents a seekable file, which will typically be the response body of a Pages request.

type VFS

type VFS interface {
	Root(ctx context.Context, path string, cacheKey string) (Root, error)
	Name() string
	Reconfigure(config *config.Config) error
}

VFS abstracts the things Pages needs to serve a static site from disk.

func Instrumented

func Instrumented(fs VFS) VFS

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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