embed

package
v2.17.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Index: "index.html",
	FilePath: func(c echo.Context) (string, error) {
		return c.Param(`*`), nil
	},
}

Functions

func File

func File(fs FileSystems, configs ...Config) func(c echo.Context) error

File e.Get(`/*`, File(customFS))

Types

type Config

type Config struct {
	Index    string
	Prefix   string
	FilePath func(echo.Context) (string, error)
}

type FileSystems

type FileSystems []fs.FS

func NewFileSystems

func NewFileSystems() FileSystems

func (FileSystems) IsEmpty

func (f FileSystems) IsEmpty() bool

func (FileSystems) Open

func (f FileSystems) Open(name string) (file fs.File, err error)

func (*FileSystems) Register

func (f *FileSystems) Register(fileSystem fs.FS)

func (FileSystems) Size

func (f FileSystems) Size() int

Jump to

Keyboard shortcuts

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