@@ -12,7 +12,7 @@ import (
12
12
// This is an interface to allow for mocking of coder-sdk client usage.
13
13
type Client interface {
14
14
// PushActivity pushes CLI activity to Coder.
15
- PushActivity (ctx context.Context , source , envID string ) error
15
+ PushActivity (ctx context.Context , source , workspaceID string ) error
16
16
17
17
// Me gets the details of the authenticated user.
18
18
Me (ctx context.Context ) (* User , error )
@@ -66,75 +66,75 @@ type Client interface {
66
66
SiteConfigWorkspaces (ctx context.Context ) (* ConfigWorkspaces , error )
67
67
68
68
// DeleteDevURL deletes the specified devurl.
69
- DeleteDevURL (ctx context.Context , envID , urlID string ) error
69
+ DeleteDevURL (ctx context.Context , workspaceID , urlID string ) error
70
70
71
71
// CreateDevURL inserts a new devurl for the authenticated user.
72
- CreateDevURL (ctx context.Context , envID string , req CreateDevURLReq ) error
72
+ CreateDevURL (ctx context.Context , workspaceID string , req CreateDevURLReq ) error
73
73
74
- // DevURLs fetches the Dev URLs for a given environment .
75
- DevURLs (ctx context.Context , envID string ) ([]DevURL , error )
74
+ // DevURLs fetches the Dev URLs for a given workspace .
75
+ DevURLs (ctx context.Context , workspaceID string ) ([]DevURL , error )
76
76
77
77
// PutDevURL updates an existing devurl for the authenticated user.
78
- PutDevURL (ctx context.Context , envID , urlID string , req PutDevURLReq ) error
78
+ PutDevURL (ctx context.Context , workspaceID , urlID string , req PutDevURLReq ) error
79
79
80
- // CreateEnvironment sends a request to create an environment .
81
- CreateEnvironment (ctx context.Context , req CreateEnvironmentRequest ) (* Environment , error )
80
+ // CreateWorkspace sends a request to create a workspace .
81
+ CreateWorkspace (ctx context.Context , req CreateWorkspaceRequest ) (* Workspace , error )
82
82
83
83
// ParseTemplate parses a template config. It support both remote repositories and local files.
84
84
// If a local file is specified then all other values in the request are ignored.
85
85
ParseTemplate (ctx context.Context , req ParseTemplateRequest ) (* TemplateVersion , error )
86
86
87
- // CreateEnvironmentFromRepo sends a request to create an environment from a repository.
88
- CreateEnvironmentFromRepo (ctx context.Context , orgID string , req TemplateVersion ) (* Environment , error )
87
+ // CreateWorkspaceFromRepo sends a request to create a workspace from a repository.
88
+ CreateWorkspaceFromRepo (ctx context.Context , orgID string , req TemplateVersion ) (* Workspace , error )
89
89
90
- // Environments lists environments returned by the given filter.
91
- Environments (ctx context.Context ) ([]Environment , error )
90
+ // Workspaces lists workspaces returned by the given filter.
91
+ Workspaces (ctx context.Context ) ([]Workspace , error )
92
92
93
- // UserEnvironmentsByOrganization gets the list of environments owned by the given user.
94
- UserEnvironmentsByOrganization (ctx context.Context , userID , orgID string ) ([]Environment , error )
93
+ // UserWorkspacesByOrganization gets the list of workspaces owned by the given user.
94
+ UserWorkspacesByOrganization (ctx context.Context , userID , orgID string ) ([]Workspace , error )
95
95
96
- // DeleteEnvironment deletes the environment .
97
- DeleteEnvironment (ctx context.Context , envID string ) error
96
+ // DeleteWorkspace deletes the workspace .
97
+ DeleteWorkspace (ctx context.Context , workspaceID string ) error
98
98
99
- // StopEnvironment stops the environment .
100
- StopEnvironment (ctx context.Context , envID string ) error
99
+ // StopWorkspace stops the workspace .
100
+ StopWorkspace (ctx context.Context , workspaceID string ) error
101
101
102
- // RebuildEnvironment requests that the given envID is rebuilt with no changes to its specification.
103
- RebuildEnvironment (ctx context.Context , envID string ) error
102
+ // RebuildWorkspace requests that the given workspaceID is rebuilt with no changes to its specification.
103
+ RebuildWorkspace (ctx context.Context , workspaceID string ) error
104
104
105
- // EditEnvironment modifies the environment specification and initiates a rebuild.
106
- EditEnvironment (ctx context.Context , envID string , req UpdateEnvironmentReq ) error
105
+ // EditWorkspace modifies the workspace specification and initiates a rebuild.
106
+ EditWorkspace (ctx context.Context , workspaceID string , req UpdateWorkspaceReq ) error
107
107
108
- // DialWsep dials an environments command execution interface
108
+ // DialWsep dials a workspace's command execution interface
109
109
// See https://github.com/cdr/wsep for details.
110
- DialWsep (ctx context.Context , baseURL * url.URL , envID string ) (* websocket.Conn , error )
110
+ DialWsep (ctx context.Context , baseURL * url.URL , workspaceID string ) (* websocket.Conn , error )
111
111
112
- // DialExecutor gives a remote execution interface for performing commands inside an environment .
113
- DialExecutor (ctx context.Context , baseURL * url.URL , envID string ) (wsep.Execer , error )
112
+ // DialExecutor gives a remote execution interface for performing commands inside a workspace .
113
+ DialExecutor (ctx context.Context , baseURL * url.URL , workspaceID string ) (wsep.Execer , error )
114
114
115
- // DialIDEStatus opens a websocket connection for cpu load metrics on the environment .
116
- DialIDEStatus (ctx context.Context , baseURL * url.URL , envID string ) (* websocket.Conn , error )
115
+ // DialIDEStatus opens a websocket connection for cpu load metrics on the workspace .
116
+ DialIDEStatus (ctx context.Context , baseURL * url.URL , workspaceID string ) (* websocket.Conn , error )
117
117
118
- // DialEnvironmentBuildLog opens a websocket connection for the environment build log messages.
119
- DialEnvironmentBuildLog (ctx context.Context , envID string ) (* websocket.Conn , error )
118
+ // DialWorkspaceBuildLog opens a websocket connection for the workspace build log messages.
119
+ DialWorkspaceBuildLog (ctx context.Context , workspaceID string ) (* websocket.Conn , error )
120
120
121
- // FollowEnvironmentBuildLog trails the build log of a Coder environment .
122
- FollowEnvironmentBuildLog (ctx context.Context , envID string ) (<- chan BuildLogFollowMsg , error )
121
+ // FollowWorkspaceBuildLog trails the build log of a Coder workspace .
122
+ FollowWorkspaceBuildLog (ctx context.Context , workspaceID string ) (<- chan BuildLogFollowMsg , error )
123
123
124
- // DialEnvironmentStats opens a websocket connection for environment stats.
125
- DialEnvironmentStats (ctx context.Context , envID string ) (* websocket.Conn , error )
124
+ // DialWorkspaceStats opens a websocket connection for workspace stats.
125
+ DialWorkspaceStats (ctx context.Context , workspaceID string ) (* websocket.Conn , error )
126
126
127
- // DialResourceLoad opens a websocket connection for cpu load metrics on the environment .
128
- DialResourceLoad (ctx context.Context , envID string ) (* websocket.Conn , error )
127
+ // DialResourceLoad opens a websocket connection for cpu load metrics on the workspace .
128
+ DialResourceLoad (ctx context.Context , workspaceID string ) (* websocket.Conn , error )
129
129
130
- // WaitForEnvironmentReady will watch the build log and return when done.
131
- WaitForEnvironmentReady (ctx context.Context , envID string ) error
130
+ // WaitForWorkspaceReady will watch the build log and return when done.
131
+ WaitForWorkspaceReady (ctx context.Context , workspaceID string ) error
132
132
133
- // EnvironmentByID get the details of an environment by its id.
134
- EnvironmentByID (ctx context.Context , id string ) (* Environment , error )
133
+ // WorkspaceByID get the details of a workspace by its id.
134
+ WorkspaceByID (ctx context.Context , id string ) (* Workspace , error )
135
135
136
- // EnvironmentsByWorkspaceProvider returns environments that belong to a particular workspace provider.
137
- EnvironmentsByWorkspaceProvider (ctx context.Context , wpID string ) ([]Environment , error )
136
+ // WorkspacesByWorkspaceProvider returns workspaces that belong to a particular workspace provider.
137
+ WorkspacesByWorkspaceProvider (ctx context.Context , wpID string ) ([]Workspace , error )
138
138
139
139
// ImportImage creates a new image and optionally a new registry.
140
140
ImportImage (ctx context.Context , req ImportImageReq ) (* Image , error )
0 commit comments