controllers

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AlarmRes used

View Source
var AnalysisRes models.AnalysisList

AnalysisRes mod

View Source
var ApplicationRes models.ApplicationList

ApplicationRes str

ExpRes is used var GroupRes models.GroupList var ExpRes list

GraphRes restp

View Source
var HistoryRes models.HistoryList

HistoryRes is used

View Source
var HostGroupsRes models.HostGroupsList

HostGroupsRes is used

HostRes restp

View Source
var InfoRes models.InfoRes

InfoRes resp

ItemRes rep

View Source
var Manager = new(models.Manager)

Manager var

View Source
var ProblemsRes models.ProblemsRes

ProblemsRes resp

View Source
var Res = &Resp{}

Res var

View Source
var TemplateRes models.TemplateList

TemplateRes rest

TrendRes resp

View Source
var TriggersRes models.TriggersRes

TriggersRes resp

View Source
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]

func (*AlarmController) URLMapping

func (c *AlarmController) URLMapping()

URLMapping ...

type BaseController

type BaseController struct {
	beego.Controller
}

BaseController use

func (*BaseController) Prepare

func (c *BaseController) Prepare()

Prepare Prepare login

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]

func (*EchartController) URLMapping

func (c *EchartController) URLMapping()

URLMapping st

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]

func (*ExpController) URLMapping

func (c *ExpController) URLMapping()

URLMapping ...

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]

func (*GraphController) URLMapping

func (c *GraphController) URLMapping()

URLMapping ...

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]

func (*HistoryController) URLMapping

func (c *HistoryController) URLMapping()

URLMapping ...

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]

func (*HostController) URLMapping

func (c *HostController) URLMapping()

URLMapping ...

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]

func (*ImagesController) URLMapping

func (c *ImagesController) URLMapping()

URLMapping ...

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]

func (*IndexController) URLMapping

func (c *IndexController) URLMapping()

URLMapping beego

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]

func (*ItemController) URLMapping

func (c *ItemController) URLMapping()

URLMapping ...

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]

func (*ManagerController) URLMapping

func (c *ManagerController) URLMapping()

URLMapping ...

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]

func (*ProblemsController) URLMapping

func (c *ProblemsController) URLMapping()

URLMapping beego

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]

func (*TemplateController) URLMapping

func (c *TemplateController) URLMapping()

URLMapping beego

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]

func (*TrendController) URLMapping

func (c *TrendController) URLMapping()

URLMapping ...

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]

func (*TriggersController) URLMapping

func (c *TriggersController) URLMapping()

URLMapping beego

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL