Documentation
¶
Index ¶
- Constants
- func GetApplicationId(r *http.Request) (model.ApplicationId, error)
- type Api
- func (api *Api) AI(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) ApiKeyAuth(h func(http.ResponseWriter, *http.Request, *db.Project)) http.HandlerFunc
- func (api *Api) ApiKeys(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Application(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) ApplicationCategories(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Auth(h func(http.ResponseWriter, *http.Request, *db.User)) http.HandlerFunc
- func (api *Api) AuthInit(anonymousRole string, adminPassword string) error
- func (api *Api) ClickhouseConfig(w http.ResponseWriter, r *http.Request, project *db.Project)
- func (api *Api) ClickhouseConnect(w http.ResponseWriter, r *http.Request)
- func (api *Api) Cloud(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) CustomApplications(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) CustomCloudPricing(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Dashboards(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) GetClickhouseClient(project *db.Project, memberProjectId string) (*clickhouse.Client, error)
- func (api *Api) GetClickhouseClients(project *db.Project) (res clickhouse.Clients)
- func (api *Api) GetUser(r *http.Request) *db.User
- func (api *Api) Incident(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) IncidentRCA(ctx context.Context, project *db.Project, world *model.World, ...)
- func (api *Api) IncidentTimeContext(projectId db.ProjectId, incident *model.ApplicationIncident, ...) (timeseries.Time, timeseries.Time)
- func (api *Api) Incidents(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Inspection(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Inspections(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Instrumentation(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Integration(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Integrations(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) IsAllowed(u *db.User, actions ...rbac.Action) bool
- func (api *Api) LoadWorld(ctx context.Context, project *db.Project, from, to timeseries.Time) (*model.World, *cache.Status, error)
- func (api *Api) LoadWorldByRequest(r *http.Request) (*model.World, *db.Project, *cache.Status, error)
- func (api *Api) Login(w http.ResponseWriter, r *http.Request)
- func (api *Api) Logout(w http.ResponseWriter, r *http.Request)
- func (api *Api) Logs(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Node(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Overview(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) PanelData(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Profiling(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Project(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Prom(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) PrometheusLabelValues(w http.ResponseWriter, r *http.Request, project *db.Project)
- func (api *Api) PrometheusMetricMetadata(w http.ResponseWriter, r *http.Request, project *db.Project)
- func (api *Api) PrometheusQueryRange(w http.ResponseWriter, r *http.Request, project *db.Project)
- func (api *Api) PrometheusSeries(w http.ResponseWriter, r *http.Request, project *db.Project)
- func (api *Api) RCA(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Risks(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Roles(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) SSO(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) SetSessionCookie(w http.ResponseWriter, userId int, ttl time.Duration) error
- func (api *Api) Status(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Tracing(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) User(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) Users(w http.ResponseWriter, r *http.Request, u *db.User)
- func (api *Api) WithContext(p *db.Project, cacheStatus *cache.Status, w *model.World, data any) DataWithContext
- type Application
- type CloudIntegrationForm
- type Context
- type DataWithContext
- type KubeStateMetrics
- type License
- type LicenseManager
- type LoadWorldF
- type Node
- type NodeAgent
- type Prometheus
- type Search
- type Session
- type Status
Constants ¶
View Source
const ( AuthSecretSettingName = "auth_secret" HashFunc = crypto.SHA256 SessionCookieName = "coroot_session" SessionCookieTTL = 7 * 24 * time.Hour )
View Source
const (
MaxIncidentWindow = timeseries.Day
)
Variables ¶
This section is empty.
Functions ¶
func GetApplicationId ¶ added in v1.14.0
func GetApplicationId(r *http.Request) (model.ApplicationId, error)
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func NewApi ¶
func NewApi(cache *cache.Cache, db *db.DB, collector *collector.Collector, pricing *pricing.Manager, roles rbac.RoleManager, licenseMgr LicenseManager, globalClickHouse *db.IntegrationClickhouse, globalPrometheus *db.IntegrationPrometheus, deploymentUuid, instanceUuid string, loadWorld LoadWorldF) *Api
func (*Api) ApiKeyAuth ¶ added in v1.17.7
func (api *Api) ApiKeyAuth(h func(http.ResponseWriter, *http.Request, *db.Project)) http.HandlerFunc
func (*Api) Application ¶ added in v1.5.0
func (*Api) ApplicationCategories ¶ added in v1.10.0
func (*Api) Auth ¶ added in v1.5.0
func (api *Api) Auth(h func(http.ResponseWriter, *http.Request, *db.User)) http.HandlerFunc
func (*Api) ClickhouseConfig ¶ added in v1.17.7
func (*Api) ClickhouseConnect ¶ added in v1.17.7
func (api *Api) ClickhouseConnect(w http.ResponseWriter, r *http.Request)
func (*Api) CustomApplications ¶ added in v1.4.0
func (*Api) CustomCloudPricing ¶ added in v1.11.0
func (*Api) Dashboards ¶ added in v1.12.0
func (*Api) GetClickhouseClient ¶ added in v1.12.5
func (*Api) GetClickhouseClients ¶ added in v1.17.1
func (api *Api) GetClickhouseClients(project *db.Project) (res clickhouse.Clients)
func (*Api) IncidentRCA ¶ added in v1.14.0
func (*Api) IncidentTimeContext ¶ added in v1.14.0
func (api *Api) IncidentTimeContext(projectId db.ProjectId, incident *model.ApplicationIncident, now timeseries.Time) (timeseries.Time, timeseries.Time)
func (*Api) Inspection ¶ added in v1.5.0
func (*Api) Inspections ¶ added in v1.5.0
func (*Api) Instrumentation ¶ added in v1.3.0
func (*Api) Integration ¶
func (*Api) Integrations ¶
func (*Api) LoadWorldByRequest ¶ added in v1.5.0
func (*Api) PrometheusLabelValues ¶ added in v1.17.7
func (*Api) PrometheusMetricMetadata ¶ added in v1.17.7
func (*Api) PrometheusQueryRange ¶ added in v1.17.7
func (*Api) PrometheusSeries ¶ added in v1.17.7
func (*Api) SetSessionCookie ¶ added in v1.5.6
type Application ¶ added in v0.22.0
type Application struct {
Id model.ApplicationId `json:"id"`
Status model.Status `json:"status"`
}
type CloudIntegrationForm ¶ added in v1.14.0
type CloudIntegrationForm struct {
ApiKey string `json:"api_key"`
IncidentsAutoInvestigation bool `json:"incidents_auto_investigation"`
}
func (*CloudIntegrationForm) Valid ¶ added in v1.14.0
func (f *CloudIntegrationForm) Valid() bool
type Context ¶ added in v0.22.0
type Context struct {
Status Status `json:"status"`
Search Search `json:"search"`
Incidents map[model.ApplicationCategory]int `json:"incidents"`
Fluxcd bool `json:"fluxcd"`
License *License `json:"license,omitempty"`
Multicluster bool `json:"multicluster"`
MemberProjects []string `json:"member_projects,omitempty"`
}
type DataWithContext ¶ added in v1.5.0
type KubeStateMetrics ¶ added in v0.22.0
type LicenseManager ¶ added in v1.14.1
type LicenseManager interface {
CheckLicense() *License
}
type LoadWorldF ¶ added in v1.14.2
type Prometheus ¶ added in v0.22.0
type Search ¶ added in v0.22.0
type Search struct {
Applications []Application `json:"applications"`
Nodes []Node `json:"nodes"`
}
type Status ¶ added in v0.22.0
type Status struct {
Status model.Status `json:"status"`
Error string `json:"error"`
Prometheus Prometheus `json:"prometheus"`
NodeAgent NodeAgent `json:"node_agent"`
KubeStateMetrics *KubeStateMetrics `json:"kube_state_metrics"`
}
Click to show internal directories.
Click to hide internal directories.