增加执行系统命令的文档
This commit is contained in:
42
cmd/define.go
Normal file
42
cmd/define.go
Normal file
@ -0,0 +1,42 @@
|
||||
// Package cmd...
|
||||
//
|
||||
// Description : cmd...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-11-12 2:18 下午
|
||||
package cmd
|
||||
|
||||
// Config 配置
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2:19 下午 2021/11/12
|
||||
type Config struct {
|
||||
WorkDir string `json:"work_dir"` // 工作目录
|
||||
Command string `json:"command"` // 指令
|
||||
Script string `json:"script"` // 脚本
|
||||
ParameterList []Parameter `json:"parameter_list"` // 参数列表
|
||||
}
|
||||
|
||||
// Parameter ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2:21 下午 2021/11/12
|
||||
type Parameter struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// Result ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 4:25 下午 2021/11/12
|
||||
type Result struct {
|
||||
WorkDir string `json:"work_dir"`
|
||||
Err error `json:"err"`
|
||||
Output []byte `json:"output"`
|
||||
ExecuteCommand string `json:"execute_command"`
|
||||
}
|
Reference in New Issue
Block a user