Skip to content

Commit 419a843

Browse files
Add support for TOML secret_store section
Viceroy is being updated with a new `local_server.secret_store` configuration section. Viceroy change: fastly/Viceroy#210 This change adds support for the new Secret Store configuration section. Related change: #717
1 parent b10aa45 commit 419a843

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

pkg/manifest/manifest.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ type LocalServer struct {
252252
Backends map[string]LocalBackend `toml:"backends"`
253253
Dictionaries map[string]LocalDictionary `toml:"dictionaries,omitempty"`
254254
ObjectStore map[string][]LocalObjectStore `toml:"object_store,omitempty"`
255+
SecretStore map[string][]LocalSecretStore `toml:"secret_store,omitempty"`
255256
}
256257

257258
// LocalBackend represents a backend to be mocked by the local testing server.
@@ -276,6 +277,13 @@ type LocalObjectStore struct {
276277
Data string `toml:"data,omitempty"`
277278
}
278279

280+
// LocalSecretStore represents a secret_store to be mocked by the local testing server.
281+
type LocalSecretStore struct {
282+
Key string `toml:"key"`
283+
Path string `toml:"path,omitempty"`
284+
Data string `toml:"data,omitempty"`
285+
}
286+
279287
// Exists yields whether the manifest exists.
280288
//
281289
// Specifically, it indicates that a toml.Unmarshal() of the toml disk content

pkg/manifest/testdata/fastly-viceroy-update.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,14 @@ qux"""
4545
[[local_server.object_store.store_two]]
4646
key = "second"
4747
path = "strings.json"
48+
49+
[local_server.secret_store]
50+
store_one = [{key = "first", data = "This is some secret data"}, {key = "second", path = "/path/to/secret.json"}]
51+
52+
[[local_server.secret_store.store_two]]
53+
key = "first"
54+
data = "This is also some secret data"
55+
56+
[[local_server.secret_store.store_two]]
57+
key = "second"
58+
path = "/path/to/other/secret.json"

0 commit comments

Comments
 (0)