Documentation
¶
Index ¶
- Constants
- type BaseStep
- func (bs *BaseStep) Create() Step
- func (bs *BaseStep) Desc() string
- func (bs *BaseStep) Exec(*transport.Session) ([]byte, error)
- func (bs *BaseStep) GetSchema(instance Step) (interface{}, error)
- func (bs *BaseStep) ID() string
- func (bs *BaseStep) Name() string
- func (bs *BaseStep) ParseCaches(instance Step) []string
- func (bs *BaseStep) SetID(id string)
- type FileUploadStep
- type JsonYamlReplaceStep
- func (bs *JsonYamlReplaceStep) Create() Step
- func (bs *JsonYamlReplaceStep) Desc() string
- func (bs *JsonYamlReplaceStep) Exec(session *transport.Session, sudo bool) ([]byte, error)
- func (bs *JsonYamlReplaceStep) GetSchema(instance Step) (interface{}, error)
- func (bs *JsonYamlReplaceStep) Name() string
- type MultiFileUploadStep
- type PluginStep
- func (bs *PluginStep) Create() Step
- func (bs *PluginStep) Desc() string
- func (bs *PluginStep) Exec(session *transport.Session, sudo bool) ([]byte, error)
- func (bs *PluginStep) GetSchema(instance Step) (interface{}, error)
- func (bs *PluginStep) MarshalJSON() ([]byte, error)
- func (bs *PluginStep) Name() string
- func (bs *PluginStep) UnmarshalJSON(data []byte) error
- type RunCmdStep
- type RunShellStep
- type Step
- type ZipFileStep
Constants ¶
View Source
const ( StepNameCMD = "cmd" StepNameShell = "shell" StepNameFile = "file" StepMultiNameFile = "multi_file" StepNameZipFile = "zip" StepNameYamlJson = "json_yaml" GUIDLength = 36 CMDName = "name" CMDDesc = "desc" CMDScheme = "schema" CMDCommand = "exec" ParamClient = "--client" ParamParams = "--params" GOOSWindows = "windows" DefaultFileFs = fs.FileMode(0644) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseStep ¶
type BaseStep struct {
// contains filtered or unexported fields
}
func (*BaseStep) ParseCaches ¶
type FileUploadStep ¶
type FileUploadStep struct {
BaseStep
File string `json:"file" jsonschema:"format=data-url"`
Options string `` /* 153-byte string literal not displayed */
Remote string `json:"remote" jsonschema:"required=true" jsonschema_description:"远程文件路径"`
}
FileUploadStep 上传文件
func (*FileUploadStep) Create ¶
func (bs *FileUploadStep) Create() Step
func (*FileUploadStep) Desc ¶
func (bs *FileUploadStep) Desc() string
func (*FileUploadStep) Name ¶
func (bs *FileUploadStep) Name() string
type JsonYamlReplaceStep ¶
type JsonYamlReplaceStep struct {
BaseStep
Path string `json:"path" jsonschema:"required=true" jsonschema_description:"例如: $.path1.path2[0].item"`
Value interface{} `` /* 149-byte string literal not displayed */
Remote string `json:"remote" jsonschema:"required=true" jsonschema_description:"远程Yaml/Json路径(不支持大文件)"`
}
JsonYamlReplaceStep 上传多个文件
func (*JsonYamlReplaceStep) Create ¶
func (bs *JsonYamlReplaceStep) Create() Step
func (*JsonYamlReplaceStep) Desc ¶
func (bs *JsonYamlReplaceStep) Desc() string
func (*JsonYamlReplaceStep) GetSchema ¶
func (bs *JsonYamlReplaceStep) GetSchema(instance Step) (interface{}, error)
func (*JsonYamlReplaceStep) Name ¶
func (bs *JsonYamlReplaceStep) Name() string
type MultiFileUploadStep ¶
type MultiFileUploadStep struct {
BaseStep
Files []string `json:"files" jsonschema:"format=data-url,required=true"`
RemoteDir string `json:"remote_dir" jsonschema:"required=true" jsonschema_description:"远程文件夹路径"`
}
MultiFileUploadStep 上传多个文件
func (*MultiFileUploadStep) Create ¶
func (bs *MultiFileUploadStep) Create() Step
func (*MultiFileUploadStep) Desc ¶
func (bs *MultiFileUploadStep) Desc() string
func (*MultiFileUploadStep) Name ¶
func (bs *MultiFileUploadStep) Name() string
type PluginStep ¶
type PluginStep struct {
BaseStep
Data interface{}
ScriptPath string
// contains filtered or unexported fields
}
PluginStep 调用外部程序比如python或者go的脚本来获取输出 参数为连接的信息和插件模块的参数 插件需要提供Scheme 以供渲染表单
func (*PluginStep) Create ¶
func (bs *PluginStep) Create() Step
func (*PluginStep) Desc ¶
func (bs *PluginStep) Desc() string
func (*PluginStep) GetSchema ¶
func (bs *PluginStep) GetSchema(instance Step) (interface{}, error)
func (*PluginStep) MarshalJSON ¶
func (bs *PluginStep) MarshalJSON() ([]byte, error)
func (*PluginStep) Name ¶
func (bs *PluginStep) Name() string
func (*PluginStep) UnmarshalJSON ¶
func (bs *PluginStep) UnmarshalJSON(data []byte) error
type RunCmdStep ¶
RunCmdStep 执行cmd
func (*RunCmdStep) Create ¶
func (bs *RunCmdStep) Create() Step
func (*RunCmdStep) Desc ¶
func (bs *RunCmdStep) Desc() string
func (*RunCmdStep) Name ¶
func (bs *RunCmdStep) Name() string
type RunShellStep ¶
RunShellStep 执行shell
func (*RunShellStep) Create ¶
func (bs *RunShellStep) Create() Step
func (*RunShellStep) Desc ¶
func (bs *RunShellStep) Desc() string
func (*RunShellStep) Name ¶
func (bs *RunShellStep) Name() string
type ZipFileStep ¶
type ZipFileStep struct {
BaseStep
File string `json:"file" jsonschema:"format=data-url" jsonschema_description:"*.tar | *.tar.gz | *.zip"`
Remote string `json:"remote" jsonschema:"required=true" jsonschema_description:"解压到远端文件夹"`
}
ZipFileStep 上传多个文件
func (*ZipFileStep) Create ¶
func (bs *ZipFileStep) Create() Step
func (*ZipFileStep) Desc ¶
func (bs *ZipFileStep) Desc() string
func (*ZipFileStep) Name ¶
func (bs *ZipFileStep) Name() string
Click to show internal directories.
Click to hide internal directories.