prerender

package module
v0.0.0-...-8149325 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2014 License: MIT Imports: 7 Imported by: 0

README

prerender

GoDoc

func main() {
  http.ListenAndServe(":3000", prerender.Handler(app))
}

Documentation

Overview

Package prerender integrates prerender.io with net/http.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(app http.Handler, options ...Option) http.Handler

Handler returns a new prerender handler. app must be your HTTP app.

Types

type Option

type Option func(*handler)

func Bots

func Bots(userAgents []string) Option

Bots replaces the default list of bot User-Agents with a custom list.

func IgnoredExtensions

func IgnoredExtensions(exts []string) Option

IgnoredExtensions replaces the default list of ignored extentions with a custom list.

func Logger

func Logger(logger *log.Logger) Option

Logger sets a logger.

func ServiceAuth

func ServiceAuth(username, password string) Option

ServiceAuth sets the prerender username and password.

func ServiceToken

func ServiceToken(token string) Option

ServiceToken sets the prerender service token.

func ServiceURL

func ServiceURL(url string) Option

ServiceURL sets the prerender service url.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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