1 Star 0 Fork 2

yanyue / cloudbases.io.kiali

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
doc.go 14.27 KB
一键复制 编辑 原始数据 按行查看 历史
Hubery1003 提交于 2021-12-16 10:12 . first commit
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
package main
import (
"github.com/kiali/kiali/config"
"github.com/kiali/kiali/graph/cytoscape"
"github.com/kiali/kiali/models"
"github.com/kiali/kiali/prometheus"
"github.com/kiali/kiali/status"
)
/////////////////////
// SWAGGER PARAMETERS - GENERAL
// - keep this alphabetized
/////////////////////
// swagger:parameters appMetrics appDetails graphApp graphAppVersion appDashboard customDashboard
type AppParam struct {
// The app name (label value).
//
// in: path
// required: true
Name string `json:"app"`
}
// swagger:parameters graphAppVersion
type AppVersionParam struct {
// The app version (label value).
//
// in: path
// required: false
Name string `json:"version"`
}
// swagger:parameters istioConfigList workloadList workloadDetails serviceDetails workloadValidations appList serviceMetrics appMetrics workloadMetrics istioConfigDetails istioConfigDetailsSubtype istioConfigDelete istioConfigDeleteSubtype istioConfigUpdate istioConfigUpdateSubtype serviceList appDetails graphApp graphAppVersion graphNamespace graphService graphWorkload namespaceMetrics customDashboard appDashboard serviceDashboard workloadDashboard istioConfigCreate istioConfigCreateSubtype
type NamespaceParam struct {
// The namespace id.
//
// in: path
// required: true
Name string `json:"namespace"`
}
// swagger:parameters istioConfigDetails istioConfigDetailsSubtype istioConfigDelete istioConfigDeleteSubtype istioConfigUpdate istioConfigUpdateSubtype
type ObjectNameParam struct {
// The Istio object name.
//
// in: path
// required: true
Name string `json:"object"`
}
// swagger:parameters istioConfigDetails istioConfigDetailsSubtype istioConfigDelete istioConfigDeleteSubtype istioConfigUpdate istioConfigUpdateSubtype istioConfigCreate istioConfigCreateSubtype
type ObjectTypeParam struct {
// The Istio object type.
//
// in: path
// required: true
// pattern: ^(gateways|virtualservices|destinationrules|serviceentries|rules|quotaspecs|quotaspecbindings)$
Name string `json:"object_type"`
}
// swagger:parameters istioConfigDetailsSubtype istioConfigDeleteSubtype istioConfigUpdateSubtype istioConfigCreateSubtype
type ObjectSubtypeParam struct {
// The Istio object subtype.
//
// in: path
// required: true
Name string `json:"object_subtype"`
}
// swagger:parameters serviceDetails serviceMetrics graphService serviceDashboard
type ServiceParam struct {
// The service name.
//
// in: path
// required: true
Name string `json:"service"`
}
// swagger:parameters customDashboard
type TemplateParam struct {
// The dashboard template name.
//
// in: path
// required: true
Name string `json:"template"`
}
// swagger:parameters workloadDetails workloadValidations workloadMetrics graphWorkload workloadDashboard
type WorkloadParam struct {
// The workload name.
//
// in: path
// required: true
Name string `json:"workload"`
}
/////////////////////
// SWAGGER PARAMETERS - GRAPH
// - keep this alphabetized
/////////////////////
// swagger:parameters graphApp graphAppVersion graphNamespaces graphService graphWorkload
type AppendersParam struct {
// Comma-separated list of Appenders to run. Available appenders: [deadNode, istio, responseTime, securityPolicy, serviceEntry, sidecarsCheck, unusedNode].
//
// in: query
// required: false
// default: run all appenders
Name string `json:"appenders"`
}
// swagger:parameters graphApp graphAppVersion graphNamespaces graphService graphWorkload
type DurationGraphParam struct {
// Query time-range duration (Golang string duration).
//
// in: query
// required: false
// default: 10m
Name string `json:"duration"`
}
// swagger:parameters graphApp graphAppVersion graphNamespaces graphService graphWorkload
type GraphTypeParam struct {
// Graph type. Available graph types: [app, service, versionedApp, workload].
//
// in: query
// required: false
// default: workload
Name string `json:"graphType"`
}
// swagger:parameters graphApp graphAppVersion graphNamespaces graphService graphWorkload
type GroupByParam struct {
// App box grouping characteristic. Available groupings: [app, none, version].
//
// in: query
// required: false
// default: none
Name string `json:"groupBy"`
}
// swagger:parameters graphApp graphAppVersion graphNamespaces graphService graphWorkload
type IncludeIstioParam struct {
// Flag for including istio-system (infra) services. Ignored if namespace is istio-system.
//
// in: query
// required: false
// default: false
Name string `json:"includeIstio"`
}
// swagger:parameters graphApp graphAppVersion graphNamespaces graphWorkload
type InjectServiceNodes struct {
// Flag for injecting the requested service node between source and destination nodes.
//
// in: query
// required: false
// default: false
Name string `json:"injectServiceNodes"`
}
// swagger:parameters graphNamespaces
type NamespacesParam struct {
// Comma-separated list of namespaces to include in the graph. The namespaces must be accessible to the client.
//
// in: query
// required: true
Name string `json:"namespaces"`
}
// swagger:parameters graphApp graphAppVersion graphNamespaces graphService graphWorkload
type QueryTimeParam struct {
// Unix time (seconds) for query such that time range is [queryTime-duration..queryTime]. Default is now.
//
// in: query
// required: false
// default: now
Name string `json:"queryTime"`
}
/////////////////////
// SWAGGER PARAMETERS - METRICS
// - keep this alphabetized
/////////////////////
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard appDashboard serviceDashboard workloadDashboard
type AvgParam struct {
// Flag for fetching histogram average. Default is true.
//
// in: query
// required: false
// default: true
Name string `json:"avg"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard appDashboard serviceDashboard workloadDashboard
type ByLabelsParam struct {
// List of labels to use for grouping metrics (via Prometheus 'by' clause).
//
// in: query
// required: false
// default: []
Name string `json:"byLabels[]"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics appDashboard serviceDashboard workloadDashboard
type DirectionParam struct {
// Traffic direction: 'inbound' or 'outbound'.
//
// in: query
// required: false
// default: outbound
Name string `json:"direction"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard appDashboard serviceDashboard workloadDashboard
type DurationParam struct {
// Duration of the query period, in seconds.
//
// in: query
// required: false
// default: 1800
Name string `json:"duration"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics
type FiltersParam struct {
// List of metrics to fetch. Fetch all metrics when empty. List entries are Kiali internal metric names.
//
// in: query
// required: false
// default: []
Name string `json:"filters[]"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard appDashboard serviceDashboard workloadDashboard
type QuantilesParam struct {
// List of quantiles to fetch. Fetch no quantiles when empty. Ex: [0.5, 0.95, 0.99].
//
// in: query
// required: false
// default: []
Name string `json:"quantiles[]"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard appDashboard serviceDashboard workloadDashboard
type RateFuncParam struct {
// Prometheus function used to calculate rate: 'rate' or 'irate'.
//
// in: query
// required: false
// default: rate
Name string `json:"rateFunc"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard appDashboard serviceDashboard workloadDashboard
type RateIntervalParam struct {
// Interval used for rate and histogram calculation.
//
// in: query
// required: false
// default: 1m
Name string `json:"rateInterval"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics appDashboard serviceDashboard workloadDashboard
type RequestProtocolParam struct {
// Desired request protocol for the telemetry: For example, 'http' or 'grpc'.
//
// in: query
// required: false
// default: all protocols
Name string `json:"requestProtocol"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics appDashboard serviceDashboard workloadDashboard
type ReporterParam struct {
// Istio telemetry reporter: 'source' or 'destination'.
//
// in: query
// required: false
// default: source
Name string `json:"reporter"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard appDashboard serviceDashboard workloadDashboard
type StepParam struct {
// Step between [graph] datapoints, in seconds.
//
// in: query
// required: false
// default: 15
Name string `json:"step"`
}
// swagger:parameters serviceMetrics appMetrics workloadMetrics customDashboard
type VersionParam struct {
// Filters metrics by the specified version.
//
// in: query
// required: false
Name string `json:"version"`
}
/////////////////////
// SWAGGER RESPONSES
/////////////////////
// NoContent: the response is empty
// swagger:response noContent
type NoContent struct {
// in: body
Body struct {
// HTTP status code
// example: 204
// default: 204
Code int32 `json:"code"`
Message error `json:"message"`
} `json:"body"`
}
// BadRequestError: the client request is incorrect
//
// swagger:response badRequestError
type BadRequestError struct {
// in: body
Body struct {
// HTTP status code
// example: 400
// default: 400
Code int32 `json:"code"`
Message error `json:"message"`
} `json:"body"`
}
// A NotFoundError is the error message that is generated when server could not find what was requested.
//
// swagger:response notFoundError
type NotFoundError struct {
// in: body
Body struct {
// HTTP status code
// example: 404
// default: 404
Code int32 `json:"code"`
Message error `json:"message"`
} `json:"body"`
}
// A NotAcceptable is the error message that means request can't be accepted
//
// swagger:response notAcceptableError
type NotAcceptableError struct {
// in: body
Body struct {
// HTTP status code
// example: 404
// default: 404
Code int32 `json:"code"`
Message error `json:"message"`
} `json:"body"`
}
// A Internal is the error message that means something has gone wrong
//
// swagger:response internalError
type InternalError struct {
// in: body
Body struct {
// HTTP status code
// example: 500
// default: 500
Code int32 `json:"code"`
Message error `json:"message"`
} `json:"body"`
}
// A Internal is the error message that means something has gone wrong
//
// swagger:response serviceUnavailableError
type serviceUnavailableError struct {
// in: body
Body struct {
// HTTP status code
// example: 503
// default: 503
Code int32 `json:"code"`
Message error `json:"message"`
} `json:"body"`
}
// HTTP status code 200 and statusInfo model in data
// swagger:response statusInfo
type swaggStatusInfoResp struct {
// in:body
Body status.StatusInfo
}
// HTTP status code 200 and tokenGenerated model in data
// swagger:response tokenGenerated
type swaggTokenGeneratedResp struct {
// in:body
Body config.TokenGenerated
}
// HTTP status code 200 and cytoscapejs Config in data
// swagger:response graphResponse
type GraphResponse struct {
// in:body
Body cytoscape.Config
}
// HTTP status code 200 and IstioConfigList model in data
// swagger:response istioConfigList
type IstioConfigResponse struct {
// in:body
Body models.IstioConfigList
}
// Listing all services in the namespace
// swagger:response serviceListResponse
type ServiceListResponse struct {
// in:body
Body models.ServiceList
}
// Listing all workloads in the namespace
// swagger:response workloadListResponse
type WorkloadListResponse struct {
// in:body
Body models.WorkloadList
}
// Listing all apps in the namespace
// swagger:response appListResponse
type AppListResponse struct {
// in:body
Body models.AppList
}
// serviceHealthResponse contains aggregated health from various sources, for a given service
// swagger:response serviceHealthResponse
type serviceHealthResponse struct {
// in:body
Body models.ServiceHealth
}
// appHealthResponse contains aggregated health from various sources, for a given app
// swagger:response appHealthResponse
type appHealthResponse struct {
// in:body
Body models.AppHealth
}
// workloadHealthResponse contains aggregated health from various sources, for a given workload
// swagger:response workloadHealthResponse
type workloadHealthResponse struct {
// in:body
Body models.WorkloadHealth
}
// namespaceAppHealthResponse is a map of app name x health
// swagger:response namespaceAppHealthResponse
type namespaceAppHealthResponse struct {
// in:body
Body models.NamespaceAppHealth
}
// Listing all the information related to a workload
// swagger:response serviceDetailsResponse
type ServiceDetailsResponse struct {
// in:body
Body models.ServiceDetails
}
// Listing all the information related to a workload
// swagger:response workloadDetails
type WorkloadDetailsResponse struct {
// in:body
Body models.Workload
}
// Metrics response model
// swagger:response metricsResponse
type MetricsResponse struct {
// in:body
Body prometheus.Metrics
}
// Dashboard response model
// swagger:response dashboardResponse
type DashboardResponse struct {
// in:body
Body models.MonitoringDashboard
}
// IstioConfig details of an specific Istio Object
// swagger:response istioConfigDetailsResponse
type IstioConfigDetailsResponse struct {
// in:body
Body models.IstioConfigDetails
}
// Detailed information of an specific app
// swagger:response appDetails
type AppDetailsResponse struct {
// in:body
Body models.App
}
// List of Namespaces
// swagger:response namespaceList
type NamespaceListResponse struct {
// in:body
Body []models.Namespace
}
// Return all the descriptor data related to Grafana
// swagger:response grafanaInfoResponse
type GrafanaInfoResponse struct {
// in: body
Body models.GrafanaInfo
}
// Return all the descriptor data related to Grafana
// swagger:response jaegerInfoResponse
type JaegerInfoResponse struct {
// in: body
Body models.JaegerInfo
}
//////////////////
// SWAGGER MODELS
//////////////////
// List of validations grouped by object type
// swagger:model
type TypedIstioValidations map[string]NameIstioValidation
// List of validations grouped by object name
// swagger:model
type NameIstioValidation map[string]models.IstioValidation
1
https://gitee.com/programmer-zpz/cloudbases.io.kiali.git
git@gitee.com:programmer-zpz/cloudbases.io.kiali.git
programmer-zpz
cloudbases.io.kiali
cloudbases.io.kiali
v0.15.1

搜索帮助