Skip to content

Commit 07e1217

Browse files
committed
add rolelc json tag
1 parent 99613ee commit 07e1217

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

roles/interface.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ type Hook struct {
4444

4545
// Role生命周期 公共父类
4646
type RoleLC struct {
47-
name string // 名称
48-
types string
47+
name string `json:"name"` // 名称
48+
types string `json:"types"`
4949
// 通用字段
50-
stage string
51-
remote_user string // 执行用户
52-
remote_pwd string // 执行用户密码(非必须)
53-
remote_port int // ssh端口
54-
vars map[string]interface{} // 环境变量
55-
host string // 执行的目标机
56-
starttime time.Time // 计算执行时间之开始时间
57-
hook *Hook
50+
stage string `json:"stage"`
51+
remote_user string `json:"remote_user"` // 执行用户
52+
remote_pwd string `json:"remote_pwd"` // 执行用户密码(非必须)
53+
remote_port int `json:"remote_port"` // ssh端口
54+
vars map[string]interface{} `json:"vars"` // 环境变量
55+
host string `json:"host"` // 执行的目标机
56+
starttime time.Time `json:"starttime"` // 计算执行时间之开始时间
57+
hook *Hook `json:"hook"`
5858
// 上下文
59-
msg *Message
60-
logs map[string]string // 命令执行日志
61-
terminial bool // ssh 是否交互式执行
62-
args *RoleArgs
59+
msg *Message `json:"msg"`
60+
logs map[string]string `json:"logs"` // 命令执行日志
61+
terminial bool `json:"terminial"` // ssh 是否交互式执行
62+
args *RoleArgs `json:"args"`
6363
}
6464

6565
// common 公共初始化函数

0 commit comments

Comments
 (0)