asset

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handler = func(w http.ResponseWriter, r *http.Request) {
	root.ServeHTTP(w, r)
}

Functions

This section is empty.

Types

type Asset

type Asset interface {
	List() ([]Asset, error)
	Bytes() []byte // return file bytes
	Name() string  // return file serve name
	http.File      // implement http.FileSystem
	Template() *template.Template
}

func Find

func Find(name string) (Asset, error)

func List

func List() []Asset

type Assets

type Assets interface {
	List() []Asset // return all files
	Find(name string) (Asset, error)
	ServeHTTP(w http.ResponseWriter, r *http.Request) // implement http.FileServer
}
var (
	// Root asset interface
	Root Assets
)

Jump to

Keyboard shortcuts

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