feat: add regions endpoint for proxies feature (#7277)

* feat: add regions endpoint for proxies feature
This commit is contained in:
Dean Sheather
2023-04-25 07:37:52 -07:00
committed by GitHub
parent 6e8ff2d95c
commit a98341612c
13 changed files with 625 additions and 6 deletions

65
coderd/apidoc/docs.go generated
View File

@ -1727,6 +1727,31 @@ const docTemplate = `{
}
}
},
"/regions": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"WorkspaceProxies"
],
"summary": "Get site-wide regions for workspace connections",
"operationId": "get-site-wide-regions-for-workspace-connections",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.RegionsResponse"
}
}
}
}
},
"/replicas": {
"get": {
"security": [
@ -8316,6 +8341,46 @@ const docTemplate = `{
}
}
},
"codersdk.Region": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"healthy": {
"type": "boolean"
},
"icon_url": {
"type": "string"
},
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"path_app_url": {
"description": "PathAppURL is the URL to the base path for path apps. Optional\nunless wildcard_hostname is set.\nE.g. https://us.example.com",
"type": "string"
},
"wildcard_hostname": {
"description": "WildcardHostname is the wildcard hostname for subdomain apps.\nE.g. *.us.example.com\nE.g. *--suffix.au.example.com\nOptional. Does not need to be on the same domain as PathAppURL.",
"type": "string"
}
}
},
"codersdk.RegionsResponse": {
"type": "object",
"properties": {
"regions": {
"type": "array",
"items": {
"$ref": "#/definitions/codersdk.Region"
}
}
}
},
"codersdk.Replica": {
"type": "object",
"properties": {

View File

@ -1501,6 +1501,27 @@
}
}
},
"/regions": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": ["application/json"],
"tags": ["WorkspaceProxies"],
"summary": "Get site-wide regions for workspace connections",
"operationId": "get-site-wide-regions-for-workspace-connections",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.RegionsResponse"
}
}
}
}
},
"/replicas": {
"get": {
"security": [
@ -7455,6 +7476,46 @@
}
}
},
"codersdk.Region": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"healthy": {
"type": "boolean"
},
"icon_url": {
"type": "string"
},
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"path_app_url": {
"description": "PathAppURL is the URL to the base path for path apps. Optional\nunless wildcard_hostname is set.\nE.g. https://us.example.com",
"type": "string"
},
"wildcard_hostname": {
"description": "WildcardHostname is the wildcard hostname for subdomain apps.\nE.g. *.us.example.com\nE.g. *--suffix.au.example.com\nOptional. Does not need to be on the same domain as PathAppURL.",
"type": "string"
}
}
},
"codersdk.RegionsResponse": {
"type": "object",
"properties": {
"regions": {
"type": "array",
"items": {
"$ref": "#/definitions/codersdk.Region"
}
}
}
},
"codersdk.Replica": {
"type": "object",
"properties": {