templates

package
v2.0.0-beta6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: Apache-2.0 Imports: 15 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Templates

type Templates struct {
	IncludeRoot string   `json:"include_root,omitempty"`
	MIMETypes   []string `json:"mime_types,omitempty"`
	Delimiters  []string `json:"delimiters,omitempty"`
}

Templates is a middleware which execute response bodies as templates.

func (Templates) CaddyModule

func (Templates) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Templates) Provision

func (t *Templates) Provision(ctx caddy.Context) error

Provision provisions t.

func (*Templates) ServeHTTP

func (t *Templates) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

func (*Templates) Validate

func (t *Templates) Validate() error

Validate ensures t has a valid configuration.

Jump to

Keyboard shortcuts

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