serve

package
v0.0.0-...-7a7d34f Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action(c *cli.Context)

Types

type Static

type Static struct {
	Directory http.Dir
	Options   StaticOptions
}

func (*Static) ServeHTTP

func (s *Static) ServeHTTP(res http.ResponseWriter, req *http.Request)

type StaticOptions

type StaticOptions struct {
	// Prefix is the optional prefix used to serve the static directory content
	Prefix string
	// SkipLogging will disable [Static] log messages when a static file is served.
	SkipLogging bool
	// IndexFile defines which file to serve as index if it exists.
	IndexFile string
	// Expires defines which user-defined function to use for producing a HTTP Expires Header
	// https://developers.google.com/speed/docs/insights/LeverageBrowserCaching
	Expires func() string
}

StaticOptions is a struct for specifying configuration options for the martini.Static middleware.

Jump to

Keyboard shortcuts

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