Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions pkg/commands/compute/testdata/init/fastly-viceroy-update.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,14 @@ qux"""
[[local_server.object_store.store_two]]
key = "second"
path = "strings.json"

[local_server.secret_store]
store_one = [{key = "first", data = "This is some secret data"}, {key = "second", path = "/path/to/secret.json"}]

[[local_server.secret_store.store_two]]
key = "first"
data = "This is also some secret data"

[[local_server.secret_store.store_two]]
key = "second"
path = "/path/to/other/secret.json"
8 changes: 8 additions & 0 deletions pkg/manifest/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ type LocalServer struct {
Backends map[string]LocalBackend `toml:"backends"`
Dictionaries map[string]LocalDictionary `toml:"dictionaries,omitempty"`
ObjectStore map[string][]LocalObjectStore `toml:"object_store,omitempty"`
SecretStore map[string][]LocalSecretStore `toml:"secret_store,omitempty"`
}

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

// LocalSecretStore represents a secret_store to be mocked by the local testing server.
type LocalSecretStore struct {
Key string `toml:"key"`
Path string `toml:"path,omitempty"`
Data string `toml:"data,omitempty"`
}

// Exists yields whether the manifest exists.
//
// Specifically, it indicates that a toml.Unmarshal() of the toml disk content
Expand Down
11 changes: 11 additions & 0 deletions pkg/manifest/testdata/fastly-viceroy-update.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,14 @@ qux"""
[[local_server.object_store.store_two]]
key = "second"
path = "strings.json"

[local_server.secret_store]
store_one = [{key = "first", data = "This is some secret data"}, {key = "second", path = "/path/to/secret.json"}]

[[local_server.secret_store.store_two]]
key = "first"
data = "This is also some secret data"

[[local_server.secret_store.store_two]]
key = "second"
path = "/path/to/other/secret.json"