Skip to content

Commit 8969f90

Browse files
committed
Add schema
1 parent c0b251a commit 8969f90

File tree

8 files changed

+23
-6
lines changed

8 files changed

+23
-6
lines changed

coderd/database/dump.sql

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/migrations/000087_external_app_url.down.sql

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE workspace_apps ADD COLUMN external boolean NOT NULL DEFAULT false;

coderd/database/models.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries.sql.go

+10-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/workspaceagents.go

+1
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ func convertApps(dbApps []database.WorkspaceApp) []codersdk.WorkspaceApp {
644644
for _, dbApp := range dbApps {
645645
apps = append(apps, codersdk.WorkspaceApp{
646646
ID: dbApp.ID,
647+
URL: dbApp.Url.String,
647648
Slug: dbApp.Slug,
648649
DisplayName: dbApp.DisplayName,
649650
Command: dbApp.Command.String,

codersdk/workspaceapps.go

+6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ const (
2323

2424
type WorkspaceApp struct {
2525
ID uuid.UUID `json:"id"`
26+
// URL is the address being proxied to inside the workspace.
27+
// If external is specified, this will be opened on the client.
28+
URL string `json:"url"`
29+
// External specifies whether the URL should be opened externally on
30+
// the client or not.
31+
External bool `json:"external"`
2632
// Slug is a unique identifier within the agent.
2733
Slug string `json:"slug"`
2834
// DisplayName is a friendly name for the app.

site/src/api/typesGenerated.ts

+2
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,8 @@ export interface WorkspaceAgentResourceMetadata {
894894
// From codersdk/workspaceapps.go
895895
export interface WorkspaceApp {
896896
readonly id: string
897+
readonly url: string
898+
readonly external: boolean
897899
readonly slug: string
898900
readonly display_name: string
899901
readonly command?: string

0 commit comments

Comments
 (0)