tlsutil

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTLSConfig

func LoadTLSConfig(cfg TLSConfig) (*tls.Config, error)

LoadTLSConfig builds a *tls.Config from the YAML-friendly struct.

Types

type AutocertConfig

type AutocertConfig struct {
	Domains  []string `yaml:"domains" json:"domains"`
	CacheDir string   `yaml:"cache_dir" json:"cache_dir"`
	Email    string   `yaml:"email" json:"email"`
}

AutocertConfig holds Let's Encrypt autocert configuration.

type TLSConfig

type TLSConfig struct {
	Enabled    bool   `yaml:"enabled" json:"enabled"`
	CertFile   string `yaml:"cert_file" json:"cert_file"`
	KeyFile    string `yaml:"key_file" json:"key_file"`
	CAFile     string `yaml:"ca_file" json:"ca_file"`
	ClientAuth string `yaml:"client_auth" json:"client_auth"` // require | request | none
	SkipVerify bool   `yaml:"skip_verify" json:"skip_verify"` // for dev only
}

TLSConfig is the common TLS configuration used across all transports.

Jump to

Keyboard shortcuts

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