feat: allow setting port share protocol (#12383)

Co-authored-by: Garrett Delfosse <garrett@coder.com>
This commit is contained in:
Dean Sheather
2024-03-06 09:23:57 -05:00
committed by GitHub
co-authored by Garrett Delfosse
parent 23ff807a27
commit 46a2ff1061
25 changed files with 624 additions and 130 deletions
+2
View File
@@ -57,6 +57,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \
{
"agent_name": "string",
"port": 0,
"protocol": "http",
"share_level": "owner"
}
```
@@ -76,6 +77,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \
{
"agent_name": "string",
"port": 0,
"protocol": "http",
"share_level": "owner",
"workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
}
+51 -11
View File
@@ -6613,17 +6613,29 @@ If the schedule is empty, the user will be updated to use the default schedule.|
{
"agent_name": "string",
"port": 0,
"protocol": "http",
"share_level": "owner"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------- | ------------------------------------------------------------------------------ | -------- | ------------ | ----------- |
| `agent_name` | string | false | | |
| `port` | integer | false | | |
| `share_level` | [codersdk.WorkspaceAgentPortShareLevel](#codersdkworkspaceagentportsharelevel) | false | | |
| Name | Type | Required | Restrictions | Description |
| ------------- | ------------------------------------------------------------------------------------ | -------- | ------------ | ----------- |
| `agent_name` | string | false | | |
| `port` | integer | false | | |
| `protocol` | [codersdk.WorkspaceAgentPortShareProtocol](#codersdkworkspaceagentportshareprotocol) | false | | |
| `share_level` | [codersdk.WorkspaceAgentPortShareLevel](#codersdkworkspaceagentportsharelevel) | false | | |
#### Enumerated Values
| Property | Value |
| ------------- | --------------- |
| `protocol` | `http` |
| `protocol` | `https` |
| `share_level` | `owner` |
| `share_level` | `authenticated` |
| `share_level` | `public` |
## codersdk.User
@@ -7579,6 +7591,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
{
"agent_name": "string",
"port": 0,
"protocol": "http",
"share_level": "owner",
"workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
}
@@ -7586,12 +7599,23 @@ If the schedule is empty, the user will be updated to use the default schedule.|
### Properties
| Name | Type | Required | Restrictions | Description |
| -------------- | ------------------------------------------------------------------------------ | -------- | ------------ | ----------- |
| `agent_name` | string | false | | |
| `port` | integer | false | | |
| `share_level` | [codersdk.WorkspaceAgentPortShareLevel](#codersdkworkspaceagentportsharelevel) | false | | |
| `workspace_id` | string | false | | |
| Name | Type | Required | Restrictions | Description |
| -------------- | ------------------------------------------------------------------------------------ | -------- | ------------ | ----------- |
| `agent_name` | string | false | | |
| `port` | integer | false | | |
| `protocol` | [codersdk.WorkspaceAgentPortShareProtocol](#codersdkworkspaceagentportshareprotocol) | false | | |
| `share_level` | [codersdk.WorkspaceAgentPortShareLevel](#codersdkworkspaceagentportsharelevel) | false | | |
| `workspace_id` | string | false | | |
#### Enumerated Values
| Property | Value |
| ------------- | --------------- |
| `protocol` | `http` |
| `protocol` | `https` |
| `share_level` | `owner` |
| `share_level` | `authenticated` |
| `share_level` | `public` |
## codersdk.WorkspaceAgentPortShareLevel
@@ -7609,6 +7633,21 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `authenticated` |
| `public` |
## codersdk.WorkspaceAgentPortShareProtocol
```json
"http"
```
### Properties
#### Enumerated Values
| Value |
| ------- |
| `http` |
| `https` |
## codersdk.WorkspaceAgentPortShares
```json
@@ -7617,6 +7656,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
{
"agent_name": "string",
"port": 0,
"protocol": "http",
"share_level": "owner",
"workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
}