Documentation ¶
Index ¶
- func AddTags(c *gin.Context)
- func AddTagsByFilter(c *gin.Context)
- func BulkNewAsset(c *gin.Context)
- func CheckPassword(c *gin.Context)
- func ControlAgentTask(c *gin.Context)
- func ControlAgentTaskByNum(c *gin.Context)
- func CreateConfTask(c *gin.Context)
- func CreateCtrlTask(c *gin.Context)
- func CreateDelConfTask(c *gin.Context)
- func CreateTaskTask(c *gin.Context)
- func CreateUserV6(c *gin.Context)
- func DelUser(c *gin.Context)
- func GetConfigByID(c *gin.Context)
- func GetDefaultConfig(c *gin.Context)
- func GetJobByID(c *gin.Context)
- func GetStatus(c *gin.Context)
- func GetStatusByFilter(c *gin.Context)
- func GetStatusByID(c *gin.Context)
- func GetSubTaskByFilter(c *gin.Context)
- func GetSubTaskByID(c *gin.Context)
- func GetTags(c *gin.Context)
- func GetTagsByID(c *gin.Context)
- func GetTaskByFilter(c *gin.Context)
- func GetTaskByID(c *gin.Context)
- func NewAsset(c *gin.Context)
- func QueryInfo(c *gin.Context)
- func QuickTaskTask(c *gin.Context)
- func RemoveTags(c *gin.Context)
- func ResetPassword(c *gin.Context)
- func UpdateDefaultConfig(c *gin.Context)
- func UpdateSubTask(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func UserInfo(c *gin.Context)
- func UserLogin(c *gin.Context)
- func UserLoginout(c *gin.Context)
- type AgentDelRequest
- type AgentExtraInfoResp
- type AgentTaskControl
- type AuthRequest
- type LoadTagReq
- type TagRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTagsByFilter ¶
AddTagsByFilter add tags by filter. Example: (Post json is a common filter)
Post /addTags/filter?tag=test { "filter": [ { "key": "last_heartbeat_time", "rules": [ { "operator": "$gt", "value": 1614255379 } ], "condition": "$and" } ], "condition": "$and" }
which will add test to all agent_id.last_heartbeat_time > 1614255379
func BulkNewAsset ¶
func ControlAgentTask ¶
ControlAgentTask Post task to Agent:
if it is config, modify db at the same time. if it is task, write the task to db(subtask) for reconciliation.
func ControlAgentTaskByNum ¶
ControlAgentTaskByNum 按照机器数量控制任务
func CreateConfTask ¶
func CreateCtrlTask ¶
func CreateDelConfTask ¶
func CreateTaskTask ¶
func GetConfigByID ¶
GetConfigByID return agent config by agent_id.
func GetDefaultConfig ¶
GetDefaultConfig get default agent config
func GetStatusByFilter ¶
GetStatusByFilter get agent status by filter Example: (Post json is a common filter)
Post /getStatus/filter?page=1&page_size=100 { "filter": [ { "key": "last_heartbeat_time", "rules": [ { "operator": "$gt", "value": 1614255379 } ], "condition": "$and" } ], "condition": "$and" }
which will return agents'status which match agent_id.last_heartbeat_time > 1614255379
func GetStatusByID ¶
GetStatusByID get agent status by agent_id GET GetStatusByID/xxxxxxxx
func GetSubTaskByFilter ¶
func GetSubTaskByID ¶
func GetTaskByFilter ¶
func UpdateDefaultConfig ¶
UpdateDefaultConfig update default agent config
func UserLoginout ¶
Types ¶
type AgentDelRequest ¶
type AgentExtraInfoResp ¶
type AgentTaskControl ¶
type AgentTaskControl struct { TaskID string `json:"task_id" binding:"required" bson:"task_id"` Action string `json:"action" binding:"required" bson:"action"` RollingPercent float64 `json:"rolling_percent" binding:"required" bson:"rolling_percent"` Concurrence int `json:"concurrence" binding:"required" bson:"concurrence"` }
type AuthRequest ¶
type LoadTagReq ¶
type LoadTagReq struct {
IDList []string `json:"id_list" binding:"required"`
}
Click to show internal directories.
Click to hide internal directories.