Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit d96c4f2

Browse files
committed
fixup! Add commands for workspace providers
1 parent 562619b commit d96c4f2

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

coder-sdk/workspace_providers.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ import (
99

1010
// WorkspaceProvider defines an entity capable of deploying and acting as an ingress for Coder environments.
1111
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:"-"`
2525
}
2626

2727
// WorkspaceProviderStatus represents the configuration state of a workspace provider.
@@ -60,9 +60,9 @@ type CreateWorkspaceProviderReq struct {
6060

6161
// CreateWorkspaceProviderRes defines the response from creating a new workspace provider entity.
6262
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"`
6666
EnvproxyToken string `json:"envproxy_token" table:"Envproxy Token"`
6767
}
6868

@@ -90,7 +90,7 @@ func (c *Client) DeleteWorkspaceProviderByName(ctx context.Context, name string)
9090
}
9191
}
9292
if id == "" {
93-
return xerrors.Errorf(`no workspace provider found by name "%s"`, name)
93+
return ErrNotFound
9494
}
9595

9696
return c.requestBody(ctx, http.MethodDelete, "/api/private/resource-pools/"+id, nil, nil)

0 commit comments

Comments
 (0)