Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAConfig ¶
type CAConfig struct {
// Cert is the PEM encoded certificate.
Cert string `json:"cert"`
// PrivateKey is the PEM encoded private key.
PrivateKey string `json:"private_key"`
}
CAConfig is the paths to the Certificate Authority key pair.
type Config ¶
type Config struct {
// Storage is the storage configuration(s).
Storage []*StorageConfig `json:"storage"`
// Address is the address for the proxy server to listen on.
Address string `json:"address"`
// Hosts is a list of hosts that are allowed to be recorded and played back.
Hosts []string `json:"hosts"`
// CAConfig is the paths to the Certificate Authority key pair.
CAConfig CAConfig `json:"ca_keypair"`
}
Config is the configuration for the proxy.
func LoadConfig ¶
LoadConfig loads the configuration from a JSON file path.
type StorageConfig ¶
type StorageConfig struct {
// Type is the type of storage.
Type StorageType `json:"type"`
// Path is the path to the storage file (valid for HAR and OpenAPI).
Path string `json:"path"`
}
StorageConfig defines the storage configuration for the proxy.
type StorageType ¶
type StorageType string
StorageType defines the type of storage used by the proxy.
const ( // StorageTypeHAR is the HAR file storage type. StorageTypeHAR StorageType = "har" // StorageTypeOpenAPI is the OpenAPI file storage type (JSON or YAML). StorageTypeOpenAPI StorageType = "openapi" )
Click to show internal directories.
Click to hide internal directories.