Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentController ¶
type AgentController struct {
// contains filtered or unexported fields
}
AgentController Agent相关
func (*AgentController) NeedCheckLogin ¶
func (b *AgentController) NeedCheckLogin() bool
func (*AgentController) Offline ¶
func (a *AgentController) Offline()
Offline Agent 下线通知 @Param ip body string true "待下线Agent的IP" @router /agent/offline [post]
func (*AgentController) SayHello ¶
func (a *AgentController) SayHello()
SayHello Agent主动跟Server招呼 @router /agent/sayhello [post]
func (*AgentController) UnmarshalBody ¶
func (b *AgentController) UnmarshalBody(value interface{}) error
UnmarshalBody 将请求数据解析为对象. 如果请求包为JSON格式数据则使用ffjson包解析对象,否则使用ParseForm解析,并返回错误信息.
type CmdController ¶
type CmdController struct {
// contains filtered or unexported fields
}
CmdController 消息处理
func (*CmdController) NeedCheckLogin ¶
func (b *CmdController) NeedCheckLogin() bool
func (*CmdController) SaveNew ¶
func (c *CmdController) SaveNew()
SaveNew 保存新的命令信息.
@router /cmd/new [post]
func (*CmdController) UnmarshalBody ¶
func (b *CmdController) UnmarshalBody(value interface{}) error
UnmarshalBody 将请求数据解析为对象. 如果请求包为JSON格式数据则使用ffjson包解析对象,否则使用ParseForm解析,并返回错误信息.
type MsgController ¶
type MsgController struct {
// contains filtered or unexported fields
}
MsgController 消息处理
func (*MsgController) NeedCheckLogin ¶
func (b *MsgController) NeedCheckLogin() bool
func (*MsgController) ReceiveMsg ¶
func (m *MsgController) ReceiveMsg()
ReceiveMsg 接收消息,目前支持的消息类型有:1:命令处理进度-command @router /msg/:msgType:string [post]
func (*MsgController) UnmarshalBody ¶
func (b *MsgController) UnmarshalBody(value interface{}) error
UnmarshalBody 将请求数据解析为对象. 如果请求包为JSON格式数据则使用ffjson包解析对象,否则使用ParseForm解析,并返回错误信息.
type OptCheckController ¶
type OptCheckController struct {
// contains filtered or unexported fields
}
OptCheckController 三班日常操作检查控制
func (*OptCheckController) GetCheckItems ¶
func (o *OptCheckController) GetCheckItems()
GetCheckItems 获取检查项列表 @router /optcheck/list/ [get]
func (*OptCheckController) NeedCheckLogin ¶
func (b *OptCheckController) NeedCheckLogin() bool
func (*OptCheckController) RunCheck ¶
func (o *OptCheckController) RunCheck()
RunCheck 执行检查 @router /optcheck/:checkItemID:string/run [post]
func (*OptCheckController) UnmarshalBody ¶
func (b *OptCheckController) UnmarshalBody(value interface{}) error
UnmarshalBody 将请求数据解析为对象. 如果请求包为JSON格式数据则使用ffjson包解析对象,否则使用ParseForm解析,并返回错误信息.
type SystemController ¶
type SystemController struct {
// contains filtered or unexported fields
}
SystemController 系统相关
func (*SystemController) NeedCheckLogin ¶
func (b *SystemController) NeedCheckLogin() bool
func (*SystemController) Ping ¶
func (s *SystemController) Ping()
Ping 获取服务器状态 @router /sys/ping [get]
func (*SystemController) UnmarshalBody ¶
func (b *SystemController) UnmarshalBody(value interface{}) error
UnmarshalBody 将请求数据解析为对象. 如果请求包为JSON格式数据则使用ffjson包解析对象,否则使用ParseForm解析,并返回错误信息.
type TaskController ¶
type TaskController struct {
// contains filtered or unexported fields
}
TaskController Task相关
func (*TaskController) NeedCheckLogin ¶
func (b *TaskController) NeedCheckLogin() bool
func (*TaskController) NewTask ¶
func (t *TaskController) NewTask()
NewTask 创建新的Task任务。 Task信息需要正常,如何新建任务成功将返回任务ID,否则返回错误信息。
@router /task/new [post]
func (*TaskController) Start ¶
func (t *TaskController) Start()
Start 执行指定任务,并返回任务推送结果。 启动任务前需要保证任务信息存在,且执行命令的服务器Agent也在线。
@router /task/start [post]
func (*TaskController) UnmarshalBody ¶
func (b *TaskController) UnmarshalBody(value interface{}) error
UnmarshalBody 将请求数据解析为对象. 如果请求包为JSON格式数据则使用ffjson包解析对象,否则使用ParseForm解析,并返回错误信息.