static

package
v0.0.0-...-c99bb84 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileServer

func NewFileServer(y *yarf.Yarf, path, prefix string) *yarf.Yarf

Used by Yarf to set up the fileserver.

Types

type CustomFileSystem

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

FileSystem custom file system handler.

func (CustomFileSystem) Open

func (fs CustomFileSystem) Open(path string) (http.File, error)

type File

type File struct {
	// Implements Resource
	yarf.Resource

	// Points to www_root
	Path string

	// Prefix to exclude on path construction
	Prefix string
}

func (*File) Get

func (f *File) Get(c *yarf.Context) error

Implement the GET handler for the file system handler.

Jump to

Keyboard shortcuts

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