plugin

package
v1.4.0-beta.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PluginTypeMap = map[string]PluginType{
	"sources":   SOURCE,
	"sinks":     SINK,
	"functions": FUNCTION,
	"portable":  PORTABLE,
	"wasm":      WASM,
}
View Source
var PluginTypes = []string{"sources", "sinks", "functions", "portable", "wasm"}

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
	WASM_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"`
	File       string   `json:"file"`
	ShellParas []string `json:"shellParas"`
}

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
	WASM
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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