processors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontMatter

type FrontMatter struct{}

FrontMatter is a processor implementation responsible to inject front-matter properties defined on nodes

func (*FrontMatter) Process

func (f *FrontMatter) Process(documentBlob []byte, node *api.Node) ([]byte, error)

Process implements Processor#Process

type Processor

type Processor interface {
	Process(documentBlob []byte, node *api.Node) ([]byte, error)
}

Processor is used by extensions to transform a document

type ProcessorChain

type ProcessorChain struct {
	Processors []Processor
}

ProcessorChain is a registry of ordered document processors that implements Processor#Process

func (*ProcessorChain) Process

func (p *ProcessorChain) Process(documentBlob []byte, node *api.Node) ([]byte, error)

Process implements Processor#Process invoking the registered chain of Processors sequentially

Jump to

Keyboard shortcuts

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