2021-05-08 18:00:33 +08:00
|
|
|
package form
|
|
|
|
|
|
|
|
|
|
type MachineForm struct {
|
2023-03-06 16:59:57 +08:00
|
|
|
Id uint64 `json:"id"`
|
|
|
|
|
Name string `json:"name" binding:"required"`
|
|
|
|
|
Ip string `json:"ip" binding:"required"` // IP地址
|
|
|
|
|
Port int `json:"port" binding:"required"` // 端口号
|
|
|
|
|
|
|
|
|
|
// 资产授权凭证信息列表
|
|
|
|
|
AuthCertId int `json:"authCertId"`
|
|
|
|
|
TagId uint64 `json:"tagId"`
|
|
|
|
|
TagPath string `json:"tagPath" binding:"required"`
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
|
2022-07-23 16:41:04 +08:00
|
|
|
Remark string `json:"remark"`
|
2023-03-06 16:59:57 +08:00
|
|
|
SshTunnelMachineId int `json:"sshTunnelMachineId"` // ssh隧道机器id
|
2022-08-29 21:43:24 +08:00
|
|
|
EnableRecorder int8 `json:"enableRecorder"` // 是否启用终端回放记录
|
2021-05-08 18:00:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MachineRunForm struct {
|
2021-07-28 18:03:19 +08:00
|
|
|
MachineId int64 `binding:"required"`
|
|
|
|
|
Cmd string `binding:"required"`
|
2021-05-08 18:00:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MachineFileForm struct {
|
|
|
|
|
Id uint64
|
2021-07-28 18:03:19 +08:00
|
|
|
Name string `binding:"required"`
|
|
|
|
|
MachineId uint64 `binding:"required"`
|
|
|
|
|
Type int `binding:"required"`
|
|
|
|
|
Path string `binding:"required"`
|
2021-05-08 18:00:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MachineScriptForm struct {
|
|
|
|
|
Id uint64
|
2021-07-28 18:03:19 +08:00
|
|
|
Name string `binding:"required"`
|
|
|
|
|
MachineId uint64 `binding:"required"`
|
|
|
|
|
Type int `binding:"required"`
|
|
|
|
|
Description string `binding:"required"`
|
|
|
|
|
Params string
|
|
|
|
|
Script string `binding:"required"`
|
2021-05-08 18:00:33 +08:00
|
|
|
}
|
|
|
|
|
|
2022-07-04 20:21:24 +08:00
|
|
|
type MachineCreateFileForm struct {
|
|
|
|
|
Path string `binding:"required"`
|
|
|
|
|
Type string `binding:"required"`
|
2021-05-08 18:00:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MachineFileUpdateForm struct {
|
2021-07-28 18:03:19 +08:00
|
|
|
Content string `binding:"required"`
|
|
|
|
|
Id uint64 `binding:"required"`
|
|
|
|
|
Path string `binding:"required"`
|
2021-05-08 18:00:33 +08:00
|
|
|
}
|
2023-03-06 16:59:57 +08:00
|
|
|
|
|
|
|
|
// 授权凭证
|
|
|
|
|
type AuthCertForm struct {
|
|
|
|
|
Id uint64 `json:"id"`
|
|
|
|
|
Name string `json:"name" binding:"required"`
|
|
|
|
|
AuthMethod int8 `json:"authMethod" binding:"required"` // 1.密码 2.秘钥
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"` // 密码or私钥
|
|
|
|
|
Passphrase string `json:"passphrase"` // 私钥口令
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 资产授权凭证信息
|
|
|
|
|
type AssetAuthCertForm struct {
|
|
|
|
|
AuthCertId uint64 `json:"authCertId"`
|
|
|
|
|
TagId uint64 `json:"tagId"`
|
|
|
|
|
TagPath string `json:"tagPath" binding:"required"`
|
|
|
|
|
}
|