config

package
v0.0.0-...-004a839 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsCaddyConfig

func AsCaddyConfig(cfg Config) (*caddy.Config, error)

func Edit

func Edit(editor func(config *Config)) error

Edit locks the configuration while the editor function is being executed. the lock is automatically returned and the caddy config is updated.

func Reload

func Reload()

Types

type Config

type Config struct {
	Admin   caddy.AdminConfig `json:"admin,omitempty"`
	Storage Storage           `json:"storage"`
	Apps    ConfigApps        `json:"apps"`
	Logging caddy.Logging     `json:"logging"`
}

func Read

func Read() Config

Read returns a copy of the current caddy config. Any modifications will be lost and never applied.

func (Config) GetHTTPApp

func (c Config) GetHTTPApp() *caddyhttp.Server

func (Config) GetRedirApp

func (c Config) GetRedirApp() *caddyhttp.Server

func (Config) GetTLSApp

func (c Config) GetTLSApp() *caddytls.TLS

func (Config) GetTLSCertificates

func (c Config) GetTLSCertificates() (t TLSCertificates)

func (Config) SetTLSCertificates

func (c Config) SetTLSCertificates(t TLSCertificates)

type ConfigApps

type ConfigApps struct {
	TLS  *caddytls.TLS  `json:"tls,omitempty"`
	HTTP *caddyhttp.App `json:"http,omitempty"`
}

type Storage

type Storage struct {
	System string `json:"module"`
}

Storage represents the certmagic storage configuration.

type TLSCertificatePair

type TLSCertificatePair struct {
	Certificate string   `json:"certificate"`
	Key         string   `json:"key"`
	Format      string   `json:"format"`
	Tags        []string `json:"tags"`
}

Covers apps.tls.certificates.load_storage.pairs

type TLSCertificates

type TLSCertificates struct {
	Pairs []TLSCertificatePair `json:"pairs"`
}

Covers apps.tls.certificates.load_storage

Jump to

Keyboard shortcuts

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