plugin

package
v0.0.0-...-8505860 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSPlugin

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

func NewDSPlugin

func NewDSPlugin(options ...PluginOption) *DSPlugin

func (*DSPlugin) WriteFetchOutput

func (plugin *DSPlugin) WriteFetchOutput(results chan map[string]any, errCh chan error) error

json encodes results and prints to plugin writer.

type Fetcher

type Fetcher interface {
	Fetch(ctx context.Context, outputWriter io.Writer, errorWriter common.ErrorWriter) error
}

type Plugin

type Plugin interface {
	Fetcher
	Transformer
	Verifier
}

type PluginOption

type PluginOption func(*DSPlugin)

func WithErrorWriter

func WithErrorWriter(writer io.Writer) PluginOption

func WithOutputWriter

func WithOutputWriter(writer io.Writer) PluginOption

func WithTemplate

func WithTemplate(templateContent []byte) PluginOption

type Publisher

type Publisher interface {
	Publish(ctx context.Context, reader io.Reader) error
}

type Transformer

type Transformer interface {
	Transform(ctx context.Context, reader io.Reader, outputWriter, errorWriter io.Writer) error
}

type Verifier

type Verifier interface {
	Verify(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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