sprockets

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: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCompiledAssetDirectory

func NewCompiledAssetDirectory(path string) (assets.AssetPipeline, error)

Types

type CompiledAssetDirectory

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

CompiledAssetDirectory is an AssetPipeline for a directory containing compiled assets and a sprockets manifest.json file

func (*CompiledAssetDirectory) AssetContents

func (s *CompiledAssetDirectory) AssetContents(name string) (content []byte, err error)

func (*CompiledAssetDirectory) AssetUrl

func (s *CompiledAssetDirectory) AssetUrl(name string) (url string, err error)

func (*CompiledAssetDirectory) ServeHTTP

type Manifest

type Manifest struct {
	Assets map[string]string `json:"assets"`
}

type SprocketsServer

type SprocketsServer struct {
	http.Handler
	// contains filtered or unexported fields
}

SprocketsServer is an implementation of AssetPipeline that uses an external Sprockets server for compiling assets on demand

func NewSprocketsServer

func NewSprocketsServer(target *url.URL) (*SprocketsServer, error)

NewSprocketsServer creates a Sprockets asset pipeline

func (*SprocketsServer) AssetContents

func (s *SprocketsServer) AssetContents(name string) ([]byte, error)

func (*SprocketsServer) AssetUrl

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

Jump to

Keyboard shortcuts

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