config

package
v0.128.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CAConfig

type CAConfig struct {
	Cert       string `json:"cert"`
	PrivateKey string `json:"private_key"`
}

CAConfig contains the keypair for the CA.

type Config

type Config struct {
	Storage  []*StorageConfig `json:"storage"`
	Address  string           `json:"address"`
	Hosts    []string         `json:"hosts"`
	CAConfig CAConfig         `json:"ca_keypair"`
}

Config is the configuration for the proxy.

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig loads the configuration from a JSON file path.

type StorageConfig

type StorageConfig struct {
	Type StorageType `json:"type"`
	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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL