Documentation ¶
Index ¶
- Variables
- type AlarmController
- type BaseController
- type BeforeUserController
- type EchartController
- type ExpController
- type GraphController
- type HistoryController
- type HostController
- type HostGroupsController
- type ImagesController
- type IndexController
- type ItemController
- type ManagerController
- type ProblemsController
- type Resp
- type TemplateController
- type TrendController
- type TriggersController
Constants ¶
This section is empty.
Variables ¶
var AlarmRes models.AlarmList
AlarmRes used
var AnalysisRes models.AnalysisList
AnalysisRes mod
var ApplicationRes models.ApplicationList
ApplicationRes str
var ExpRes models.ExpList
ExpRes is used var GroupRes models.GroupList var ExpRes list
var GraphRes models.GraphList
GraphRes restp
var HistoryRes models.HistoryList
HistoryRes is used
var HostGroupsRes models.HostGroupsList
HostGroupsRes is used
var HostRes models.HostList
HostRes restp
var InfoRes models.InfoRes
InfoRes resp
var ItemRes models.ItemList
ItemRes rep
var Manager = new(models.Manager)
Manager var
var ProblemsRes models.ProblemsRes
ProblemsRes resp
var Res = &Resp{}
Res var
var TemplateRes models.TemplateList
TemplateRes rest
var TrendRes models.TrendList
TrendRes resp
var TriggersRes models.TriggersRes
TriggersRes resp
var Tuser string
Tuser is userinfo
Functions ¶
This section is empty.
Types ¶
type AlarmController ¶
type AlarmController struct {
BaseController
}
AlarmController 历史告警消息接口
func (*AlarmController) Analysis ¶
func (c *AlarmController) Analysis()
Analysis ... @Title 告警分析接口 @Description 告警分析接口 @Param X-Token header string true "x-token in header" @Param body body models.ListAnalysisAlarm true "分析周期" @Success 200 {object} models.AnalysisRes @Failure 403 @router /analysis [post]
func (*AlarmController) Export ¶
func (c *AlarmController) Export()
Export export @Title 导出告警消息 @Description 根据查询的条件导出告警报表到xlsx文件 @Param X-Token header string true "x-token in header" @Param body body models.ListExportAlarm true "导出条件或周期"" @Success 200 {object} models.Group @Failure 403 is empty @router /export [post]
func (*AlarmController) GetAll ¶
func (c *AlarmController) GetAll()
GetAll ... @Title 查询或获取告警接口 @Description get Alarm @Param X-Token header string true "x-token in header" @Param begin query string false "开始日期 格式 2006-01-02 15:04:05" @Param end query string false "结束日期 格式 2006-01-02 15:04:05" @Param page query string false "第几页" @Param limit query string false "每页条数" @Param hosts query string false "查询主机名包含某字符的主机" @Success 200 {object} models.Alarm @Failure 403 @router / [get]
func (*AlarmController) GetOne ¶
func (c *AlarmController) GetOne()
GetOne ... @Title Get One @Description get Alarm by id @Param X-Token header string true "x-token in header" @Param id path string true "The key for staticblock" @Success 200 {object} models.Alarm @Failure 403 :id is empty @router /:id [get]
type BeforeUserController ¶
type BeforeUserController struct {
beego.Controller
}
BeforeUserController sd
func (*BeforeUserController) Login ¶
func (u *BeforeUserController) Login()
Login controller @Title Login @Description Logs user into the system @Param body body models.Userlogin true "body for user content" @Success 200 login success @Failure 403 user not exist @router /login [post]
func (*BeforeUserController) Logout ¶
func (u *BeforeUserController) Logout()
Logout controller @Title Logout @Description Logs out current logged in user session @Param body body models.Userlogin true "body for user content" @Success 200 {string} logout success @router /logout [post]
func (*BeforeUserController) Receive ¶
func (u *BeforeUserController) Receive()
Receive message controller @Title Recevie @Description Logs out current logged in user session @Param body body models.Userlogin true "body for user content" @Success 200 {string} logout success @router /receive [post]
func (*BeforeUserController) Webhook ¶
func (u *BeforeUserController) Webhook()
Webhook receive message controller @Title Recevie @Description Logs out current logged in user session @Param body body models.Userlogin true "body for user content" @Success 200 {string} logout success @router /webhook [post]
type EchartController ¶
type EchartController struct {
BaseController
}
func (*EchartController) GetHistory ¶
func (*EchartController) GetHistory()
GetHistory controller @Title Get One @Description get item by key @Param X-Token header string true "x-token in header" @Param item_id query string false "The key for item" @Param begin query string false "history type" @Param end query int false "The key for limit" @Success 200 {object} models.Item @Failure 403 :id is empty @router /history [get]
type ExpController ¶
type ExpController struct {
BaseController
}
ExpController operations for Group
func (*ExpController) GetItemHistory ¶
func (c *ExpController) GetItemHistory()
GetItemHistory export @Title 数据导出 @Description 根据ItemID导出详情数据为xlsx文件 @Param X-Token header string true "x-token in header" @Param body body models.ListQueryAll true "body for Host content" @Success 200 {object} models.Group @Failure 403 is empty @router /history [post]
func (*ExpController) GetItemTrend ¶
func (c *ExpController) GetItemTrend()
GetItemTrend export @Title Item趋势数据导出 @Description 根据ItemID导出趋势数据为xlsx文件 @Param X-Token header string true "x-token in header" @Param body body models.ListQueryAll true "body for Host content" @Success 200 {object} models.Group @Failure 403 is empty @router /trend [post]
func (*ExpController) Inspect ¶
func (c *ExpController) Inspect()
Inspect ITm @Title 巡检报告导出 @Description 按主机组导出巡检表 @Param X-Token header string true "x-token in header" @Param body body models.ListQueryNew true "body for Host content" @Success 200 {object} models.Group @Failure 403 is empty @router /inspect [post]
type GraphController ¶
type GraphController struct {
BaseController
}
GraphController operations for Host
func (*GraphController) Exp ¶
func (c *GraphController) Exp()
Exp get @Title 导主机组或主机图形为PDF @Description get graphs by hostid @Param X-Token header string true "x-token in header" @Param body body models.GraphExpQuery true "body for Host content" @Success 200 {object} models.GraphInfo @Failure 403 :id is empty @router /exp [post]
func (*GraphController) Post ¶
func (c *GraphController) Post()
Post t @Title 根据Hostid查看主机图形 @Description get graphs by hostid @Param X-Token header string true "x-token in header" @Param body body models.GraphListQuery true "body for Host content" @Success 200 {object} models.GraphInfo @Failure 403 :id is empty @router /:hostid [post]
type HistoryController ¶
type HistoryController struct {
BaseController
}
HistoryController operations for History
func (*HistoryController) GetHistoryByItemID ¶
func (c *HistoryController) GetHistoryByItemID()
GetHistoryByItemID controller @Title Get One @Description get item by key @Param X-Token header string true "x-token in header" @Param item_id query string true "The key for item" @Param history query string true "history type" @Param limit query int true "The key for limit" @Success 200 {object} models.Item @Failure 403 :id is empty @router / [get]
type HostController ¶
type HostController struct {
BaseController
}
HostController operations for Host
func (*HostController) GetAll ¶
func (c *HostController) GetAll()
GetAll ... @Title 获取所有主机 @Description get hosts @Param X-Token header string true "x-token in header" @Param page query string false "Sorted-by fields. e.g. col1,col2 ..." @Param limit query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param hosts query string false "主机列表" @Success 200 {object} models.Alarm @Failure 403 @router / [get]
func (*HostController) GetApplication ¶
func (c *HostController) GetApplication()
GetApplication str @Title 获取所有主机 @Description get hosts @Param X-Token header string true "x-token in header" @Param hostid path string ture "hostid" @Success 200 {object} models.Alarm @Failure 403 @router /application/:hostid [get]
func (*HostController) GetOne ¶
func (c *HostController) GetOne()
GetOne ... @Title Get One @Description get Alarm by id @Param X-Token header string true "x-token in header" @Param id path string true "The key for staticblock" @Success 200 {object} models.Alarm @Failure 403 :id is empty @router /:id [get]
func (*HostController) Post ¶
func (c *HostController) Post()
Post ... @Title Post @Description create Alarm @Param X-Token header string true "x-token in header" @Param body body models.Alarm true "body for Alarm content" @Success 201 {int} models.Alarm @Failure 403 body is empty @router / [post]
type HostGroupsController ¶
type HostGroupsController struct {
BaseController
}
HostGroupsController operations for History
func (*HostGroupsController) GetAll ¶
func (c *HostGroupsController) GetAll()
GetAll 获取主机组分页显示 @Title Get All groups @Description 获获取主机组分页显示 @Param X-Token header string true "x-token in header" @Param page query string false "Sorted-by fields. e.g. col1,col2 ..." @Param limit query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param groups query string false "Limit the size of result set. Must be an integer" @Success 200 {object} models.Alarm @Failure 403 @router / [get]
func (*HostGroupsController) GetHostByGroupID ¶
func (c *HostGroupsController) GetHostByGroupID()
GetHostByGroupID func @Title Get All Hosts @Description get hosts @Param X-Token header string true "x-token in header" @Param id path string true "The key for staticblock" @Success 200 {object} models.Alarm @Failure 403 @router /list/:id [get]
func (*HostGroupsController) GetList ¶
func (c *HostGroupsController) GetList()
GetList Gaa @Title Get All groups @Description get groups @Param X-Token header string true "x-token in header" @Success 200 {object} models.Alarm @Failure 403 @router /list [get]
func (*HostGroupsController) URLMapping ¶
func (c *HostGroupsController) URLMapping()
URLMapping ...
type ImagesController ¶
type ImagesController struct { // BaseController beego.Controller }
ImagesController operations for Host
func (*ImagesController) GetOne ¶
func (c *ImagesController) GetOne()
GetOne ... @Title Get One @Description get Alarm by id @Param X-Token header string true "x-token in header" @Param id path string true "The key for staticblock" @Success 200 {object} models.Alarm @Failure 403 :id is empty @router /:id [get]
type IndexController ¶
type IndexController struct {
beego.Controller
}
IndexController 首页数据获取
func (*IndexController) GetInfo ¶
func (c *IndexController) GetInfo()
GetInfo ... @Title 首页数据 @Description 基本信息获取 @Param X-Token header string true "x-token in header" @Success 200 {object} models.Manager @Failure 403 :id is empty @router / [get]
type ItemController ¶
type ItemController struct {
BaseController
}
ItemController operations for Item
func (*ItemController) GetAllItemByKey ¶
func (c *ItemController) GetAllItemByKey()
GetAllItemByKey controller @Title Get ALl item @Description get ALl item by key @Param X-Token header string true "x-token in header" @Param id path string true "The host for id" @Success 200 {object} models.Item @Failure 403 @router /list [post]
func (*ItemController) GetItemByKey ¶
func (c *ItemController) GetItemByKey()
GetItemByKey controller @Title Get One @Description get item by key @Param X-Token header string true "x-token in header" @Param host_id query string true "The key for item" @Param item_key query string true "The key for item" @Success 200 {object} models.Item @Failure 403 :id is empty @router / [get]
type ManagerController ¶
type ManagerController struct {
BaseController
}
ManagerController operations for Manager
func (*ManagerController) Chpwd ¶
func (c *ManagerController) Chpwd()
Chpwd for manager controller @Title Chpwd @Change Manager Password @Param X-Token header string true "x-token in header" @Param body body models.Chpwd true "body for Manager content" @Success 201 {int} models.Chpwd @Failure 403 body is empty @router /chpwd [post]
func (*ManagerController) GetOne ¶
func (c *ManagerController) GetOne()
GetOne ... @Title Get One @Description get Manager by id @Param X-Token header string true "x-token in header" @Param id path string true "The key for staticblock" @Success 200 {object} models.Manager @Failure 403 :id is empty @router /:id [get]
func (*ManagerController) Info ¶
func (c *ManagerController) Info()
Info for manager controller @Title Manager info @Description Logs Manaager into the system @Param X-Token header string true "x-token in header" @Param body body models.Token true "The Token" @Success 200 login success @Failure 403 manager not exist @router /info [post]
type ProblemsController ¶
type ProblemsController struct {
BaseController
}
ProblemsController funct
func (*ProblemsController) GetInfo ¶
func (c *ProblemsController) GetInfo()
GetInfo 获取未恢复告警 @Title 获取未恢复告警据 @Description 获取未恢复告警 @Param X-Token header string true "x-token in header" @Success 200 {object} models.Manager @Failure 403 :id is empty @router / [get]
type Resp ¶
type Resp struct { Code int `json:"code"` Message string `json:"message"` Data []struct { Items string `json:"items"` Totals int `json:"totals"` } `json:"data"` }
Resp Resp all
type TemplateController ¶
type TemplateController struct {
BaseController
}
TemplateController a
func (*TemplateController) GetAll ¶
func (c *TemplateController) GetAll()
GetAll 获取所有模版 @Title 获取模版 @Description 获取模版 @Param X-Token header string true "x-token in header" @Success 200 {object} models.Manager @Failure 403 :id is empty @router / [get]
func (*TemplateController) GetInfo ¶
func (c *TemplateController) GetInfo()
GetInfo 获取模版 @Title 获取模版 @Description 获取模版 @Param X-Token header string true "x-token in header" @Param page query string false "Sorted-by fields. e.g. col1,col2 ..." @Param limit query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param templates query string false "Limit the size of result set. Must be an integer" @Success 200 {object} models.Manager @Failure 403 :id is empty @router / [get]
type TrendController ¶
type TrendController struct {
BaseController
}
TrendController operations for Trend
func (*TrendController) GetTrendByItemID ¶
func (c *TrendController) GetTrendByItemID()
GetTrendByItemID controller @Title Get One @Description get item by key @Param X-Token header string true "x-token in header" @Param item_id query string true "The key for item" @Param limit query string true "The key for item" @Success 200 {object} models.Item @Failure 403 :id is empty @router / [get]
type TriggersController ¶
type TriggersController struct {
BaseController
}
TriggersController funct
func (*TriggersController) GetInfo ¶
func (c *TriggersController) GetInfo()
GetInfo 获取未恢复告警 @Title 获取未恢复告警据 @Description 获取未恢复告警 @Param X-Token header string true "x-token in header" @Success 200 {object} models.Triggers @Failure 403 :id is empty @router / [get]