content

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: Apache-2.0 Imports: 16 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Router    *router.Module
	DB        *db.Module
	Logger    *logger.Module
	Templates *templates.Module
	Files     *files.Module
	// contains filtered or unexported fields
}

Module server/content is responsible for serving published content

func (*Module) CreateContentMap

func (m *Module) CreateContentMap(page *models.Page) (contentMap, error)

func (*Module) Init

func (m *Module) Init(c *service.Config)

Init implements service.Init

func (*Module) ReloadRouter

func (m *Module) ReloadRouter() error

ReloadRouter recreates the router to add/remove routes that have change and replaces the existing router.

func (*Module) ServeHTTP

func (m *Module) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP is a layer of indirection to allow us to replace the router at runtime.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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