Skip to content

Commit 87e8d61

Browse files
committed
Manager interface
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 355afdc commit 87e8d61

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

coderd/runtimeconfig/spec.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,26 @@ type Mutator interface {
1919
// DeleteRuntimeSetting deletes a runtime setting by name.
2020
DeleteRuntimeSetting(ctx context.Context, name string) error
2121
}
22+
23+
type Manager interface {
24+
Resolver
25+
Mutator
26+
}
27+
28+
type NoopManager struct {}
29+
30+
func NewNoopManager() *NoopManager {
31+
return &NoopManager{}
32+
}
33+
34+
func (n NoopManager) GetRuntimeSetting(context.Context, string) (string, error) {
35+
return "", EntryNotFound
36+
}
37+
38+
func (n NoopManager) UpsertRuntimeSetting(context.Context, string, string) error {
39+
return EntryNotFound
40+
}
41+
42+
func (n NoopManager) DeleteRuntimeSetting(context.Context, string) error {
43+
return EntryNotFound
44+
}

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