config

package
v0.0.0-...-76d690f Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Autocert

type Autocert struct {
	Enabled  bool   `yaml:"enabled"`
	CacheDir string `yaml:"cache_dir"`
}

type Config

type Config struct {
	HTTP             HTTP     `yaml:"http"`
	PrivateKeyURL    string   `yaml:"private_key_url"`
	CounterURL       string   `yaml:"counter_url"`
	APIKey           string   `yaml:"api_key"`
	Upstream         Upstream `yaml:"upstream"`
	ProductID        string   `yaml:"product_id"`
	AllowedAuthTypes []string `yaml:"allowed_auth_types"`
}

func FromFilepath

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

type HTTP

type HTTP struct {
	ListenAddress string `yaml:"listen_address"`
	TLS           *struct {
		Autocert    *Autocert `yaml:"autocert,omitempty"`
		Certificate string    `yaml:"certificate,omitempty"`
		Key         string    `yaml:"key,omitempty"`
	} `yaml:"tls,omitempty"`
}

type Upstream

type Upstream struct {
	URL     string            `yaml:"url"`
	Headers map[string]string `yaml:"headers"`
}

Jump to

Keyboard shortcuts

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