Documentation ¶
Index ¶
- type AlertHookReq
- type AlertHookRes
- type AlertPageReq
- type AlertPageRes
- type ConfigAddReq
- type ConfigAddRes
- type ConfigDetailReq
- type ConfigDetailRes
- type ConfigNameReq
- type ConfigNameRes
- type ConfigPageReq
- type ConfigPageRes
- type ConfigRemoveReq
- type ConfigRemoveRes
- type ConfigUpdateReq
- type ConfigUpdateRes
- type GroupAddReq
- type GroupAddRes
- type GroupDeleteReq
- type GroupDeleteRes
- type GroupDetailReq
- type GroupDetailRes
- type GroupListReq
- type GroupListRes
- type GroupPageReq
- type GroupPageRes
- type GroupUpdateReq
- type GroupUpdateRes
- type HelloReq
- type HelloRes
- type LoginReq
- type LoginRes
- type NodeActiveReq
- type NodeActiveRes
- type NodeAddReq
- type NodeAddRes
- type NodeDetailReq
- type NodeDetailRes
- type NodePageReq
- type NodePageRes
- type NodeRemoveReq
- type NodeRemoveRes
- type NodeTargetReq
- type NodeTargetRes
- type NodeUpdateReq
- type NodeUpdateRes
- type RegisterReq
- type RegisterRes
- type RuleActiveReq
- type RuleActiveRes
- type RuleAddReq
- type RuleAddRes
- type RuleDetailReq
- type RuleDetailRes
- type RuleFileGeneratedReq
- type RuleFileGeneratedRes
- type RulePageReq
- type RulePageRes
- type RuleRemoveReq
- type RuleRemoveRes
- type RuleUpdateReq
- type RuleUpdateRes
- type UserAddReq
- type UserAddRes
- type UserDetailReq
- type UserDetailRes
- type UserPageReq
- type UserPageRes
- type UserRemoveReq
- type UserRemoveRes
- type UserUpdatePasswordReq
- type UserUpdatePasswordRes
- type UserUpdateReq
- type UserUpdateRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertHookReq ¶ added in v1.2.0
type AlertHookReq struct {
g.Meta `path:"/alert/webhook" tags:"alert" method:"post" summary:"webhook for alertmanager"`
}
webhook告警推送
type AlertHookRes ¶ added in v1.2.0
type AlertPageReq ¶ added in v1.2.0
type AlertPageReq struct { g.Meta `path:"/alert/page" tags:"alert" method:"post" summary:"fetch alert list by page"` PageNo int `p:"page" d:"1" v:"min:1#分页号码错误"` // 分页号码 PageSize int `p:"pageSize" d:"10" v:"max:50#分页数量最大50条"` // 分页数量,最大50 Labels string `p:"labels" dc:"alert labels"` }
分页查询告警信息
type AlertPageRes ¶ added in v1.2.0
type ConfigAddReq ¶ added in v1.1.0
type ConfigAddReq struct { g.Meta `path:"/config/add" tags:"config" method:"put" summary:"add configuration"` Name string `p:"name" v:"required" dc:"config name"` Value string `p:"value" v:"required" dc:"config value"` }
新增
type ConfigAddRes ¶ added in v1.1.0
type ConfigDetailReq ¶ added in v1.1.0
type ConfigDetailReq struct { g.Meta `path:"/config/detail/{id}" tags:"config" method:"get" summary:"get configuration detail"` Id int `p:"id" v:"required" dc:"config item id"` }
单个详情
type ConfigDetailRes ¶ added in v1.1.0
type ConfigNameReq ¶ added in v1.1.0
type ConfigNameReq struct { g.Meta `path:"/config/name/{name}" tags:"config" method:"get" summary:"get configuration with page"` Name string `p:"name" v:"required" dc:"config name"` }
根据配置名查询
type ConfigNameRes ¶ added in v1.1.0
type ConfigPageReq ¶ added in v1.1.0
type ConfigPageReq struct { g.Meta `path:"/config/page" tags:"config" method:"post" summary:"get configuration with page"` Name string `p:"name" dc:"config name"` PageNo int `p:"page" v:"min:1" d:"1"` PageSize int `p:"pageSize" v:"min:1" d:"10"` }
分页查询
type ConfigPageRes ¶ added in v1.1.0
type ConfigRemoveReq ¶ added in v1.1.0
type ConfigRemoveReq struct { g.Meta `path:"/config/remove/{id}" tags:"config" method:"delete" summary:"delete configuration"` Id int `p:"id" v:"required" dc:"config item id"` }
删除
type ConfigRemoveRes ¶ added in v1.1.0
type ConfigUpdateReq ¶ added in v1.1.0
type ConfigUpdateReq struct { g.Meta `path:"/config/update" tags:"config" method:"post" summary:"update configuration"` Id int `p:"id" v:"required" dc:"config item id"` Name string `p:"name" v:"required" dc:"config name"` Value string `p:"value" v:"required" dc:"config value"` }
修改
type ConfigUpdateRes ¶ added in v1.1.0
type GroupAddReq ¶
type GroupAddReq struct { g.Meta `path:"/group/add" tags:"group" method:"put" summary:"add prometheus group"` Name string `p:"name" v:"required" dc:"group name"` Identification string `p:"identification" dc:"group unique id"` }
添加分组
type GroupAddRes ¶
type GroupDeleteReq ¶
type GroupDeleteReq struct { g.Meta `path:"/group/remove/{id}" tags:"group" method:"delete" summary:"remove the group"` Id string `p:"id" v:"required" dc:"group id,key"` }
删除分组
type GroupDeleteRes ¶
type GroupDetailReq ¶
type GroupDetailReq struct { g.Meta `path:"/group/detail/{id}" tags:"group" method:"get" summary:"get the detail info"` Id string `p:"id" v:"required" dc:"group id,key"` }
查询单体详情
type GroupDetailRes ¶
type GroupListReq ¶
type GroupListReq struct {
g.Meta `path:"/group/list" tags:"group" method:"get" summary:"fetch group all list"`
}
查询全部分组
type GroupListRes ¶
type GroupPageReq ¶
type GroupPageReq struct { g.Meta `path:"/group/page" tags:"group" method:"post" summary:"fetch group list by page"` PageNo int `p:"page" d:"1" v:"min:1#分页号码错误"` // 分页号码 PageSize int `p:"pageSize" d:"10" v:"max:50#分页数量最大50条"` // 分页数量,最大50 Name string `p:"name" dc:"group name"` Identification string `p:"identification" dc:"group unique id"` }
分页查询
type GroupPageRes ¶
type GroupUpdateReq ¶
type GroupUpdateReq struct { g.Meta `path:"/group/update" tags:"group" method:"post" summary:"add prometheus group"` Id string `p:"id" v:"required" dc:"group id,key"` Name string `p:"name" v:"required" dc:"group name"` Identification string `p:"identification" dc:"group unique id"` }
更新分组
type GroupUpdateRes ¶
type NodeActiveReq ¶
type NodeActiveRes ¶
type NodeAddReq ¶
type NodeAddReq struct { g.Meta `path:"/node/add" tags:"node" method:"put" summary:"add node"` Alias string `p:"alias" v:"required" dc:"node exporter item name"` Host string `p:"host" v:"required|ip" dc:"node host or ip"` Port string `p:"port" v:"required|min:1|max:65535" dc:"node exporter port"` Owner string `p:"owner" v:"required" dc:"this job record owner"` Group string `p:"group" v:"required" dc:"group name"` JobName string `p:"jobName" v:"required" dc:"job name"` Labels string `p:"labels" dc:"extend pair values for job"` }
* 添加
type NodeAddRes ¶
type NodeDetailReq ¶
type NodeDetailRes ¶
type NodePageReq ¶
type NodePageReq struct { g.Meta `path:"/node/page" tags:"node" method:"post" summary:"page node query"` PageNo int `p:"page" d:"1" v:"min:1#can not lower than 1" dc:"page number"` PageSize int `p:"pageSize" d:"10" v:"max:100" dc:"page size of each page"` Alias string `p:"alias" dc:"node exporter item name"` Host string `p:"host" dc:"node host or ip"` Port string `p:"port" dc:"node exporter port"` Owner string `p:"owner" dc:"this job record owner"` Group string `p:"group" dc:"group name"` JobName string `p:"jobName" dc:"job name"` }
type NodePageRes ¶
type NodeRemoveReq ¶
type NodeRemoveRes ¶
type NodeTargetReq ¶
type NodeTargetRes ¶
type NodeUpdateReq ¶
type NodeUpdateReq struct { g.Meta `path:"/node/update" tags:"node" method:"post" summary:"update node"` Id string `p:"id" v:"required" dc:"node record id"` Alias string `p:"alias" v:"required" dc:"node exporter item name"` Host string `p:"host" v:"required|ip" dc:"node host or ip"` Port string `p:"port" v:"required|min:1|max:65535" dc:"node exporter port"` Owner string `p:"owner" v:"required" dc:"this job record owner"` Group string `p:"group" v:"required" dc:"group name"` JobName string `p:"jobName" v:"required" dc:"job name"` Labels string `p:"labels" dc:"extend pair values for job"` }
* 更新
type NodeUpdateRes ¶
type RegisterReq ¶
type RegisterReq struct { g.Meta `path:"/regist" tags:"Regist" method:"post" summary:"regist account"` LoginName string `p:"loginName" v:"required" dc:"user's login name"` Name string `p:"name" v:"required" dc:"user's name"` Password string `` /* 148-byte string literal not displayed */ Repassword string `p:"repassword" v:"same:password#密码必须相同" dc:"password check"` Email string `p:"email" v:"required" dc:"user's email address , all alert message will send to this address"` PhoneNumber string `p:"phoneNumber" v:"required" dc:"telephone number"` }
type RegisterRes ¶
type RuleActiveReq ¶ added in v1.1.0
type RuleActiveReq struct { g.Meta `path:"/rule/active" tags:"Rule" method:"post" summary:"change the rule status"` Id int `p:"id" v:"required|integer|min:1" dc:"rule record id"` Active bool `p:"active" v:"required|boolean" dc:"active status must be true or false"` }
变更状态
type RuleActiveRes ¶ added in v1.1.0
type RuleAddReq ¶ added in v1.1.0
type RuleAddReq struct { g.Meta `path:"/rule/add" tags:"Rule" method:"put" summary:"add Rule"` GroupName string `p:"groupName" v:"required" dc:"Rule group name"` Type string `p:"type" v:"required" dc:"Rule type alert or record"` Content string `p:"content" v:"required|yaml"` }
新增
type RuleAddRes ¶ added in v1.1.0
type RuleDetailReq ¶ added in v1.1.0
type RuleDetailReq struct { g.Meta `path:"/rule/detail/{id}" tags:"Rule" method:"get" summary:"get Rule detail"` Id int `p:"id" v:"required" dc:"Rule item id"` }
单个详情
type RuleDetailRes ¶ added in v1.1.0
type RuleFileGeneratedReq ¶ added in v1.1.0
生成规则文件
type RuleFileGeneratedRes ¶ added in v1.1.0
type RulePageReq ¶ added in v1.1.0
type RulePageReq struct { g.Meta `path:"/rule/page" tags:"Rule" method:"post" summary:"get rules with page"` GroupName string `p:"groupName" dc:"Rule group name"` Type string `p:"type" dc:"Rule type alert or record"` PageNo int `p:"page" v:"min:1" d:"1"` PageSize int `p:"pageSize" v:"min:1" d:"10"` }
分页查询
type RulePageRes ¶ added in v1.1.0
type RuleRemoveReq ¶ added in v1.1.0
type RuleRemoveReq struct { g.Meta `path:"/rule/remove/{id}" tags:"Rule" method:"delete" summary:"delete Rule"` Id int `p:"id" v:"required" dc:"Rule item id"` }
删除
type RuleRemoveRes ¶ added in v1.1.0
type RuleUpdateReq ¶ added in v1.1.0
type RuleUpdateReq struct { g.Meta `path:"/rule/update" tags:"Rule" method:"post" summary:"update Rule"` Id int `p:"id" v:"required|min:1" dc:"Rule item id"` GroupName string `p:"groupName" v:"required" dc:"Rule group name"` Type string `p:"type" v:"required" dc:"Rule type alert or record"` Content string `p:"content" v:"required|yaml"` Active bool `p:"active" v:"required|boolean" dc:"active or not the default is true"` }
修改
type RuleUpdateRes ¶ added in v1.1.0
type UserAddReq ¶
type UserAddReq struct { g.Meta `path:"/user/add" tags:"User" method:"put" summary:"add user"` LoginName string `p:"loginName" v:"required" dc:"user's login name"` Name string `p:"name" v:"required" dc:"user's name"` Password string `` /* 148-byte string literal not displayed */ Email string `p:"email" v:"required|email" dc:"user's email address , all alert message will send to this address"` PhoneNumber string `p:"phoneNumber" v:"required|phone" dc:"telephone number"` }
添加
type UserAddRes ¶
type UserDetailReq ¶
type UserDetailReq struct { g.Meta `path:"/user/detail/{id}" tags:"User" method:"get" summary:"get single user detail"` Id int `p:"id" v:"required|integer" dc:"user record id"` }
查询单个详情
type UserDetailRes ¶
type UserPageReq ¶
type UserPageReq struct { g.Meta `path:"/user/page" tags:"User" method:"post" summary:"find user by page"` PageNo int `p:"page" v:"min:1" d:"1" dc:"page number"` PageSize int `p:"pageSize" v:"max:50" d:"10" dc:"page size"` LoginName string `p:"loginName" dc:"user's login name"` Name string `p:"name" dc:"user's name"` Email string `p:"email" dc:"user's email address , all alert message will send to this address"` PhoneNumber string `p:"phoneNumber" dc:"telephone number"` }
分页查询
type UserPageRes ¶
type UserRemoveReq ¶
type UserRemoveReq struct { g.Meta `path:"/user/delete/{id}" tags:"User" method:"delete" summary:"delete user"` Id int `p:"id" v:"required|integer" dc:"user record id"` }
删除
type UserRemoveRes ¶
type UserUpdatePasswordReq ¶
type UserUpdatePasswordReq struct { g.Meta `path:"/user/updatePassword" tags:"User" method:"post" summary:"reset user password"` Id int `p:"id" v:"min:1|required#请填写正确的用户主键"` Password string `p:"password" v:"required" dc:"old password"` NewPassword string `p:"newPassword" v:"required" dc:"new password"` }
更新密码
type UserUpdatePasswordRes ¶
type UserUpdateReq ¶
type UserUpdateReq struct { g.Meta `path:"/user/update" tags:"User" method:"post" summary:"update user"` Id int `p:"id" v:"required|integer" dc:"User record id"` LoginName string `p:"loginName" v:"required" dc:"user's login name"` Name string `p:"name" v:"required" dc:"user's name"` Email string `p:"email" v:"required|email" dc:"user's email address , all alert message will send to this address"` PhoneNumber string `p:"phoneNumber" v:"required|phone" dc:"telephone number"` }
更新
type UserUpdateRes ¶
Click to show internal directories.
Click to hide internal directories.