sample

package
v0.0.0-...-71a9ee9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Title string `long:"sample_title" default:"Sample page" description:"Sample page title"`
}

Flags defines local application flags

type Info

type Info struct{ pagesample.Attr }

func (Info) Data

func (i Info) Data() interface{}

func (Info) Ext

func (i Info) Ext() string

func (Info) Template

func (i Info) Template() string

type Middleware

type Middleware struct {
	Log    *log.Logger
	Config *Flags
	// contains filtered or unexported fields
}

Middleware is a struct that has a ServeHTTP method

func New

func New(logger *log.Logger, cfg *Flags, writable bool) *Middleware

func (*Middleware) ServeHTTP

func (mw *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

ServeHTTP is the middleware handler

Jump to

Keyboard shortcuts

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