@@ -9,19 +9,19 @@ import (
9
9
10
10
// WorkspaceProvider defines an entity capable of deploying and acting as an ingress for Coder environments.
11
11
type WorkspaceProvider struct {
12
- ID string `json:"id" table:"-"`
13
- Name string `json:"name" table:"Name"`
14
- Status WorkspaceProviderStatus `json:"status" table:"Status"`
15
- Local bool `json:"local" table:"-"`
16
- ClusterAddress string `json:"cluster_address" table:"Cluster Address "`
17
- DefaultNamespace string `json:"default_namespace" table:"Namespace"`
18
- StorageClass string `json:"storage_class" table:"Storage Class "`
19
- ClusterDomainSuffix string `json:"cluster_domain_suffix" table:"Cluster Domain Suffix "`
20
- EnvproxyAccessURL string `json:"envproxy_access_url" validate:"required" table:"Access URL "`
21
- DevurlHost string `json:"devurl_host" table:"Devurl Host "`
22
- SSHEnabled bool `json:"ssh_enabled" table:"SSH Enabled "`
23
- NamespaceWhitelist []string `json:"namespace_whitelist" table:"Namespace Allowlist "`
24
- OrgWhitelist []string `json:"org_whitelist" table:"-"`
12
+ ID string `json:"id" table:"-"`
13
+ Name string `json:"name" table:"Name"`
14
+ Status WorkspaceProviderStatus `json:"status" table:"Status"`
15
+ Local bool `json:"local" table:"-"`
16
+ ClusterAddress string `json:"cluster_address" table:"ClusterAddress "`
17
+ DefaultNamespace string `json:"default_namespace" table:"Namespace"`
18
+ StorageClass string `json:"storage_class" table:"StorageClass "`
19
+ ClusterDomainSuffix string `json:"cluster_domain_suffix" table:"ClusterDomainSuffix "`
20
+ EnvproxyAccessURL string `json:"envproxy_access_url" table:"AccessURL" validate:"required "`
21
+ DevurlHost string `json:"devurl_host" table:"DevurlHost "`
22
+ SSHEnabled bool `json:"ssh_enabled" table:"SSHEnabled "`
23
+ NamespaceWhitelist []string `json:"namespace_whitelist" table:"NamespaceAllowlist "`
24
+ OrgWhitelist []string `json:"org_whitelist" table:"-"`
25
25
}
26
26
27
27
// WorkspaceProviderStatus represents the configuration state of a workspace provider.
@@ -60,9 +60,9 @@ type CreateWorkspaceProviderReq struct {
60
60
61
61
// CreateWorkspaceProviderRes defines the response from creating a new workspace provider entity.
62
62
type CreateWorkspaceProviderRes struct {
63
- ID string `json:"id" table:"ID"`
64
- Name string `json:"name" table:"Name"`
65
- Status WorkspaceProviderStatus `json:"status" table:"Status"`
63
+ ID string `json:"id" table:"ID"`
64
+ Name string `json:"name" table:"Name"`
65
+ Status WorkspaceProviderStatus `json:"status" table:"Status"`
66
66
EnvproxyToken string `json:"envproxy_token" table:"Envproxy Token"`
67
67
}
68
68
@@ -90,7 +90,7 @@ func (c *Client) DeleteWorkspaceProviderByName(ctx context.Context, name string)
90
90
}
91
91
}
92
92
if id == "" {
93
- return xerrors . Errorf ( `no workspace provider found by name "%s"` , name )
93
+ return ErrNotFound
94
94
}
95
95
96
96
return c .requestBody (ctx , http .MethodDelete , "/api/private/resource-pools/" + id , nil , nil )
0 commit comments