server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Frames []Frame
}

type Frame

type Frame struct {
	Name string
}

func (Frame) Height

func (f Frame) Height() string

func (Frame) URL

func (f Frame) URL() string

func (Frame) Width

func (f Frame) Width() string

type Server

type Server struct {
	*mux.Router
	// contains filtered or unexported fields
}

func New

func New(f flag.Flag) *Server

func (*Server) Listen

func (s *Server) Listen() error

func (*Server) Open

func (s *Server) Open() error

func (*Server) ServeDirectory

func (s *Server) ServeDirectory(w http.ResponseWriter, r *http.Request)

ServeDirectory renders a single mustache template which is to be found inside a specific directory. This directory is specified using command line argumens using the -t option.

Usually you wouldn't navigate to this page yourself, rather this endpoint will be called from the preview page.

func (*Server) ServePreview

func (s *Server) ServePreview(w http.ResponseWriter, r *http.Request)

ServePreview renders the preview page with all templates inside the template directory as iframes. The template directory is specified using command line arguments with the -t option.

func (*Server) ServeTemplate

func (s *Server) ServeTemplate(w http.ResponseWriter, r *http.Request)

ServeTemplate renders a single mustache template as defined by command line arguments using the -t option.

func (*Server) URL

func (s *Server) URL() string

Jump to

Keyboard shortcuts

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