plugin

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtensionTypes = []string{
	"none", "internal", "native", "portable", "service", "wasm", "js",
}
View Source
var PluginTypeMap = map[string]PluginType{
	"sources":   SOURCE,
	"sinks":     SINK,
	"functions": FUNCTION,
	"portable":  PORTABLE,
}
View Source
var PluginTypes = []string{"sources", "sinks", "functions", "portable"}

Functions

This section is empty.

Types

type EXTENSION_TYPE

type EXTENSION_TYPE int
const (
	NONE_EXTENSION EXTENSION_TYPE = iota
	INTERNAL
	NATIVE_EXTENSION
	PORTABLE_EXTENSION
	SERVICE_EXTENSION
	JS_EXTENSION
)

type FuncPlugin

type FuncPlugin struct {
	IOPlugin
	// Optional, if not specified, a default element with the same name of the file will be registered
	Functions []string `json:"functions"`
}

func (*FuncPlugin) GetSymbols

func (fp *FuncPlugin) GetSymbols() []string

type IOPlugin

type IOPlugin struct {
	Name       string   `json:"name" yaml:"name"`
	File       string   `json:"file" yaml:"file"`
	ShellParas []string `json:"shellParas,omitempty" yaml:"shellParas,omitempty"`
}

IOPlugin Unify model. Flat all properties for each kind.

func (*IOPlugin) GetFile

func (p *IOPlugin) GetFile() string

func (*IOPlugin) GetInstallScripts

func (p *IOPlugin) GetInstallScripts() []byte

func (*IOPlugin) GetName

func (p *IOPlugin) GetName() string

func (*IOPlugin) GetShellParas

func (p *IOPlugin) GetShellParas() []string

func (*IOPlugin) GetSymbols

func (p *IOPlugin) GetSymbols() []string

func (*IOPlugin) SetName

func (p *IOPlugin) SetName(n string)

type Plugin

type Plugin interface {
	GetName() string
	GetFile() string
	GetShellParas() []string
	GetSymbols() []string
	SetName(n string)
	GetInstallScripts() []byte
}

func NewPluginByType

func NewPluginByType(t PluginType) Plugin

type PluginType

type PluginType int
const (
	SOURCE PluginType = iota
	SINK
	FUNCTION
	PORTABLE
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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