formatter

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: AGPL-3.0 Imports: 13 Imported by: 5

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
y or Y : Canonical URL