mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix(site/src/api/typesGenerated): generate HealthSection enums (#11049)
Relates to #8971 - Introduces a codersdk.HealthSection enum type - Refactors existing references using strings to use new HealthSection type
This commit is contained in:
@ -8,12 +8,31 @@ import (
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type HealthSection string
|
||||
|
||||
// If you add another const below, make sure to add it to HealthSections!
|
||||
const (
|
||||
HealthSectionDERP HealthSection = "DERP"
|
||||
HealthSectionAccessURL HealthSection = "AccessURL"
|
||||
HealthSectionWebsocket HealthSection = "Websocket"
|
||||
HealthSectionDatabase HealthSection = "Database"
|
||||
HealthSectionWorkspaceProxy HealthSection = "WorkspaceProxy"
|
||||
)
|
||||
|
||||
var HealthSections = []HealthSection{
|
||||
HealthSectionDERP,
|
||||
HealthSectionAccessURL,
|
||||
HealthSectionWebsocket,
|
||||
HealthSectionDatabase,
|
||||
HealthSectionWorkspaceProxy,
|
||||
}
|
||||
|
||||
type HealthSettings struct {
|
||||
DismissedHealthchecks []string `json:"dismissed_healthchecks"`
|
||||
DismissedHealthchecks []HealthSection `json:"dismissed_healthchecks"`
|
||||
}
|
||||
|
||||
type UpdateHealthSettings struct {
|
||||
DismissedHealthchecks []string `json:"dismissed_healthchecks"`
|
||||
DismissedHealthchecks []HealthSection `json:"dismissed_healthchecks"`
|
||||
}
|
||||
|
||||
func (c *Client) HealthSettings(ctx context.Context) (HealthSettings, error) {
|
||||
|
Reference in New Issue
Block a user