| 81 | } |
| 82 | |
| 83 | type Request struct { |
| 84 | AccessMethod AccessMethod `json:"access_method"` |
| 85 | // BasePath of the app. For path apps, this is the path prefix in the router |
| 86 | // for this particular app. For subdomain apps, this should be "/". This is |
| 87 | // used for setting the cookie path. |
| 88 | BasePath string `json:"base_path"` |
| 89 | // Prefix is the prefix of the subdomain app URL. Prefix should have a |
| 90 | // trailing "---" if set. |
| 91 | Prefix string `json:"app_prefix"` |
| 92 | |
| 93 | // For the following fields, if the AccessMethod is AccessMethodTerminal, |
| 94 | // then only AgentNameOrID may be set and it must be a UUID. The other |
| 95 | // fields must be left blank. |
| 96 | UsernameOrID string `json:"username_or_id"` |
| 97 | // WorkspaceAndAgent xor WorkspaceNameOrID are required. |
| 98 | WorkspaceAndAgent string `json:"-"` // "workspace" or "workspace.agent" |
| 99 | WorkspaceNameOrID string `json:"workspace_name_or_id"` |
| 100 | // AgentNameOrID is not required if the workspace has only one agent. |
| 101 | AgentNameOrID string `json:"agent_name_or_id"` |
| 102 | AppSlugOrPort string `json:"app_slug_or_port"` |
| 103 | } |
| 104 | |
| 105 | // Normalize replaces WorkspaceAndAgent with WorkspaceNameOrID and |
| 106 | // AgentNameOrID. This must be called before Validate. |
nothing calls this directly
no outgoing calls
no test coverage detected