Documentation ¶
Index ¶
- Constants
- Variables
- func FileProtocolDownload(url, filePath string) error
- type InstalledPlugins
- type ListRet
- type PluginManager
- func (pm *PluginManager) ExecutePlugin(file, pluginName, pluginId, params, separator, paramsV2, version string, ...) (exitCode int, err error)
- func (pm *PluginManager) List(pluginName string, local bool) error
- func (pm *PluginManager) ShowPluginStatus() error
- func (pm *PluginManager) VerifyPlugin(url, params, separator, paramsV2 string) (exitCode int, err error)
- type WinDir
Constants ¶
View Source
const ( // plugin type PLUGIN_ONCE = 0 PLUGIN_PERSIST = 1 //plugin status PERSIST_RUNNING = "PERSIST_RUNNING" PERSIST_FAIL = "PERSIST_FAIL" PERSIST_UNKNOWN = "PERSIST_UNKNOWN" ONCE_INSTALLED = "ONCE_INSTALLED" )
View Source
const ( SUCCESS = 0 CHECK_ENDPOINT_FAIL = 1000 + iota // check end point fail PACKAGE_NOT_FOUND // 插件包未找到 PACKAGE_FORMART_ERR // 插件包的格式错误,不是zip格式 UNZIP_ERR // 解压插件包时错误 UNMARSHAL_ERR // 解析json文件时错误(config.json) PLUGIN_FORMAT_ERR // 插件格式错误,如config.json或者插件可执行文件缺失,插件与当前系统平台不适配等 MD5_CHECK_FAIL // MD5校验失败 DOWNLOAD_FAIL // 下载失败 LOAD_INSTALLEDPLUGINS_ERR // 读取 installed_plugins文件错误 DUMP_INSTALLEDPLUGINS_ERR // 保存内容到 installed_plugins文件错误 GET_ONLINE_PACKAGE_INFO_ERR // 获取线上的插件包信息时错误 EXECUTABLE_PERMISSION_ERR // linux下赋予脚本可执行权限时错误 )
退出码
View Source
const ( CHECK_ENDPOINT_FAIL_STR = "CHECK_ENDPOINT_FAIL: " PACKAGE_NOT_FOUND_STR = "PACKAGE_NOT_FOUND: " // 插件包未找到 PACKAGE_FORMART_ERR_STR = "PACKAGE_FORMAT_ERR: " // 插件包的格式错误,不是zip格式 UNZIP_ERR_STR = "UNZIP_ERR: " // 解压插件包时错误 UNMARSHAL_ERR_STR = "UNMARSHAL_ERR: " // 解析json文件时错误(config.json) PLUGIN_FORMAT_ERR_STR = "PLUGIN_FORMAT_ERR: " // 插件格式错误,如config.json或者插件可执行文件缺失,插件与当前系统平台不适配等 MD5_CHECK_FAIL_STR = "MD5_CHECK_FAIL: " // MD5校验失败 DOWNLOAD_FAIL_STR = "DOWNLOAD_FAIL: " // 下载失败 LOAD_INSTALLEDPLUGINS_ERR_STR = "LOAD_INSTALLEDPLUGINS_ERR: " // 读取 installed_plugins文件错误 DUMP_INSTALLEDPLUGINS_ERR_STR = "DUMP_INSTALLEDPLUGINS_ERR: " // 保存内容到 installed_plugins文件错误 GET_ONLINE_PACKAGE_INFO_ERR_STR = "GET_ONLINE_PACKAGE_INFO_ERR: " // 获取线上的插件包信息时错误 EXECUTABLE_PERMISSION_ERR_STR = "EXECUTABLE_PERMISSION_ERR: " )
View Source
const Separator = string(filepath.Separator)
Variables ¶
View Source
var INSTALLEDPLUGINS string
View Source
var PLUGINDIR string
Functions ¶
func FileProtocolDownload ¶
Types ¶
type InstalledPlugins ¶
type InstalledPlugins struct {
PluginList []pluginInfo `json:"pluginList"`
}
type PluginManager ¶
func NewPluginManager ¶
func NewPluginManager(verbose bool) (*PluginManager, error)
func (*PluginManager) ExecutePlugin ¶
func (pm *PluginManager) ExecutePlugin(file, pluginName, pluginId, params, separator, paramsV2, version string, local bool) (exitCode int, err error)
func (*PluginManager) ShowPluginStatus ¶
func (pm *PluginManager) ShowPluginStatus() error
func (*PluginManager) VerifyPlugin ¶
func (pm *PluginManager) VerifyPlugin(url, params, separator, paramsV2 string) (exitCode int, err error)
Directories ¶
Path | Synopsis |
---|---|
thirdparty
|
|
json-iterator/go
Package jsoniter implements encoding and decoding of JSON as defined in RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json.
|
Package jsoniter implements encoding and decoding of JSON as defined in RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json. |
shlex
Package shlex implements a simple lexer which splits input in to tokens using shell-style rules for quoting and commenting.
|
Package shlex implements a simple lexer which splits input in to tokens using shell-style rules for quoting and commenting. |
table
Package table provides a convenient way to generate tabular output of any data, primarily useful for CLI tools.
|
Package table provides a convenient way to generate tabular output of any data, primarily useful for CLI tools. |
Click to show internal directories.
Click to hide internal directories.