Documentation
¶
Index ¶
- Variables
- func CheckSettingNameValid(settingName SettingName) bool
- type EtcdInfo
- type GovernIdcStatus
- type GovernServerStats
- type Pagination
- type RelationApps
- type ReportInfo
- type ReqAddEtcd
- type ReqAppList
- type ReqAppSearch
- type ReqEtcdServiceList
- type ReqGetEtcdList
- type ReqOptionCreate
- type ReqOptionDelete
- type ReqOptionInfo
- type ReqOptionList
- type ReqOptionUpdate
- type ReqRegistryQuery
- type ReqRelationApps
- type ReqReportList
- type ReqReportRangeList
- type ReqSentinelRuleAdd
- type ReqToolDedail
- type ReqToolList
- type ReqUpdateSettings
- type ReqUserAppViewHistory
- type ReqUserApps
- type ReqUserEvents
- type ResourceList
- type RespAppCommit
- type RespAppInfo
- type RespAppInstance
- type RespAppNumber
- type RespAppPkgAllList
- type RespAppPkgLinkList
- type RespAppProjectList
- type RespAppResource
- type RespAppStatistics
- type RespConfig
- type RespDroneStatus
- type RespEtcdInfo
- type RespEtcdServiceList
- type RespIDCList
- type RespIDCStructure
- type RespOneConfig
- type RespRegisterInfo
- type RespRegistryItem
- type RespRegistryQuery
- type RespRelationApps
- type RespReportList
- type RespToolDetail
- type RespToolList
- type RespUserApps
- type RespUserEvents
- type RuntimeStats
- type SelectData
- type ServerNode
- type Service
- type SettingConfigDep
- type SettingFieldConfig
- type SettingGateway
- type SettingGatewayItem
- type SettingGrafana
- type SettingName
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 对各项配置进行设置,设置项写到此处才能生效 SettingFieldConfigs = map[SettingName]SettingFieldConfig{ GrafanaSettingName: { Default: `{"host":"","header_name":"","api_dashboard_addr":"","instance_dashboard_addr":"","overview_dashboard_addr":""}`, Validate: func(value string) error { return nil }, }, ConfigDepSettingName: { Default: `{"interval":720}`, Validate: func(value string) error { return nil }, }, GatewaySettingName: { Default: "[]", Validate: func(value string) error { field := SettingGateway{} err := json.Unmarshal([]byte(value), &field) if err != nil { return err } settingMap := make(map[string]SettingGatewayItem) for _, item := range field { if _, ok := settingMap[item.Domain]; ok { return fmt.Errorf("域名 %s 存在重复配置", item.Domain) } settingMap[item.Domain] = item } return nil }, }, } )
Functions ¶
func CheckSettingNameValid ¶
func CheckSettingNameValid(settingName SettingName) bool
Types ¶
type GovernIdcStatus ¶
type GovernServerStats ¶
type Pagination ¶
type Pagination struct {
Current int `json:"current"`
Total int `json:"total"`
PageSize int `json:"pageSize"`
}
响应
func NewPagination ¶
func NewPagination(current int, pageSize int) *Pagination
type RelationApps ¶
type ReportInfo ¶
type ReportInfo struct {
Id int `json:"id"`
Aid int `json:"aid"`
AppName string `json:"appName" gorm:"column:app_name"`
Normalized float64 `json:"normalized"`
Warn int `json:"warn"`
Dpainc int `json:"dpainc" gorm:"column:dpainc"`
Error int `json:"error"`
Merror int `json:"merror" gorm:"column:merror"`
Fatal int `json:"fatal"`
Person string `json:"person" gorm:"column:users"`
Timestamp int `json:"timestamp" gorm:"column:timestamp"`
}
type ReqAddEtcd ¶
type ReqAppList ¶
type ReqAppList struct {
CurrentPage int `json:"currentPage" form:"currentPage"` // 项目名称
ShowNum int `json:"showNum" form:"showNum"` // gitlab项目ID
Lang string `json:"lang" form:"lang"` // filter by lang
Qs string `json:"qs" form:"qs"` // 模糊搜索
Sort string `json:"sort" form:"sort"` // 模糊搜索
}
ReqAppList ...
type ReqAppSearch ¶
type ReqAppSearch struct {
Repos string `json:"repos" form:"repos"`
Stats string `json:"stats" form:"stats"`
Q string `json:"q" form:"q"`
Files string `json:"files" form:"files"`
I string `json:"i" form:"i"`
Ctx string `json:"ctx" form:"ctx"`
}
ReqAppSearch ...
type ReqEtcdServiceList ¶
type ReqGetEtcdList ¶
type ReqOptionCreate ¶
type ReqOptionDelete ¶
type ReqOptionInfo ¶
机房信息
type ReqOptionList ¶
type ReqOptionUpdate ¶
type ReqRegistryQuery ¶
type ReqRelationApps ¶
type ReqReportList ¶
type ReqReportList struct {
Current int `json:"current"`
PageSize int `json:"pageSize"`
Aid int `json:"aid"`
AppName string `json:"appName"`
StatDate int64 `json:"statDate"`
}
请求
type ReqReportRangeList ¶
type ReqSentinelRuleAdd ¶
type ReqToolList ¶
type ReqToolList struct {
CurrentPage int `json:"currentPage" form:"currentPage"`
ShowNum int `json:"showNum" form:"showNum"`
QueryObj string `json:"queryObj" form:"queryObj"`
}
ReqToolList ...
type ReqUpdateSettings ¶
type ReqUpdateSettings struct {
Name SettingName `json:"name"`
Content string `json:"content"`
}
更新设置
type ReqUserAppViewHistory ¶
type ReqUserAppViewHistory struct {
Aid uint `json:"aid" valid:"required"`
}
ReqUserAppViewHistory 应用浏览记录埋点请求
type ReqUserApps ¶
type ReqUserApps struct {
Page uint `json:"page" valid:"required"`
PageSize uint `json:"pageSize" valid:"required"`
QS string `json:"qs"`
}
ReqUserApps 用户应用的请求
type ReqUserEvents ¶
type ReqUserEvents struct {
// FromTime uint `json:"fromTime" valid:"required"` // 获取从什么时候开始的数据
PageSize uint `json:"pageSize" valid:"required"`
Page uint `json:"page" valid:"required"`
}
ReqUserEvents 获取用户相关事件的入参
type ResourceList ¶
type ResourceList []db.AppTopology
func (ResourceList) Len ¶
func (p ResourceList) Len() int
func (ResourceList) Less ¶
func (p ResourceList) Less(i, j int) bool
func (ResourceList) Swap ¶
func (p ResourceList) Swap(i, j int)
type RespAppCommit ¶
type RespAppInfo ¶
type RespAppInfo struct {
Aid int `json:"aid"`
Name string `json:"name"`
Lang string `json:"lang"`
AppName string `json:"appName"`
GitlabURL string `json:"gitlabUrl"`
ProtoDir string `json:"proto_dir"`
}
RespAppInfo ...
type RespAppNumber ¶
type RespAppNumber struct {
TotalNumber int `json:"totalNumber"`
NewNumber int `json:"newNumber"`
DeleteNumber int `json:"deleteNumber"`
}
RespAppNumber ...
type RespAppPkgAllList ¶
type RespAppPkgLinkList ¶
type RespAppProjectList ¶
type RespAppResource ¶
type RespAppResource struct {
Aid int `json:"aid"`
Addr string `json:"addr"`
Name string `json:"name"`
Env string `json:"env"`
Type string `json:"type"`
Info string `json:"info"`
IdcID int `json:"idcId"`
}
RespAppResource ...
type RespAppStatistics ¶
type RespConfig ¶
type RespConfig struct {
AppName string `json:"app_name"`
Aid int `json:"aid"`
Config []RespOneConfig `json:"config"`
}
type RespDroneStatus ¶
type RespEtcdInfo ¶
type RespEtcdServiceList ¶
type RespIDCList ¶
type RespIDCStructure ¶
type RespIDCStructure struct {
JunoZone string `json:"junoZone"`
GovernStatusList []GovernIdcStatus `json:"governIdcList"`
IDCList []db.Zone `json:"idcList"`
}
type RespOneConfig ¶
type RespRegisterInfo ¶
type RespRegistryItem ¶
type RespRegistryItem struct {
ID int32 `json:"id"`
AppName string `json:"appName"`
RegKey string `json:"regKey"`
RegValue string `json:"regValue"`
Region string `json:"region"`
Zone string `json:"zone"`
Scheme string `json:"scheme"`
Address string `json:"address"`
IP string `json:"ip"`
HostName string `json:"hostname"`
Type string `json:"type"`
Enable int8 `json:"enable"`
Group string `json:"group"`
Weight int64 `json:"weight"`
ProcessStartAt int64 `json:"processStartAt"`
CreateAt int64 `json:"createAt"`
UpdateAt int64 `json:"updateAt"`
}
查询结果记录
type RespRegistryQuery ¶
type RespRegistryQuery struct {
List []RespRegistryItem `json:"list"`
}
查询结果
type RespRelationApps ¶
type RespRelationApps struct {
Current int `json:"current"`
PageSize int `json:"pageSize"`
Total int `json:"total"`
List []RelationApps `json:"list"`
AddrList []string `json:"addrList"`
}
type RespReportList ¶
type RespReportList struct {
Pagination Pagination `json:"pagination"`
List []ReportInfo `json:"list"`
}
type RespToolDetail ¶
type RespToolDetail struct {
Id uint64 `gorm:"primary_key"`
Name string
Url string
PicUrl string
Desc string
CreateTime int64
}
RespToolDetail ...
type RespToolList ¶
type RespToolList struct {
CurrentPage int `json:"currentPage"`
TotalPage int `json:"totalPage"`
ShowNum int `json:"showNum"`
List []*db.ToolInfo `json:"list"`
}
RespToolList ...
type RespUserApps ¶
type RespUserApps struct {
Pagination Pagination `json:"pagination"`
List []db.AppInfo `json:"list"`
}
RespUserApps 用户应用响应
type RespUserEvents ¶
type RespUserEvents struct {
Events []db.AppEvent `json:"events"`
Pagination base.Pagination `json:"pagination"`
}
RespUserEvents 用户相关事件的出参
type RuntimeStats ¶
type SelectData ¶
type ServerNode ¶
type ServerNode struct {
Name string `json:"name" toml:"name"`
Scheme string `json:"scheme" toml:"scheme"` // http | grpc
Address string `json:"address" toml:"address"`
Labels map[string]string `json:"labels" toml:"labels"` // 标签: group, weight, enable 等
Services map[string]*Service `json:"services" toml:"services"`
}
type SettingConfigDep ¶
type SettingConfigDep struct {
Interval uint `json:"interval"` // 配置依赖解析的
}
type SettingFieldConfig ¶
type SettingFieldConfig struct {
Default string // 默认值
Validate func(value string) error // 参数检查函数
}
设置项配置
func GetSettingFieldConfig ¶
func GetSettingFieldConfig(name SettingName) (SettingFieldConfig, bool)
type SettingGateway ¶
type SettingGateway []SettingGatewayItem
type SettingGatewayItem ¶
type SettingGatewayItem struct {
Name string `json:"name"` // 设置项名称
Domain string `json:"domain"` // 访问地址,Juno根据这个域名进行代理
Host string `json:"host"` // 被代理的服务真实地址
Scheme string `json:"scheme"` // 被代理的服务的协议
Timeout uint `json:"timeout"` // 超时(秒)
Headers []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"headers"` // header头
}
type SettingGrafana ¶
type SettingGrafana struct {
Host string `json:"host"`
HeaderName string `json:"header_name"`
ApiDashboardAddr string `json:"api_dashboard_addr"` // api监控面板路径
InstanceDashboardAddr string `json:"instance_dashboard_addr"` // 实例监控面板
OverviewDashboardAddr string `json:"overview_dashboard_addr"` // 概览面板
}
type SettingName ¶
type SettingName string
设置名称
const ( GrafanaSettingName SettingName = "grafana" ConfigDepSettingName SettingName = "config_dep" GatewaySettingName SettingName = "gateway" )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.