dvprocessors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializePostProcessors

func InitializePostProcessors(processorConfigs []ProcessorConfig) (blocks []dvmeta.ProcessorBlock)

func InitializeProcessors

func InitializeProcessors(processorConfigs []ProcessorConfig) (blocks []dvmeta.ProcessorBlock)

func MakeComplexReplacement

func MakeComplexReplacement(src []byte, k string, neue string) []byte

func MakePostProcessorGlobalInitialization

func MakePostProcessorGlobalInitialization(processorInits map[string]map[string]string)

func MakeProcessorGlobalInitialization

func MakeProcessorGlobalInitialization(processorInits map[string]map[string]string)

func MakeSimpleReplacement

func MakeSimpleReplacement(src []byte, old []byte, neue []byte) []byte

func MoveInTextByMoveKind

func MoveInTextByMoveKind(src []byte, lim int, pos int, posLast int, points int, kind int, where int) int

func MoveLinesInText

func MoveLinesInText(src []byte, lim int, pos int, lines int, dir int) int

func MoveWordsInText

func MoveWordsInText(src []byte, lim int, pos int, words int, dir int) int

func RegisterPostProcessor

func RegisterPostProcessor(config *RegistrationConfig, silent bool) bool

func RegisterProcessor

func RegisterProcessor(config *RegistrationConfig, silent bool) bool

func ReplacerHandler

func ReplacerHandler(request *dvmeta.RequestContext) bool

func SearchTextBySearchKind

func SearchTextBySearchKind(src []byte, startLimit int, endLimit int, search []byte, dir int, options *replacerOptions) (start int, end int, ok bool)

Types

type ProcessorConfig

type ProcessorConfig struct {
	Name   string   `json:"name"`
	Urls   string   `json:"urls"`
	Params []string `json:"params"`
}

type ProcessorGlobalInitHandler

type ProcessorGlobalInitHandler func(map[string]string) error

type ProcessorServerInitHandler

type ProcessorServerInitHandler func(params []string) (map[string]string, error)

type RegistrationConfig

type RegistrationConfig struct {
	Name              string
	EndPointHandler   dvmeta.ProcessorEndPointHandler
	GlobalInitHandler ProcessorGlobalInitHandler
	ServerInitHandler ProcessorServerInitHandler
}

func GetRegisteredConfig

func GetRegisteredConfig(name string, silent bool) *RegistrationConfig

func GetRegisteredConfigForPost

func GetRegisteredConfigForPost(name string, silent bool) *RegistrationConfig

Jump to

Keyboard shortcuts

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