publisher

package
v0.0.0-...-7690095 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultViewPath = "views/"

Variables

This section is empty.

Functions

func FreePublisher

func FreePublisher(t CTemplate)

Types

type CTemplate

type CTemplate interface {
	Execute(wr io.Writer, data interface{}) error
	ExecuteTemplate(wr io.Writer, name string, data interface{}) error
	Name() string
}

type Publisher

type Publisher interface {
	Publish(wr io.Writer, name string, data interface{}) error
}

type Renderer

type Renderer func(name string, data interface{}) ([]byte, error)

type SunnyPublisher

type SunnyPublisher struct {
	// contains filtered or unexported fields
}

func NewSunnyPublisher

func NewSunnyPublisher(p string) *SunnyPublisher

func (*SunnyPublisher) AddRenderer

func (p *SunnyPublisher) AddRenderer(ext string, renderer Renderer)

if template can't be found and there exists a publisher for the specific ext, the publisher will be used to render and publish the content

func (*SunnyPublisher) Publish

func (p *SunnyPublisher) Publish(wr io.Writer, name string, data interface{})

Jump to

Keyboard shortcuts

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