plugin

package
v0.0.0-...-6bb069b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BUILD_PLUGIN = 2
View Source
var DOCKERFILE_PLUGIN = 1

Functions

This section is empty.

Types

type PluginPipeline

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

* 由多个插件按照顺序构建而成的pipeline。前一个插件处理完任务后,将结果交给下一个 插件继续执行。。

func BuildPluginPipeline

func BuildPluginPipeline(projectName string, pipelineName string, pipelineDescription string) *PluginPipeline

func BuildPluginPipelineWithPlugins

func BuildPluginPipelineWithPlugins(projectName string, pipelineName string, pipelineDescription string, plugs []*PluginWrapper) *PluginPipeline

func (*PluginPipeline) AddPluginToHead

func (pp *PluginPipeline) AddPluginToHead(plugin *PluginWrapper)

func (*PluginPipeline) AddPluginToTail

func (pp *PluginPipeline) AddPluginToTail(plugin *PluginWrapper)

func (*PluginPipeline) ClearAllConfig

func (pp *PluginPipeline) ClearAllConfig(relativeConfigFolder string)

func (*PluginPipeline) GetPipelineDescription

func (pp *PluginPipeline) GetPipelineDescription() string

func (*PluginPipeline) GetPipelineName

func (pp *PluginPipeline) GetPipelineName() string

func (*PluginPipeline) GetPlugin

func (pp *PluginPipeline) GetPlugin(pluginName string) *PluginWrapper

func (*PluginPipeline) GetProjectName

func (pp *PluginPipeline) GetProjectName() string

func (*PluginPipeline) Handle

func (pp *PluginPipeline) Handle(project string, input interface{}) (error, interface{})

func (*PluginPipeline) InsertPlugin

func (pp *PluginPipeline) InsertPlugin(plugin *PluginWrapper, i int)

func (*PluginPipeline) PluginList

func (pp *PluginPipeline) PluginList() string

func (*PluginPipeline) SetPipelineName

func (pp *PluginPipeline) SetPipelineName(pipelineName string)

func (*PluginPipeline) SetProjectName

func (pp *PluginPipeline) SetProjectName(projectName string)

func (*PluginPipeline) View

type PluginPipelineView

type PluginPipelineView struct {
	ViewName    string
	PluginViews []PluginView
}

* pipeline对应的视图

type PluginView

type PluginView struct {
	PluginName string
	View       string
}

* 插件视图。

type PluginWrapper

type PluginWrapper struct {
	// 在pipeline中的位置信息
	IndexInPipeline int `json:"indexInPipeline"`
	// 插件类型
	Plugin_type int `json:"plugin_type"`
	// 插件名称
	Plugin_name string `json:"plugin_name"`
	// 插件目录
	Plugin_directory string `json:"plugin_directory"`
	// 插件
	Plugin *pingo.Plugin `json:"plugin"`
	// 该插件的配置信息,所属项目不同配置信息不同。
	Config map[string]interface{} `json:"config"`
}

* * 对现有插件Plugin的扩展

func BuildPluginWrapper

func BuildPluginWrapper(pluginName string, pluginDirectory string) *PluginWrapper

func CopyPluginWrapper

func CopyPluginWrapper(plugin *PluginWrapper) *PluginWrapper

func FindPlugByName

func FindPlugByName(dstName string, plugins *util.ConcurrentMap) *PluginWrapper

*

  • find plug by name

func (*PluginWrapper) Process

func (pw *PluginWrapper) Process(project string, input interface{}) (error, interface{})

func (*PluginWrapper) Save

func (pw *PluginWrapper) Save(projectName string, config map[string]interface{}) string

func (*PluginWrapper) View

func (pw *PluginWrapper) View() string

Jump to

Keyboard shortcuts

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