Documentation ¶
Index ¶
- Constants
- Variables
- func CheckConfigFormat(format ConfigFormat) bool
- func CheckSettingNameValid(settingName string) bool
- type APIListItem
- type APIPermItem
- type AccessTokenItem
- type AppAction
- type AppListWithEnvItem
- type AppPermItem
- type AppTabVisit
- type BatchCheckResourceVersionItem
- type ClusterConfigInfo
- type ClusterInfo
- type ClusterList
- type CmcCnt
- type ConfigFormat
- type ConfigResourceVersion
- type ConfigurationPublishData
- type ConfigurationStatus
- type CreateHttpTestCase
- type CreateHttpTestCollection
- type CronJob
- type CronJobListItem
- type CronJobTimer
- type CronTask
- type CronTaskDetail
- type DiffUrlList
- type EnvStatic
- type EtcdInfo
- type GovernIdcStatus
- type GovernServerStats
- type GrpcHistoryItem
- type GrpcHistoryListItem
- type GrpcMethodItem
- type GrpcResponse
- type GrpcTestCase
- type GrpcUseCaseDetail
- type GrpcUseCaseItem
- type HttTestLogListItem
- type HttpCollectionTestLog
- type HttpTestCase
- type HttpTestCollection
- type HttpTestLog
- type HttpTestResponse
- type JobRule
- type JunoAgent
- type K8sConfig
- type ListGroupItem
- type ListGrpcProtoItem
- type ListHttpCollection
- type ListUserItem
- type MakeGrpcRequest
- type MenuTree
- type MenuTreeItem
- type Metadata
- type Pagination
- type PodList
- type QueryHttpTestCollection
- type QueryHttpTestUseCase
- type RelationApps
- type ReportInfo
- type ReqAddEtcd
- type ReqAliyunLogDefault
- type ReqAppAction
- type ReqAppList
- type ReqAppListWithEnv
- type ReqAppSearch
- type ReqBatchCheckResourceVersion
- type ReqBindProtoToApp
- type ReqChangeAppGroup
- type ReqChangeUserGroup
- type ReqConfigInstanceList
- type ReqConfigPublish
- type ReqConfiguratorsPut
- type ReqCreateAccessToken
- type ReqCreateConfig
- type ReqCreateConfigResource
- type ReqCreateConfigResourceVersion
- type ReqCreateGRPCUseCase
- type ReqDeleteAccessToken
- type ReqDeleteConfig
- type ReqDetailConfig
- type ReqDetailConfigResource
- type ReqDiffConfig
- type ReqDiffReleaseConfig
- type ReqEtcdServiceList
- type ReqEventList
- type ReqGetAppConfig
- type ReqGetAppPerm
- type ReqGetConfigResourceByName
- type ReqGetEtcdList
- type ReqGetFrameVersion
- type ReqGetGroupAPIPerm
- type ReqGetGroupMenuPerm
- type ReqGetTabVisit
- type ReqGovern
- type ReqGrpcHistoryList
- type ReqHTTPProxy
- type ReqHistoryConfig
- type ReqList
- type ReqListAccessToken
- type ReqListConfig
- type ReqListConfigResource
- type ReqListGRPCUseCases
- type ReqListHttpTestHistory
- type ReqListPProf
- type ReqListPipeline
- type ReqListUser
- type ReqLockConfig
- type ReqMethodDetail
- type ReqNodeHeartBeat
- type ReqOptionCreate
- type ReqOptionDelete
- type ReqOptionInfo
- type ReqOptionList
- type ReqOptionUpdate
- type ReqPostAppConfig
- type ReqPostUserVisit
- type ReqPublishConfig
- type ReqQueryGRPCUseCase
- type ReqQueryGrpcService
- type ReqQueryHistoryItem
- type ReqQueryJobs
- type ReqQueryTaskItem
- type ReqQueryTasks
- type ReqQueryTestTasks
- type ReqReadInstanceConfig
- type ReqRegistryQuery
- type ReqRelationApps
- type ReqReportList
- type ReqReportRangeList
- type ReqRunProfile
- type ReqSendGRPCRequest
- type ReqSendHttpRequest
- type ReqSentinelRuleAdd
- type ReqSetGroupAPIPerm
- type ReqSetGroupAppPerm
- type ReqSetGroupMenuPerm
- type ReqToolDedail
- type ReqToolList
- type ReqUpdateConfig
- type ReqUpdateGRPCUseCase
- type ReqUpdateGroup
- type ReqUpdatePipeline
- type ReqUpdateSettings
- type ReqUseCaseDetail
- type ReqUserAppViewHistory
- type ReqUserApps
- type ReqUserEvents
- type ResourceList
- type RespAliyunLogDefault
- type RespAppAction
- type RespAppCommit
- type RespAppInfo
- type RespAppInstance
- type RespAppListWithEnv
- type RespAppNumber
- type RespAppPkgAllList
- type RespAppPkgLinkList
- type RespAppProjectList
- type RespAppResource
- type RespAppStatistics
- type RespBatchCheckResourceVersion
- type RespConfig
- type RespConfigInstanceItem
- type RespConfigInstanceList
- type RespDetailConfig
- type RespDetailConfigResource
- type RespDetailGrpcMethod
- type RespDiffConfig
- type RespDiffReleaseConfig
- type RespDroneStatus
- type RespEnvZone
- type RespEnvZoneItem
- type RespEtcdInfo
- type RespEtcdServiceList
- type RespGetAppPerm
- type RespGetFrameVersion
- type RespGetGroupAPIPerm
- type RespGetMenuPerm
- type RespGrpcAppServiceTreeItem
- type RespGrpcHistoryList
- type RespGrpcServiceItem
- type RespGrpcServiceMethodItem
- type RespHistoryConfig
- type RespHistoryConfigItem
- type RespIDCList
- type RespIDCStructure
- type RespInfo
- type RespListAccessToken
- type RespListAppGroup
- type RespListConfig
- type RespListConfigItem
- type RespListConfigResource
- type RespListConfigResourceItem
- type RespListGRPCProto
- type RespListHttpTestCollection
- type RespListHttpTestHistory
- type RespListMethodUseCaseItem
- type RespListUser
- type RespListUserGroup
- type RespOneConfig
- type RespReadInstanceConfigItem
- 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 SettingGrafanaDashboard
- type SettingK8SCluster
- type SettingName
- type SettingTestPlatform
- type TabVisit
- type TaskPlatformJob
- type TestPipeline
- type TestPipelineUV
- type TestTask
- type TestTaskEvent
- type TestTaskEventType
- type TestTaskStepStatus
- type TestTaskStepUpdatePayload
- type TestTaskUpdateEventPayload
- type UniqZone
- type UpdateHttpTestCase
- type UsedStatusResp
- type User
- type UserTabVisit
- type VisitStat
- type WorkerHeartbeat
- type WorkerZone
Constants ¶
const ( // ConfigFormatToml .. ConfigFormatToml = "toml" // ConfigFormatYaml .. ConfigFormatYaml = "yaml" // INI格式 ConfigFormatINI = "ini" // ConfigureUsedType .. ConfigureUsedTypeSupervisor = 1 ConfigureUsedTypeSystemd = 2 )
const ( VersionSettingName string = "version" ConfigDepSettingName string = "config_dep" EtcdSettingName string = "etcd" GrafanaSettingName string = "grafana" GatewaySettingName string = "gateway" K8SClusterSettingName string = "k8s_cluster" TestPlatformSettingName string = "test_platform" )
Variables ¶
var ( // ConfigFormats Verified list ConfigFormats = []ConfigFormat{ConfigFormatToml, ConfigFormatYaml, ConfigFormatINI} )
var ( // todo can't global config // 对各项配置进行设置,设置项写到此处才能生效 SettingFieldConfigs = map[string]SettingFieldConfig{ VersionSettingName: { Default: `[]`, Validate: func(value string) error { return nil }, }, EtcdSettingName: { Default: `[]`, Validate: func(value string) error { return nil }, }, GrafanaSettingName: { Default: `{"host":"","header_name":"",scheme:""}`, Validate: func(value string) error { setting := SettingGrafana{} err := json.Unmarshal([]byte(value), &setting) if err != nil { return err } scheme := strings.ToLower(setting.Scheme) if scheme != "http" && scheme != "https" { return fmt.Errorf("无效的协议: %s", scheme) } 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 }, }, K8SClusterSettingName: { Default: "{\"list\":[]}", Validate: func(value string) error { data := SettingK8SCluster{} err := json.Unmarshal([]byte(value), &data) if err != nil { return err } err = validator.New().Struct(&data) if err != nil { return err } return nil }, }, TestPlatformSettingName: { Default: "{\"enable\":false}", Validate: func(value string) error { data := SettingTestPlatform{} err := json.Unmarshal([]byte(value), &data) if err != nil { return err } err = validator.New().Struct(&data) if err != nil { return err } return nil }, }, } )
var (
TabNameMap = map[string]string{
"detail": "详情",
"monitor": "监控",
"confgo": "配置",
"applog": "日志",
"pprof": "Pprof",
"etcd": "Etcd",
"event": "事件",
}
)
Functions ¶
func CheckConfigFormat ¶ added in v0.2.0
func CheckConfigFormat(format ConfigFormat) bool
CheckConfigFormat 检查配置文件格式是否符合要求
func CheckSettingNameValid ¶ added in v0.2.0
Types ¶
type APIListItem ¶ added in v0.2.0
type APIPermItem ¶ added in v0.2.0
type AccessTokenItem ¶ added in v0.2.0
type AppListWithEnvItem ¶ added in v0.2.0
type AppPermItem ¶ added in v0.2.0
type AppTabVisit ¶ added in v0.4.3
type BatchCheckResourceVersionItem ¶ added in v0.2.0
type ClusterConfigInfo ¶ added in v0.4.3
type ClusterConfigInfo struct { Doc string `json:"doc"` SyncStatus string `json:"sync_status"` ChangeLog string `json:"change_log"` Version string `json:"version"` // 发布到Juno Proxy的版本号 CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` ConfigFilePath string `json:"config_file_path"` }
ClusterConfigInfo ..
type ClusterInfo ¶ added in v0.4.3
type ClusterInfo struct { Name string `json:"name"` Env []string `json:"env"` ZoneCode string `json:"zone_code"` ZoneName string `json:"zone_name"` }
ClusterInfo ..
type ClusterList ¶ added in v0.4.3
type ClusterList struct {
List []ClusterInfo `json:"list"`
}
ClusterList ..
type CmcCnt ¶ added in v0.3.0
type CmcCnt struct { DayTime string `json:"day_time" gorm:"day_time"` Cnt int `gorm:"cnt" json:"cnt"` }
CmcCnt ..
type ConfigResourceVersion ¶ added in v0.2.0
type ConfigurationPublishData ¶ added in v0.2.0
type ConfigurationPublishData struct { Content string `json:"content"` Metadata Metadata `json:"metadata"` }
ConfigurationPublishData ..
type ConfigurationStatus ¶ added in v0.2.0
type ConfigurationStatus struct { // etcd store data FileName string `json:"file_name"` Version string `json:"md5"` Hostname string `json:"hostname"` Env string `json:"env"` Timestamp int64 `json:"timestamp"` IP string `json:"ip"` HealthPort string `json:"health_port"` // attach key ZoneCode string `json:"zone_code"` EffectVersion string `json:"effect_version"` }
ConfigurationStatus ..
type CreateHttpTestCase ¶ added in v0.3.0
type CreateHttpTestCase struct { Name string `json:"name" valid:"required"` CollectionID uint `json:"collection_id" valid:"required"` URL string `json:"url"` Method string `json:"method"` Query db.HttpTestParam `json:"query"` Headers db.HttpTestParam `json:"headers"` ContentType string `json:"content_type"` Body string `json:"body"` }
type CreateHttpTestCollection ¶ added in v0.3.0
type CronJob ¶ added in v0.4.0
type CronJob struct { ID uint `json:"id"` Name string `json:"name"` Username string `json:"username"` AppName string `json:"app_name"` Env string `json:"env"` Zone string `json:"zone"` Timeout uint `json:"timeout"` RetryCount uint `json:"retry_count"` RetryInterval uint `json:"retry_interval"` Script string `json:"script"` Enable bool `json:"enable"` JobType db.CronJobType `json:"job_type"` Timers []CronJobTimer `json:"timers"` Nodes []string `json:"nodes"` }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type CronJobListItem ¶ added in v0.4.0
type CronJobListItem struct { CronJob Status *db.CronTaskStatus `json:"status"` LastExecutedAt *time.Time `json:"last_executed_at"` }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type CronJobTimer ¶ added in v0.4.0
type CronJobTimer struct { ID uint `json:"id"` JobID uint `json:"job_id"` Cron string `json:"cron"` }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type CronTask ¶ added in v0.4.0
type CronTask struct { ID string `json:"id"` JobID uint `json:"job_id"` ExecutedAt *time.Time `json:"executed_at"` FinishedAt *time.Time `json:"finished_at"` RetryCount uint `json:"retry_count"` Status db.CronTaskStatus `json:"status"` Node string `json:"node"` ExecuteType int `json:"execute_type"` }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type CronTaskDetail ¶ added in v0.4.0
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type DiffUrlList ¶ added in v0.4.3
type GovernIdcStatus ¶
type GovernServerStats ¶
type GrpcHistoryItem ¶ added in v0.3.0
type GrpcHistoryItem struct { ID uint `json:"id"` MethodID uint `json:"method_id"` AppName string `json:"app_name"` ServiceName string `json:"service_name"` MethodName string `json:"method_name"` Input string `json:"input"` Metadata db.ProtoMetadata `json:"metadata"` Output string `json:"output"` Status string `json:"status"` Error string `json:"error"` TimeCost int64 `json:"time_cost"` Addr string `json:"addr"` TestPassed bool `json:"test_passed"` CreatedAt time.Time `json:"created_at"` }
type GrpcHistoryListItem ¶ added in v0.3.0
type GrpcMethodItem ¶ added in v0.3.0
type GrpcResponse ¶ added in v0.3.0
type GrpcTestCase ¶ added in v0.4.0
type GrpcTestCase struct { grpctester.RequestPayload MethodDescriptor json.RawMessage `json:"method_descriptor"` }
type GrpcUseCaseDetail ¶ added in v0.3.0
type GrpcUseCaseDetail struct { ID uint `json:"id"` MethodID uint `json:"method_id"` Uid uint `json:"uid"` Name string `json:"name"` Input string `json:"input"` Metadata db.ProtoMetadata `json:"metadata"` AppName string `json:"app_name"` ServiceName string `json:"service_name"` MethodName string `json:"method_name"` Script string `json:"script"` }
type GrpcUseCaseItem ¶ added in v0.3.0
type GrpcUseCaseItem struct { ID uint `json:"id"` Name string `json:"name"` Input string `json:"input"` Metadata db.ProtoMetadata `json:"metadata"` }
type HttTestLogListItem ¶ added in v0.3.0
type HttTestLogListItem struct { ID uint `json:"id"` OperatorType string `json:"operator_type"` // 执行人类型 OperatorID uint `json:"operator_id"` // 执行人ID Name string `json:"name"` // Request URL string `json:"url"` Method string `json:"method"` // Response Size int64 `json:"size"` Cost int64 `json:"cost"` Code int `json:"code"` }
列表项,移除大字段和列表展示不需要的字段
type HttpCollectionTestLog ¶ added in v0.4.0
type HttpTestCase ¶ added in v0.3.0
type HttpTestCase struct { ID uint `json:"id" validate:"required"` Name string `json:"name"` URL string `json:"url"` Method string `json:"method"` Query db.HttpTestParam `json:"query"` Headers db.HttpTestParam `json:"headers"` ContentType string `json:"content_type"` Body string `json:"body"` Script string `json:"script"` }
type HttpTestCollection ¶ added in v0.3.0
type HttpTestLog ¶ added in v0.3.0
type HttpTestLog struct { OperatorType string `json:"operator_type"` // 执行人类型 OperatorID uint `json:"operator_id"` // 执行人ID Name string `json:"name"` // Request URL string `json:"url"` Method string `json:"method"` Query db.HttpTestParam `json:"query"` Headers db.HttpTestParam `json:"headers"` ContentType string `json:"content_type"` Body string `json:"body"` // Response ResponseBody string `json:"response_body"` ResponseHeaders db.MapStringArray `json:"response_headers"` Size int64 `json:"size"` Cost int64 `json:"cost"` Code int `json:"code"` }
type HttpTestResponse ¶ added in v0.3.0
type JobRule ¶ added in v0.4.0
type JobRule struct { ID string `json:"id"` Timer string `json:"timer"` GroupIDs []string `json:"gids"` NodeIDs []string `json:"nids"` ExcludeNodeIDs []string `json:"exclude_nids"` Schedule cron.Schedule `json:"-"` }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type ListGroupItem ¶ added in v0.2.0
type ListGroupItem struct {
Name string `json:"name"`
}
type ListGrpcProtoItem ¶ added in v0.3.0
type ListHttpCollection ¶ added in v0.3.0
type ListUserItem ¶ added in v0.2.0
type MakeGrpcRequest ¶ added in v0.3.0
type MenuTree ¶ added in v0.2.0
type MenuTree []MenuTreeItem
type MenuTreeItem ¶ added in v0.2.0
type Metadata ¶ added in v0.2.0
type Metadata struct { Timestamp int64 `json:"timestamp"` Version string `json:"version"` Format string `json:"format"` Paths []string `json:"paths"` }
Metadata ..
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 QueryHttpTestCollection ¶ added in v0.3.0
type QueryHttpTestCollection struct {
CollectionID uint `query:"collection_id" json:"collection_id" validate:"required"`
}
type QueryHttpTestUseCase ¶ added in v0.3.0
type QueryHttpTestUseCase struct {
UseCaseID uint `query:"id" json:"id" validate:"required"`
}
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 ReqAliyunLogDefault ¶ added in v0.4.0
type ReqAliyunLogDefault struct { Env string `json:"env" valid:"required"` Query string `json:"query" valid:"required"` Typ string `json:"typ" valid:"required"` AppName string `json:"app_name" query:"app_name" valid:"required"` Aid string `json:"aid" query:"aid" valid:"required"` }
ReqAliyunLogDefault env, query, typ, appNam
type ReqAppAction ¶ added in v0.3.0
type ReqAppAction struct { Action string `json:"action" query:"action" validate:"required"` Typ uint `json:"typ" query:"typ" validate:"required"` NodeName string `json:"node_name" query:"node_name" validate:"required"` AppName string `json:"app_name" query:"app_name" validate:"required"` ZoneCode string `json:"zone_code" query:"zone_code" validate:"required"` Env string `json:"env" query:"env" validate:"required"` }
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 ReqAppListWithEnv ¶ added in v0.2.0
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 ReqBatchCheckResourceVersion ¶ added in v0.2.0
type ReqBindProtoToApp ¶ added in v0.3.0
type ReqChangeAppGroup ¶ added in v0.2.0
type ReqChangeUserGroup ¶ added in v0.2.0
type ReqConfigInstanceList ¶ added in v0.2.0
type ReqConfigPublish ¶ added in v0.2.0
type ReqConfigPublish struct { AppName string `json:"app_name"` ZoneCode string `json:"zone_code"` Port string `json:"port"` FileName string `json:"file_name"` Format string `json:"format"` Content string `json:"content"` InstanceList []string `json:"instance_list"` Env string `json:"env"` Version string `json:"version"` PubK8S bool `json:"pub_k8s"` }
ReqConfigPublish configuration publish request struct
type ReqConfiguratorsPut ¶ added in v0.4.3
type ReqCreateAccessToken ¶ added in v0.2.0
type ReqCreateAccessToken struct {
Name string `json:"name" valid:"required"`
}
type ReqCreateConfig ¶ added in v0.2.0
type ReqCreateConfig struct { AppName string `json:"app_name" validate:"required"` Env string `json:"env" validate:"required"` Zone string `json:"zone" validate:"required"` FileName string `json:"file_name" validate:"required"` // 文件名(不带后缀) Format ConfigFormat `json:"format" validate:"required,oneof=yaml toml ini"` // 格式后缀名(比如: toml, yaml) }
ReqCreateConfig ..
type ReqCreateConfigResource ¶ added in v0.2.0
type ReqCreateConfigResource struct { Env string `json:"env" validate:"required"` Zone string `json:"zone" validate:"required"` Name string `json:"name" validate:"required"` Value string `json:"value" validate:"required"` IsGlobal bool `json:"is_global"` Description string `json:"description" validate:"required"` Visible bool `json:"visible"` Tags []string `json:"tags"` }
type ReqCreateConfigResourceVersion ¶ added in v0.2.0
type ReqCreateGRPCUseCase ¶ added in v0.3.0
type ReqCreateGRPCUseCase struct { MethodID uint `json:"method_id" validate:"required"` Name string `json:"name" validate:"required"` Input string `json:"input"` Metadata db.ProtoMetadata `json:"metadata"` }
type ReqDeleteAccessToken ¶ added in v0.2.0
type ReqDeleteAccessToken struct {
AppID string `json:"app_id" valid:"required"`
}
type ReqDeleteConfig ¶ added in v0.2.0
type ReqDeleteConfig struct {
ID uint `json:"id" validate:"required"`
}
ReqDeleteConfig ..
type ReqDetailConfig ¶ added in v0.2.0
type ReqDetailConfig struct {
ID uint `json:"id" validate:"required"`
}
ReqDetailConfig ..
type ReqDetailConfigResource ¶ added in v0.2.0
type ReqDetailConfigResource struct {
ID uint `json:"id" validate:"required"`
}
type ReqDiffConfig ¶ added in v0.2.0
type ReqDiffConfig struct { ID uint `query:"id"` // 配置ID HistoryID uint `query:"history_id"` // 版本ID AppName string `query:"appName"` // 应用名称 Env string `query:"env"` // 环境 ServiceVersion string `query:"serviceVersion"` // 服务器版本 PublishVersion string `query:"publishVersion"` // 发布版本 }
ReqDiffConfig ..
type ReqDiffReleaseConfig ¶ added in v0.4.3
type ReqDiffReleaseConfig struct { AppName string `query:"appName" validate:"required"` // 应用名 Env string `query:"env" validate:"required"` // 环境 ConfigName string `query:"configName"` // 配置文件名称 IpList []string `query:"ipList"` // ips }
ReqDiffReleaseConfig ..
type ReqEtcdServiceList ¶
type ReqEventList ¶ added in v0.3.0
type ReqGetAppConfig ¶ added in v0.4.3
type ReqGetAppConfig struct {
Aid uint `json:"aid" valid:"required"`
}
type ReqGetAppPerm ¶ added in v0.2.0
type ReqGetConfigResourceByName ¶ added in v0.2.0
type ReqGetEtcdList ¶
type ReqGetFrameVersion ¶ added in v0.3.0
type ReqGetFrameVersion struct {
AppName string `json:"appName"`
}
type ReqGetGroupAPIPerm ¶ added in v0.2.0
type ReqGetGroupAPIPerm struct {
GroupName string `query:"group_name" valid:"required"`
}
type ReqGetGroupMenuPerm ¶ added in v0.2.0
type ReqGetGroupMenuPerm struct {
GroupName string `query:"group_name"`
}
type ReqGetTabVisit ¶ added in v0.4.3
GetTabVisit
func (*ReqGetTabVisit) Check ¶ added in v0.4.3
func (a *ReqGetTabVisit) Check() error
type ReqGrpcHistoryList ¶ added in v0.3.0
type ReqHTTPProxy ¶ added in v0.2.0
type ReqHTTPProxy struct { Address string `json:"address"` URL string `json:"url"` Type string `json:"type"` // GET POST Timeout int `json:"timeout"` // seconds Body json.RawMessage `json:"body"` Params map[string]string `json:"params"` }
ReqHTTPProxy ..
type ReqHistoryConfig ¶ added in v0.2.0
type ReqHistoryConfig struct { ID uint `json:"id" validate:"required"` // 配置文件ID Size uint `json:"size" validate:"required"` Page uint `json:"page"` }
ReqHistoryConfig ..
type ReqListAccessToken ¶ added in v0.2.0
type ReqListConfig ¶ added in v0.2.0
type ReqListConfig struct { AppName string `query:"app_name" validate:"required"` Env string `query:"env" validate:"required"` }
ReqListConfig ..
type ReqListConfigResource ¶ added in v0.2.0
type ReqListGRPCUseCases ¶ added in v0.3.0
type ReqListGRPCUseCases struct {
ServiceID uint `query:"service_id" validate:"required"`
}
type ReqListHttpTestHistory ¶ added in v0.3.0
type ReqListPProf ¶ added in v0.3.0
type ReqListPProf struct { ZoneCode string `query:"zone_code"` AppName string `query:"app_name"` HostName string `query:"host_name"` Env string `query:"env"` }
ReqListPProf ..
type ReqListPipeline ¶ added in v0.4.0
type ReqListUser ¶ added in v0.2.0
type ReqLockConfig ¶ added in v0.4.0
type ReqLockConfig struct {
ConfigID uint `query:"id" validate:"required"`
}
type ReqMethodDetail ¶ added in v0.3.0
type ReqMethodDetail struct {
ID uint `query:"id" validate:"required"`
}
type ReqNodeHeartBeat ¶ added in v0.2.0
type ReqNodeHeartBeat struct { Hostname string `json:"hostname"` IP string `json:"ip"` RegionCode string `json:"region_code"` RegionName string `json:"region_name"` ZoneCode string `json:"zone_code"` ZoneName string `json:"zone_name"` AppName string `json:"app_name"` Env string `json:"env"` AgentType int `json:"agent_type"` AgentVersion string `json:"agent_version"` ProxyType int `json:"proxy_type"` ProxyVersion string `json:"proxy_version"` }
ReqNodeHeartBeat ..
type ReqOptionCreate ¶ added in v0.2.0
type ReqOptionDelete ¶ added in v0.2.0
type ReqOptionInfo ¶ added in v0.2.0
机房信息
type ReqOptionList ¶ added in v0.2.0
type ReqOptionUpdate ¶ added in v0.2.0
type ReqPostAppConfig ¶ added in v0.4.3
type ReqPostAppConfig struct { Aid uint `json:"aid" valid:"required"` Config db.UserConfigInfo `json:"config" valid:"required"` }
type ReqPostUserVisit ¶ added in v0.4.3
type ReqPostUserVisit struct { Aid uint `json:"aid" valid:"required"` AppName string `json:"appName"` // 项目id ZoneCode string `json:"zone_code"` // 环境 Env string `json:"env"` // 环境 Tab string `json:"tab"` Url string `json:"url"` // url }
func (*ReqPostUserVisit) Check ¶ added in v0.4.3
func (a *ReqPostUserVisit) Check() error
type ReqPublishConfig ¶ added in v0.2.0
type ReqPublishConfig struct { ID uint `json:"id" validate:"required"` // 配置ID HostName []string `json:"host_name"` // 发布的实例机器名称的列表,如果为空,则发布所有机器 Version *string `json:"version"` // 版本号 PubK8S bool `json:"pub_k8s"` // 是否发布集群 All int `json:"all"` //是否发布所有实例 }
ReqPublishConfig ..
type ReqQueryGRPCUseCase ¶ added in v0.3.0
type ReqQueryGRPCUseCase struct {
MethodID uint `query:"id"`
}
type ReqQueryGrpcService ¶ added in v0.3.0
type ReqQueryGrpcService struct {
ServiceID uint `query:"service_id" validate:"required"`
}
type ReqQueryHistoryItem ¶ added in v0.3.0
type ReqQueryHistoryItem struct {
HistoryID uint `query:"history_id" validate:"required"`
}
type ReqQueryJobs ¶ added in v0.4.0
type ReqQueryJobs struct { AppName *string `query:"app_name"` Enable *bool `query:"enable"` Name *string `query:"name"` User *string `query:"username"` Page uint `query:"page"` PageSize uint `query:"page_size"` }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type ReqQueryTaskItem ¶ added in v0.4.0
type ReqQueryTaskItem struct {
TaskID uint `query:"task_id"`
}
type ReqQueryTasks ¶ added in v0.4.0
type ReqQueryTasks struct { ID uint `query:"id"` ExecutedAt []string `query:"executed_at"` Page uint `query:"page"` PageSize uint `query:"page_size"` }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type ReqQueryTestTasks ¶ added in v0.4.0
type ReqReadInstanceConfig ¶ added in v0.3.0
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 ReqRunProfile ¶ added in v0.3.0
type ReqRunProfile struct { ZoneCode string `json:"zone_code"` AppName string `json:"app_name"` HostName string `json:"host_name"` Env string `json:"env"` DurationSecond int `json:"duration_second"` //持续时间秒 }
ReqRunProfile ..
func (*ReqRunProfile) IsValid ¶ added in v0.4.11
func (req *ReqRunProfile) IsValid() (isValid bool, msg string)
type ReqSendGRPCRequest ¶ added in v0.3.0
type ReqSendGRPCRequest struct { ReqCreateGRPCUseCase Address string `json:"address" validate:"required"` Script string `json:"script"` }
type ReqSendHttpRequest ¶ added in v0.3.0
type ReqSendHttpRequest struct { ID uint `json:"id" validate:"required"` Name string `json:"name" validate:"required"` URL string `json:"url" validate:"required"` Method string `json:"method" validate:"required"` Query db.HttpTestParam `json:"query"` Headers db.HttpTestParam `json:"headers"` ContentType string `json:"content_type"` Body string `json:"body"` Script string `json:"script"` //测试脚本 }
type ReqSentinelRuleAdd ¶
type ReqSetGroupAPIPerm ¶ added in v0.2.0
type ReqSetGroupAPIPerm struct { GroupName string `json:"group_name"` APIList []APIListItem `json:"api_list"` }
type ReqSetGroupAppPerm ¶ added in v0.2.0
type ReqSetGroupMenuPerm ¶ added in v0.2.0
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 ReqUpdateConfig ¶ added in v0.2.0
type ReqUpdateConfig struct { ID uint `json:"id" validate:"required"` Message string `json:"message" validate:"required"` Content string `json:"content" validate:"required"` }
ReqUpdateConfig ..
type ReqUpdateGRPCUseCase ¶ added in v0.3.0
type ReqUpdateGroup ¶ added in v0.2.0
type ReqUpdatePipeline ¶ added in v0.4.0
type ReqUpdateSettings ¶ added in v0.2.0
更新设置
type ReqUseCaseDetail ¶ added in v0.3.0
type ReqUseCaseDetail struct {
ID uint `json:"id"`
}
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 RespAliyunLogDefault ¶ added in v0.4.0
type RespAliyunLogDefault struct { Code int `json:"code"` Msg string `json:"msg"` Data string `json:"data"` }
RespAliyunLogDefault ..
type RespAppAction ¶ added in v0.3.0
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 RespAppListWithEnv ¶ added in v0.2.0
type RespAppListWithEnv struct { List []AppListWithEnvItem `json:"list"` Pagination Pagination `json:"pagination"` }
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 RespBatchCheckResourceVersion ¶ added in v0.2.0
type RespBatchCheckResourceVersion []BatchCheckResourceVersionItem
type RespConfig ¶
type RespConfig struct { AppName string `json:"app_name"` Aid int `json:"aid"` Config []RespOneConfig `json:"config"` }
type RespConfigInstanceItem ¶ added in v0.2.0
type RespConfigInstanceItem struct { ConfigurationStatusID uint `json:"configuration_status_id"` Env string `json:"env"` IP string `json:"ip"` HostName string `json:"host_name"` DeviceID int `json:"device_id"` RegionCode string `json:"region_code"` RegionName string `json:"region_name"` ZoneCode string `json:"zone_code"` ZoneName string `json:"zone_name"` ConfigFilePath string `json:"config_file_path"` ConfigFileUsed uint `json:"config_file_used"` // 1 supervisor 2 systemd ConfigFileSynced uint `json:"config_file_synced"` ConfigFileTakeEffect uint `json:"config_file_take_effect"` SyncAt string `json:"sync_at"` ChangeLog string `json:"change_log"` Version string `json:"version"` // 发布到Juno Proxy的版本号 }
RespConfigInstanceItem ..
type RespConfigInstanceList ¶ added in v0.2.0
type RespConfigInstanceList []RespConfigInstanceItem
type RespDetailConfig ¶ added in v0.2.0
type RespDetailConfig struct { ID uint `json:"id"` AID uint `json:"aid"` Name string `json:"name"` Content string `json:"content"` Format string `json:"format"` // Yaml/Toml Env string `json:"env"` // 环境 Zone string `json:"zone"` // 机房Zone CreatedAt time.Time `json:"created_time"` UpdatedAt time.Time `json:"update_time"` PublishedAt *time.Time `json:"published"` // 未发布/发布时间 CurrentEditUser *User `json:"current_edit_user"` //当前正在编辑的用户名 }
RespDetailConfig Contains configuration content
type RespDetailConfigResource ¶ added in v0.2.0
type RespDetailConfigResource struct { UserName string `json:"user_name"` Name string `json:"name"` Env string `json:"env"` ZoneName string `json:"zone_name"` ZoneCode string `json:"zone_code"` IsGlobal bool `json:"is_global"` Description string `json:"description"` LatestVersion uint `json:"latest_version"` LastUpdate time.Time `json:"last_update"` Versions []ConfigResourceVersion `json:"versions"` Tags []string `json:"tags"` Value string `json:"value"` }
type RespDetailGrpcMethod ¶ added in v0.3.0
type RespDetailGrpcMethod struct { ID uint `json:"id"` AppName string `json:"app_name"` Proto struct { ID uint `json:"id"` FileName string `json:"file_name"` PackageName string `json:"package_name"` } `json:"proto"` Service struct { ID uint `json:"id"` Name string `json:"name"` } `json:"service"` Name string `json:"name"` Comment string `json:"comment"` InputType interface{} `json:"input_type"` OutputType interface{} `json:"output_type"` }
type RespDiffConfig ¶ added in v0.2.0
type RespDiffConfig struct { Origin *RespDetailConfig `json:"origin,omitempty"` Modified RespDetailConfig `json:"modified"` }
RespDiffConfig ..
type RespDiffReleaseConfig ¶ added in v0.4.3
type RespDiffReleaseConfig struct { HasNew bool `json:"hasNew" query:"hasNew"` // 服务器配置与发布配置是否一致;true:有更新,false:没更新 DiffUrlList []DiffUrlList `json:"diffUrlList" query:"diffUrlList"` }
RespDiffReleaseConfig ..
type RespDroneStatus ¶
type RespEnvZone ¶ added in v0.2.0
type RespEnvZone map[string][]RespEnvZoneItem // env => zones
type RespEnvZoneItem ¶ added in v0.2.0
type RespEtcdInfo ¶
type RespEtcdServiceList ¶
type RespGetAppPerm ¶ added in v0.2.0
type RespGetAppPerm struct { List []AppPermItem `json:"list"` Pagination Pagination `json:"pagination"` }
type RespGetFrameVersion ¶ added in v0.3.0
type RespGetGroupAPIPerm ¶ added in v0.2.0
type RespGetGroupAPIPerm []APIPermItem
type RespGetMenuPerm ¶ added in v0.2.0
type RespGetMenuPerm []string
type RespGrpcAppServiceTreeItem ¶ added in v0.3.0
type RespGrpcAppServiceTreeItem struct { AppName string `json:"app_name"` Services []RespGrpcServiceItem `json:"services"` }
type RespGrpcHistoryList ¶ added in v0.3.0
type RespGrpcHistoryList struct { Pagination Pagination `json:"pagination"` List []GrpcHistoryListItem `json:"list"` }
type RespGrpcServiceItem ¶ added in v0.3.0
type RespGrpcServiceMethodItem ¶ added in v0.4.0
type RespHistoryConfig ¶ added in v0.2.0
type RespHistoryConfig struct { Pagination Pagination `json:"pagination"` List []RespHistoryConfigItem `json:"list"` }
RespHistoryConfig ..
type RespHistoryConfigItem ¶ added in v0.2.0
type RespHistoryConfigItem struct { ID uint `json:"id"` UID uint `json:"uid"` // 发布人ID AccessTokenID uint `json:"access_token_id"` AccessTokenName string `json:"access_token_name"` UserName string `json:"user_name"` ChangeLog string `json:"change_log"` ConfigurationID uint `json:"configuration_id"` Version string `json:"version"` // 发布到Juno Proxy的版本号 CreatedAt time.Time `json:"created_at"` }
RespHistoryConfigItem ..
type RespIDCList ¶
type RespIDCStructure ¶
type RespIDCStructure struct { JunoZone string `json:"junoZone"` GovernStatusList []GovernIdcStatus `json:"governIdcList"` IDCList []db.Zone `json:"idcList"` }
type RespInfo ¶ added in v0.4.3
type RespInfo struct { Id int `json:"id" gorm:"not null;column:id"` //id类型? AppName string `json:"appName" gorm:"not null;column:app_name"` IdcId uint32 `json:"idcId" gorm:"not null;column:idc_id"` //id类型? Aid uint32 `json:"aid" gorm:"not null;column:aid"` //id类型? HostName string `json:"hostName" gorm:"not null;column:host_name"` Ip string `json:"ip" gorm:"not null;column:ip"` DeviceID int `json:"deviceId" gorm:"not null;column:device_id"` Env string `json:"env"gorm:"not null"` RegionCode string `json:"regionCode"gorm:"not null"` RegionName string `json:"regionName"gorm:"not null"` IdcCode string `json:"idcCode"gorm:"not null"` RegKey string `gorm:"not null"json:"regKey"` RegValue json.RawMessage `gorm:"not null;type:text"json:"regValue"` Scheme string `gorm:"not null"json:"scheme"` Address string `gorm:"not null"json:"address"` VcsInfo string `gorm:"not null;"json:"vcsInfo"` ProcessStartAt int64 `gorm:"not null"json:"processStartAt"` Enable int8 `gorm:"not null"json:"enable"` Type string `gorm:"not null"json:"type"` Weight int64 `gorm:"not null"json:"weight"` Group string `gorm:"not null"json:"group"` }
type RespListAccessToken ¶ added in v0.2.0
type RespListAccessToken struct { Pagination Pagination `json:"pagination"` List []AccessTokenItem `json:"list"` }
type RespListAppGroup ¶ added in v0.2.0
type RespListAppGroup []ListGroupItem
type RespListConfigItem ¶ added in v0.2.0
type RespListConfigItem struct { ID uint `json:"id"` AID uint `json:"aid"` Name string `json:"name"` Format string `json:"format"` // Yaml/Toml Env string `json:"env"` // 环境 Zone string `json:"zone"` // 机房Zone CreatedAt time.Time `json:"created_time"` UpdatedAt time.Time `json:"update_time"` DeletedAt *time.Time `json:"deleted_at"` PublishedAt *time.Time `json:"published"` // 未发布/发布时间 ConfigStatus uint32 `json:"config_status"` // 配置发布状态,0:未知 1:已发布 2:未发布 }
RespListConfigItem Does not contain configuration content to prevent configuration from being too long
type RespListConfigResource ¶ added in v0.2.0
type RespListConfigResource struct { Pagination Pagination `json:"pagination"` List []RespListConfigResourceItem `json:"list"` }
type RespListConfigResourceItem ¶ added in v0.2.0
type RespListConfigResourceItem struct { ID uint `json:"id"` UID uint `json:"uid"` UserName string `json:"user_name"` Name string `json:"name"` Env string `json:"env"` ZoneName string `json:"zone_name"` ZoneCode string `json:"zone_code"` IsGlobal bool `json:"is_global"` Description string `json:"description"` LatestVersion uint `json:"latest_version"` LastUpdate time.Time `json:"last_update"` Value string `json:"value"` Tags []string `json:"tags"` }
type RespListGRPCProto ¶ added in v0.3.0
type RespListGRPCProto []ListGrpcProtoItem
type RespListHttpTestCollection ¶ added in v0.3.0
type RespListHttpTestCollection struct { Pagination Pagination `json:"pagination"` List []HttpTestCollection `json:"list"` }
type RespListHttpTestHistory ¶ added in v0.3.0
type RespListHttpTestHistory struct { List []HttTestLogListItem `json:"list"` Pagination Pagination `json:"pagination"` }
type RespListMethodUseCaseItem ¶ added in v0.3.0
type RespListMethodUseCaseItem struct { GrpcMethodItem UseCases []GrpcUseCaseItem `json:"use_cases"` }
type RespListUser ¶ added in v0.2.0
type RespListUser struct { List []ListUserItem `json:"list"` Pagination Pagination `json:"pagination"` }
type RespListUserGroup ¶ added in v0.2.0
type RespListUserGroup []ListGroupItem
type RespOneConfig ¶
type RespReadInstanceConfigItem ¶ added in v0.3.0
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 output.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 ¶ added in v0.2.0
type SettingConfigDep struct {
Interval uint `json:"interval"` // 配置依赖解析的
}
type SettingFieldConfig ¶ added in v0.2.0
type SettingFieldConfig struct { Default string // 默认值 Validate func(value string) error // 参数检查函数 }
设置项配置
func GetSettingFieldConfig ¶ added in v0.2.0
func GetSettingFieldConfig(name string) (SettingFieldConfig, bool)
type SettingGateway ¶ added in v0.2.0
type SettingGateway []SettingGatewayItem
type SettingGatewayItem ¶ added in v0.2.0
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 ¶ added in v0.2.0
type SettingGrafanaDashboard ¶ added in v0.3.0
type SettingK8SCluster ¶ added in v0.4.0
type SettingK8SCluster struct { List []struct { Name string `json:"name" validate:"required"` Env []string `json:"env" validate:"required"` ZoneCode string `json:"zone_code" validate:"required"` ZoneName string `json:"zone_name" validate:"required"` Token string `json:"token" validate:"required"` Domain string `json:"domain" validate:"required"` } `json:"list"` }
type SettingTestPlatform ¶ added in v0.4.0
type SettingTestPlatform struct {
Enable bool
}
type TaskPlatformJob ¶ added in v0.4.0
type TaskPlatformJob struct { ID string `json:"id"` Name string `json:"name"` Group string `json:"group"` Command string `json:"cmd"` User string `json:"user"` Rules []*JobRule `json:"rules"` Pause bool `json:"pause"` // A manually controlled state Timeout int64 `json:"timeout"` // Task execution time timeout setting, valid when greater than 0 Parallels int64 `json:"parallels"` // Sets how many tasks can be allowed on a single node at once Retry int `json:"retry"` // Number of failed retries. Default is 0, no retry Interval int `json:"interval"` // Failed task retry interval, Unit second Kind int `json:"kind"` // Task type. 0: ordinary task, 1: single machine task AvgTime int64 `json:"avg_time"` // Average execution time, per ms FailNotify bool `json:"fail_notify"` // Failed to send notification To []string `json:"to"` // Send notification address LogExpiration int `json:"log_expiration"` // Specify log cleanup times for tasks separately Count *int64 `json:"-"` // Control the number of simultaneous tasks // contains filtered or unexported fields }
task platform struct 需要执行的 cron cmd 命令 注册到 /cronsun/cmd/groupName/<id>
type TestPipeline ¶ added in v0.4.0
type TestPipeline struct { ID uint `json:"id"` Name string `json:"name" validate:"required,min=4,max=32"` Env string `json:"env" validate:"required,min=1,max=32"` ZoneCode string `json:"zone_code" validate:"required"` AppName string `json:"app_name" validate:"required"` Branch string `json:"branch" validate:"required,min=1,max=32"` CodeCheck bool `json:"code_check"` UnitTest bool `json:"unit_test"` HttpTestCollection *int `json:"http_test_collection"` // http 测试集合 GrpcTestAddr string `json:"grpc_test_addr"` GrpcTestCases db.PipelineGrpcTestCases `json:"grpc_test_cases"` // GRPC 测试用例列表 }
type TestPipelineUV ¶ added in v0.4.0
type TestPipelineUV struct { ID uint `json:"id"` Name string `json:"name" validate:"required,min=4,max=32"` Env string `json:"env" validate:"required,min=1,max=32"` ZoneCode string `json:"zone_code" validate:"required"` AppName string `json:"app_name" validate:"required"` Branch string `json:"branch" validate:"required,min=1,max=32"` CodeCheck bool `json:"code_check"` UnitTest bool `json:"unit_test"` HttpTestCollection *int `json:"http_test_collection"` // http 测试集合 GrpcTestAddr string `json:"grpc_test_addr"` GrpcTestCases db.PipelineGrpcTestCases `json:"grpc_test_cases"` // GRPC 测试用例列表 Desc db.TestPipelineDesc `json:"desc"` Status db.TestTaskStatus `json:"status"` RunCount int `json:"run_count"` }
type TestTask ¶ added in v0.4.0
type TestTask struct { TaskID uint `json:"task_id" validate:"required"` Name string `json:"name" validate:"required"` AppName string `json:"app_name" validate:"required"` Env string `json:"env" validate:"required"` ZoneCode string `json:"zone_code" validate:"required"` Branch string `json:"branch" validate:"required"` Desc db.TestPipelineDesc `json:"desc" validate:"required"` GitUrl string `json:"git_url"` Status db.TestTaskStatus `json:"status"` CreatedAt time.Time `json:"created_at"` }
type TestTaskEvent ¶ added in v0.4.0
type TestTaskEvent struct { Type TestTaskEventType `json:"type"` TaskID uint `json:"task_id"` Data json.RawMessage `json:"data"` }
type TestTaskEventType ¶ added in v0.4.0
type TestTaskEventType string
var ( TaskUpdateEvent TestTaskEventType = "task_update" TaskStepUpdateEvent TestTaskEventType = "step_update" )
type TestTaskStepStatus ¶ added in v0.4.0
type TestTaskStepUpdatePayload ¶ added in v0.4.0
type TestTaskStepUpdatePayload struct { StepName string `json:"step_name"` Status db.TestStepStatus `json:"status"` LogsAppend string `json:"logs_append"` // 考虑到部分任务的日志量较大,这里使用增量日志 }
type TestTaskUpdateEventPayload ¶ added in v0.4.0
type TestTaskUpdateEventPayload struct { Status db.TestTaskStatus `json:"status"` LogsAppend string `json:"logs"` }
type UpdateHttpTestCase ¶ added in v0.3.0
type UpdateHttpTestCase struct { ID uint `json:"id"` Name string `json:"name" valid:"required"` URL string `json:"url"` Method string `json:"method"` Query db.HttpTestParam `json:"query"` Headers db.HttpTestParam `json:"headers"` ContentType string `json:"content_type"` Body string `json:"body"` }
type UsedStatusResp ¶ added in v0.2.0
type UsedStatusResp struct {
IsUsed int `json:"is_used"`
}
UsedStatusResp ..
type UserTabVisit ¶ added in v0.4.3
type VisitStat ¶ added in v0.4.3
type VisitStat struct { AppVisit []AppTabVisit `json:"app_visit"` UserVisit []UserTabVisit `json:"user_visit"` PageVisit []TabVisit `json:"page_visit"` AppList []db.AppInfo `json:"app_list"` AppSum int `json:"app_sum"` AppConf int `json:"app_conf"` }
type WorkerHeartbeat ¶ added in v0.4.0
type WorkerZone ¶ added in v0.4.0
Source Files ¶
- accesstoken.go
- confgov2.go
- configresource.go
- etcd.go
- event.go
- httptest.go
- junoworker.go
- k8s.go
- logStatistics.go
- loggerplatform.go
- node.go
- pagination.go
- permission.go
- pprof.go
- provider.go
- relation.go
- reqApp.go
- reqRegister.go
- reqgrpctest.go
- reqhttptest.go
- resource.go
- respApp.go
- respConfig.go
- respIDC.go
- respRegister.go
- respgrpctest.go
- system.go
- taskplatform.go
- testplatform.go
- tool.go
- user.go
- zone.go