public

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Custom added in v1.1.0

func Custom(opts *Options) macaron.Handler

Custom implements the macaron static handler for serving custom assets.

func GenerateETag added in v1.5.0

func GenerateETag(fileSize, fileName, modTime string) string

GenerateETag generates an ETag based on size, filename and file modification time

func Static

func Static(opts *Options) macaron.Handler

Static implements the macaron static handler for serving assets.

func StaticHandler added in v1.5.0

func StaticHandler(dir string, opts *Options) macaron.Handler

StaticHandler sets up a new middleware for serving static files in the

Types

type Options

type Options struct {
	Directory   string
	IndexFile   string
	SkipLogging bool
	// if set to true, will enable caching. Expires header will also be set to
	// expire after the defined time.
	ExpiresAfter time.Duration
	FileSystem   http.FileSystem
	Prefix       string
}

Options represents the available options to configure the macaron handler.

Jump to

Keyboard shortcuts

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