plugin

package
v0.0.0-...-e686d8b Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentTrim

func ContentTrim(contentType, content string) string

func GenerateContentSubContent

func GenerateContentSubContent(content string) string

func RegisterPlugin

func RegisterPlugin(plugin ChainPlugin)

Types

type ChainPlugin

type ChainPlugin interface {
	Name() string
	Run(ctx context.Context, doc *doc.Document) error
}

type ChainRegistry

type ChainRegistry struct {
	Chains map[string]ChainPlugin
}
var (
	DefaultRegisterer *ChainRegistry = defaultRegistry
)

func NewRegistry

func NewRegistry() *ChainRegistry

func (*ChainRegistry) Get

func (c *ChainRegistry) Get(name string) ChainPlugin

func (*ChainRegistry) Register

func (c *ChainRegistry) Register(plugin ChainPlugin)

type DocProcessPlugin

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

func NewDocProcessPlugin

func NewDocProcessPlugin() *DocProcessPlugin

func (*DocProcessPlugin) Name

func (s *DocProcessPlugin) Name() string

func (*DocProcessPlugin) Run

func (s *DocProcessPlugin) Run(ctx context.Context, doc *doc.Document) error

type HeaderImgPlugin

type HeaderImgPlugin struct {
}

func (*HeaderImgPlugin) Name

func (h *HeaderImgPlugin) Name() string

func (*HeaderImgPlugin) Run

func (h *HeaderImgPlugin) Run(ctx context.Context, doc *doc.Document) error

type SubContentPlugin

type SubContentPlugin struct {
}

func (*SubContentPlugin) Name

func (s *SubContentPlugin) Name() string

func (*SubContentPlugin) Run

func (s *SubContentPlugin) Run(ctx context.Context, doc *doc.Document) error

Jump to

Keyboard shortcuts

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