formatter

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2017 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseFormatter

type ResponseFormatter interface {
	Format(writer io.Writer, data []byte) error
	Title() string
	Searchable() bool
	Search(string, []byte) ([]string, error)
}

func New

func New(appConfig *config.Config, contentType string) ResponseFormatter

type TextFormatter added in v0.4.0

type TextFormatter struct {
}

func (*TextFormatter) Format added in v0.4.0

func (f *TextFormatter) Format(writer io.Writer, data []byte) error

func (*TextFormatter) Search added in v0.4.0

func (f *TextFormatter) Search(q string, body []byte) ([]string, error)

func (*TextFormatter) Searchable added in v0.4.0

func (f *TextFormatter) Searchable() bool

func (*TextFormatter) Title added in v0.4.0

func (f *TextFormatter) Title() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL