@@ -19,15 +19,15 @@ func NewNoopResolver() *NoopResolver {
19
19
return & NoopResolver {}
20
20
}
21
21
22
- func (NoopResolver ) GetRuntimeSetting (context.Context , string ) (string , error ) {
22
+ func (NoopResolver ) GetRuntimeConfig (context.Context , string ) (string , error ) {
23
23
return "" , ErrEntryNotFound
24
24
}
25
25
26
- func (NoopResolver ) UpsertRuntimeSetting (context.Context , string , string ) error {
26
+ func (NoopResolver ) UpsertRuntimeConfig (context.Context , string , string ) error {
27
27
return ErrEntryNotFound
28
28
}
29
29
30
- func (NoopResolver ) DeleteRuntimeSetting (context.Context , string ) error {
30
+ func (NoopResolver ) DeleteRuntimeConfig (context.Context , string ) error {
31
31
return ErrEntryNotFound
32
32
}
33
33
@@ -40,7 +40,7 @@ func NewStoreResolver(db Store) *StoreResolver {
40
40
return & StoreResolver {db : db }
41
41
}
42
42
43
- func (m StoreResolver ) GetRuntimeSetting (ctx context.Context , key string ) (string , error ) {
43
+ func (m StoreResolver ) GetRuntimeConfig (ctx context.Context , key string ) (string , error ) {
44
44
val , err := m .db .GetRuntimeConfig (ctx , key )
45
45
if err != nil {
46
46
if errors .Is (err , sql .ErrNoRows ) {
@@ -52,15 +52,15 @@ func (m StoreResolver) GetRuntimeSetting(ctx context.Context, key string) (strin
52
52
return val , nil
53
53
}
54
54
55
- func (m StoreResolver ) UpsertRuntimeSetting (ctx context.Context , key , val string ) error {
55
+ func (m StoreResolver ) UpsertRuntimeConfig (ctx context.Context , key , val string ) error {
56
56
err := m .db .UpsertRuntimeConfig (ctx , database.UpsertRuntimeConfigParams {Key : key , Value : val })
57
57
if err != nil {
58
58
return xerrors .Errorf ("update %q: %w" , key , err )
59
59
}
60
60
return nil
61
61
}
62
62
63
- func (m StoreResolver ) DeleteRuntimeSetting (ctx context.Context , key string ) error {
63
+ func (m StoreResolver ) DeleteRuntimeConfig (ctx context.Context , key string ) error {
64
64
return m .db .DeleteRuntimeConfig (ctx , key )
65
65
}
66
66
@@ -75,16 +75,16 @@ func OrganizationResolver(orgID uuid.UUID, wrapped Resolver) NamespacedResolver
75
75
return NamespacedResolver {ns : orgID .String (), wrapped : wrapped }
76
76
}
77
77
78
- func (m NamespacedResolver ) GetRuntimeSetting (ctx context.Context , key string ) (string , error ) {
79
- return m .wrapped .GetRuntimeSetting (ctx , m .namespacedKey (key ))
78
+ func (m NamespacedResolver ) GetRuntimeConfig (ctx context.Context , key string ) (string , error ) {
79
+ return m .wrapped .GetRuntimeConfig (ctx , m .namespacedKey (key ))
80
80
}
81
81
82
- func (m NamespacedResolver ) UpsertRuntimeSetting (ctx context.Context , key , val string ) error {
83
- return m .wrapped .UpsertRuntimeSetting (ctx , m .namespacedKey (key ), val )
82
+ func (m NamespacedResolver ) UpsertRuntimeConfig (ctx context.Context , key , val string ) error {
83
+ return m .wrapped .UpsertRuntimeConfig (ctx , m .namespacedKey (key ), val )
84
84
}
85
85
86
- func (m NamespacedResolver ) DeleteRuntimeSetting (ctx context.Context , key string ) error {
87
- return m .wrapped .DeleteRuntimeSetting (ctx , m .namespacedKey (key ))
86
+ func (m NamespacedResolver ) DeleteRuntimeConfig (ctx context.Context , key string ) error {
87
+ return m .wrapped .DeleteRuntimeConfig (ctx , m .namespacedKey (key ))
88
88
}
89
89
90
90
func (m NamespacedResolver ) namespacedKey (k string ) string {
0 commit comments