mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: manage health settings using Coder API (#10861)
This commit is contained in:
Generated
+2
-1
@@ -133,7 +133,8 @@ CREATE TYPE resource_type AS ENUM (
|
||||
'workspace_build',
|
||||
'license',
|
||||
'workspace_proxy',
|
||||
'convert_login'
|
||||
'convert_login',
|
||||
'health_settings'
|
||||
);
|
||||
|
||||
CREATE TYPE startup_script_behavior AS ENUM (
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
-- Nothing to do
|
||||
@@ -0,0 +1,2 @@
|
||||
-- This has to be outside a transaction
|
||||
ALTER TYPE resource_type ADD VALUE IF NOT EXISTS 'health_settings';
|
||||
@@ -1158,6 +1158,7 @@ const (
|
||||
ResourceTypeLicense ResourceType = "license"
|
||||
ResourceTypeWorkspaceProxy ResourceType = "workspace_proxy"
|
||||
ResourceTypeConvertLogin ResourceType = "convert_login"
|
||||
ResourceTypeHealthSettings ResourceType = "health_settings"
|
||||
)
|
||||
|
||||
func (e *ResourceType) Scan(src interface{}) error {
|
||||
@@ -1208,7 +1209,8 @@ func (e ResourceType) Valid() bool {
|
||||
ResourceTypeWorkspaceBuild,
|
||||
ResourceTypeLicense,
|
||||
ResourceTypeWorkspaceProxy,
|
||||
ResourceTypeConvertLogin:
|
||||
ResourceTypeConvertLogin,
|
||||
ResourceTypeHealthSettings:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -1228,6 +1230,7 @@ func AllResourceTypeValues() []ResourceType {
|
||||
ResourceTypeLicense,
|
||||
ResourceTypeWorkspaceProxy,
|
||||
ResourceTypeConvertLogin,
|
||||
ResourceTypeHealthSettings,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ type AuditOAuthConvertState struct {
|
||||
UserID uuid.UUID `db:"user_id" json:"user_id"`
|
||||
}
|
||||
|
||||
type HealthSettings struct {
|
||||
ID uuid.UUID `db:"id" json:"id"`
|
||||
DismissedHealthchecks []string `db:"dismissed_healthchecks" json:"dismissed_healthchecks"`
|
||||
}
|
||||
|
||||
type Actions []rbac.Action
|
||||
|
||||
func (a *Actions) Scan(src interface{}) error {
|
||||
|
||||
Reference in New Issue
Block a user