@@ -12,7 +12,7 @@ import (
1212// This is an interface to allow for mocking of coder-sdk client usage.
1313type Client interface {
1414 // PushActivity pushes CLI activity to Coder.
15- PushActivity (ctx context.Context , source , envID string ) error
15+ PushActivity (ctx context.Context , source , workspaceID string ) error
1616
1717 // Me gets the details of the authenticated user.
1818 Me (ctx context.Context ) (* User , error )
@@ -66,75 +66,75 @@ type Client interface {
6666 SiteConfigWorkspaces (ctx context.Context ) (* ConfigWorkspaces , error )
6767
6868 // DeleteDevURL deletes the specified devurl.
69- DeleteDevURL (ctx context.Context , envID , urlID string ) error
69+ DeleteDevURL (ctx context.Context , workspaceID , urlID string ) error
7070
7171 // 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
7373
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 )
7676
7777 // 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
7979
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 )
8282
8383 // ParseTemplate parses a template config. It support both remote repositories and local files.
8484 // If a local file is specified then all other values in the request are ignored.
8585 ParseTemplate (ctx context.Context , req ParseTemplateRequest ) (* TemplateVersion , error )
8686
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 )
8989
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 )
9292
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 )
9595
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
9898
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
101101
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
104104
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
107107
108- // DialWsep dials an environments command execution interface
108+ // DialWsep dials a workspace's command execution interface
109109 // 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 )
111111
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 )
114114
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 )
117117
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 )
120120
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 )
123123
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 )
126126
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 )
129129
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
132132
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 )
135135
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 )
138138
139139 // ImportImage creates a new image and optionally a new registry.
140140 ImportImage (ctx context.Context , req ImportImageReq ) (* Image , error )
0 commit comments