PrimaryWorkspaceProxy returns the primary workspace proxy for the site.
(ctx context.Context)
| 50 | |
| 51 | // PrimaryWorkspaceProxy returns the primary workspace proxy for the site. |
| 52 | func (api *API) PrimaryWorkspaceProxy(ctx context.Context) (database.WorkspaceProxy, error) { |
| 53 | region, err := api.PrimaryRegion(ctx) |
| 54 | if err != nil { |
| 55 | return database.WorkspaceProxy{}, err |
| 56 | } |
| 57 | |
| 58 | // The default proxy is an edge case because these values are computed |
| 59 | // rather then being stored in the database. |
| 60 | return database.WorkspaceProxy{ |
| 61 | ID: region.ID, |
| 62 | Name: region.Name, |
| 63 | DisplayName: region.DisplayName, |
| 64 | Icon: region.IconURL, |
| 65 | Url: region.PathAppURL, |
| 66 | WildcardHostname: region.WildcardHostname, |
| 67 | Deleted: false, |
| 68 | }, nil |
| 69 | } |
| 70 | |
| 71 | // @Summary Get site-wide regions for workspace connections |
| 72 | // @ID get-site-wide-regions-for-workspace-connections |
no test coverage detected