assets

package
v0.0.0-...-ec7f410 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoopAssetPipeline = &noopAssetPipeline{
	Handler: http.NotFoundHandler(),
}

Functions

func JavascriptTag

func JavascriptTag(url string) template.HTML

func StylesheetTag

func StylesheetTag(url string) template.HTML

Types

type AssetDirectory

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

AssetDirectory is an AssetPipeline for a directory containing asssets

func NewAssetDirectory

func NewAssetDirectory(path string) *AssetDirectory

func (*AssetDirectory) AssetContents

func (s *AssetDirectory) AssetContents(filename string) (content []byte, err error)

func (*AssetDirectory) AssetUrl

func (s *AssetDirectory) AssetUrl(name string) (string, error)

func (*AssetDirectory) ServeHTTP

func (s *AssetDirectory) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AssetPipeline

type AssetPipeline interface {
	http.Handler
	AssetUrl(name string) (string, error)
	AssetContents(name string) ([]byte, error)
}

func Prefix

func Prefix(prefix string, p AssetPipeline) AssetPipeline

Prefix returns an AssetPipeline that prefixes URLs with the given string

Directories

Path Synopsis
Package sprockets integrates the power of sprockets ( http://getsprockets.org ) with your go program.
Package sprockets integrates the power of sprockets ( http://getsprockets.org ) with your go program.

Jump to

Keyboard shortcuts

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