Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

coderd: autostart: codersdk, http api, database plumbing#879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 16 commits intomainfromcj/autostart_dbschema
Apr 7, 2022
Merged
Changes from1 commit
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
1438444
feat: add columns autostart_schedule, autostop_schedule to database s…
johnstcnApr 4, 2022
400a787
feat: database: add UpdateWorkspaceAutostart and UpdateWorkspaceAutos…
johnstcnApr 4, 2022
c581615
fix: sqlc generate
johnstcnApr 5, 2022
9a3b186
fix: databasefake: implement now-missing AutoStop/AutoStart methods
johnstcnApr 5, 2022
6fa386d
feat: add AutostartSchedule/AutostopSchedule to api workspace struct
johnstcnApr 5, 2022
f6895b7
feat: implement update workspace autostart
johnstcnApr 5, 2022
1884766
refactor: make test table-driven
johnstcnApr 5, 2022
9854f9b
fix: autostart: add more test cases
johnstcnApr 5, 2022
270af35
fix: autostart: ensure we handle DST changes properly
johnstcnApr 5, 2022
ff80571
fix: coderd: add test for nonexistent workspace
johnstcnApr 5, 2022
3b4664c
fix: codersdk: add documentation for UpdateWorkspaceAutostartRequest …
johnstcnApr 5, 2022
ccd67cc
fix: appease the linter gods
johnstcnApr 5, 2022
316501d
fix: address PR comments
johnstcnApr 6, 2022
3037d98
fix: workspaces_test.go: missed project -> template after rebase
johnstcnApr 6, 2022
4a7e6eb
fix: bump migration
johnstcnApr 6, 2022
be0e6f3
feat: implement autostop database/http/api plumbing
johnstcnApr 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
fix: codersdk: add documentation for UpdateWorkspaceAutostartRequest …
…/ UpdateWorkspaceAutostart
  • Loading branch information
@johnstcn
johnstcn committedApr 6, 2022
commit3b4664cc8e8bf6a0e2e447cfa6770f2aba2c58d0
3 changes: 3 additions & 0 deletionscodersdk/workspaces.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,10 +90,13 @@ func (c *Client) WorkspaceBuildByName(ctx context.Context, workspace uuid.UUID,
return workspaceBuild, json.NewDecoder(res.Body).Decode(&workspaceBuild)
}

// UpdateWorkspaceAutostartRequest is a request to update a workspace's autostart schedule.
type UpdateWorkspaceAutostartRequest struct {
Schedule string
}

// UpdateWorkspaceAutostart sets the autostart schedule for workspace by id.
// If the provided schedule is empty, autostart is disabled for the workspace.
func (c *Client) UpdateWorkspaceAutostart(ctx context.Context, id uuid.UUID, req UpdateWorkspaceAutostartRequest) error {
path := fmt.Sprintf("/api/v2/workspaces/%s/autostart", id.String())
res, err := c.request(ctx, http.MethodPut, path, req)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp