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
18 changes: 9 additions & 9 deletions pkg/commands/compute/testdata/init/fastly-viceroy-update.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@ name = "Default Rust template"
baz = """
qux"""

[local_server.object_store]
[local_server.object_stores]
store_one = [{key = "first", data = "This is some data"}, {key = "second", path = "strings.json"}]

[[local_server.object_store.store_two]]
[[local_server.object_stores.store_two]]
key = "first"
data = "This is some data"

[[local_server.object_store.store_two]]
[[local_server.object_stores.store_two]]
key = "second"
path = "strings.json"
file = "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_stores]
store_one = [{key = "first", data = "This is some secret data"}, {key = "second", file = "/path/to/secret.json"}]

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

[[local_server.secret_store.store_two]]
[[local_server.secret_stores.store_two]]
key = "second"
path = "/path/to/other/secret.json"
file = "/path/to/other/secret.json"
8 changes: 4 additions & 4 deletions pkg/manifest/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ type SetupObjectStoreItems struct {
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"`
ObjectStores map[string][]LocalObjectStore `toml:"object_stores,omitempty"`
SecretStores map[string][]LocalSecretStore `toml:"secret_stores,omitempty"`
}

// LocalBackend represents a backend to be mocked by the local testing server.
Expand All @@ -286,14 +286,14 @@ type LocalDictionary struct {
// LocalObjectStore represents an object_store to be mocked by the local testing server.
type LocalObjectStore struct {
Key string `toml:"key"`
Path string `toml:"path,omitempty"`
File string `toml:"file,omitempty"`
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"`
File string `toml:"file,omitempty"`
Data string `toml:"data,omitempty"`
}

Expand Down
20 changes: 10 additions & 10 deletions pkg/manifest/testdata/fastly-viceroy-update.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@ name = "Default Rust template"
baz = """
qux"""

[local_server.object_store]
store_one = [{key = "first", data = "This is some data"}, {key = "second", path = "strings.json"}]
[local_server.object_stores]
store_one = [{key = "first", data = "This is some data"}, {key = "second", file = "strings.json"}]

[[local_server.object_store.store_two]]
[[local_server.object_stores.store_two]]
key = "first"
data = "This is some data"

[[local_server.object_store.store_two]]
[[local_server.object_stores.store_two]]
key = "second"
path = "strings.json"
file = "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_stores]
store_one = [{key = "first", data = "This is some secret data"}, {key = "second", file = "/path/to/secret.json"}]

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

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