github.com/fastly/cli@v1.7.2-0.20240304164155-9d0f1d77c3bf/pkg/manifest/local_server.go (about)

     1  package manifest
     2  
     3  // LocalServer represents a list of mocked Viceroy resources.
     4  type LocalServer struct {
     5  	Backends       map[string]LocalBackend       `toml:"backends"`
     6  	ConfigStores   map[string]LocalConfigStore   `toml:"config_stores,omitempty"`
     7  	KVStores       map[string][]LocalKVStore     `toml:"kv_stores,omitempty"`
     8  	SecretStores   map[string][]LocalSecretStore `toml:"secret_stores,omitempty"`
     9  	ViceroyVersion string                        `toml:"viceroy_version,omitempty"`
    10  }
    11  
    12  // LocalBackend represents a backend to be mocked by the local testing server.
    13  type LocalBackend struct {
    14  	URL          string `toml:"url"`
    15  	OverrideHost string `toml:"override_host,omitempty"`
    16  	CertHost     string `toml:"cert_host,omitempty"`
    17  	UseSNI       bool   `toml:"use_sni,omitempty"`
    18  }
    19  
    20  // LocalConfigStore represents a config store to be mocked by the local testing server.
    21  type LocalConfigStore struct {
    22  	File     string            `toml:"file,omitempty"`
    23  	Format   string            `toml:"format"`
    24  	Contents map[string]string `toml:"contents,omitempty"`
    25  }
    26  
    27  // LocalKVStore represents an kv_store to be mocked by the local testing server.
    28  type LocalKVStore struct {
    29  	Key  string `toml:"key"`
    30  	File string `toml:"file,omitempty"`
    31  	Data string `toml:"data,omitempty"`
    32  }
    33  
    34  // LocalSecretStore represents a secret_store to be mocked by the local testing server.
    35  type LocalSecretStore struct {
    36  	Key  string `toml:"key"`
    37  	File string `toml:"file,omitempty"`
    38  	Data string `toml:"data,omitempty"`
    39  }