Skip to content

Commit a54058e

Browse files
committed
feat: add dynamic parameters websocket endpoint
1 parent 114ba45 commit a54058e

File tree

18 files changed

+2262
-362
lines changed

18 files changed

+2262
-362
lines changed

archive/fs/tar.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import (
99
"github.com/spf13/afero/tarfs"
1010
)
1111

12+
// FromTarReader creates a read-only in-memory FS
1213
func FromTarReader(r io.Reader) fs.FS {
1314
tr := tar.NewReader(r)
14-
tfs := tarfs.New(tr)
15-
rofs := afero.NewReadOnlyFs(tfs)
16-
return afero.NewIOFS(rofs)
15+
return afero.NewIOFS(tarfs.New(tr))
1716
}

coderd/apidoc/docs.go

Lines changed: 30 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 28 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/coderd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import (
4343

4444
"github.com/coder/coder/v2/coderd/cryptokeys"
4545
"github.com/coder/coder/v2/coderd/entitlements"
46+
"github.com/coder/coder/v2/coderd/files"
4647
"github.com/coder/coder/v2/coderd/idpsync"
4748
"github.com/coder/coder/v2/coderd/runtimeconfig"
4849
"github.com/coder/coder/v2/coderd/webpush"
@@ -549,6 +550,7 @@ func New(options *Options) *API {
549550
TemplateScheduleStore: options.TemplateScheduleStore,
550551
UserQuietHoursScheduleStore: options.UserQuietHoursScheduleStore,
551552
AccessControlStore: options.AccessControlStore,
553+
FileCache: files.NewFromStore(options.Database),
552554
Experiments: experiments,
553555
WebpushDispatcher: options.WebPushDispatcher,
554556
healthCheckGroup: &singleflight.Group[string, *healthsdk.HealthcheckReport]{},
@@ -1088,6 +1090,7 @@ func New(options *Options) *API {
10881090
// The idea is to return an empty [], so that the coder CLI won't get blocked accidentally.
10891091
r.Get("/schema", templateVersionSchemaDeprecated)
10901092
r.Get("/parameters", templateVersionParametersDeprecated)
1093+
r.Get("/dynamic-parameters", api.templateVersionDynamicParameters)
10911094
r.Get("/rich-parameters", api.templateVersionRichParameters)
10921095
r.Get("/external-auth", api.templateVersionExternalAuth)
10931096
r.Get("/variables", api.templateVersionVariables)
@@ -1527,6 +1530,7 @@ type API struct {
15271530
// passed to dbauthz.
15281531
AccessControlStore *atomic.Pointer[dbauthz.AccessControlStore]
15291532
PortSharer atomic.Pointer[portsharing.PortSharer]
1533+
FileCache files.Cache
15301534

15311535
UpdatesProvider tailnet.WorkspaceUpdatesProvider
15321536

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy