Version: v0.0.0-...-aeec266 Latest Latest

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

Go to latest
Published: Jan 5, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Config

type Config struct {
	Name        string
	Certificate tls.Certificate

Config represents a host configuration.

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML satisfies Unmarshaler interface.

type Hosts

type Hosts struct {
	// contains filtered or unexported fields

Hosts represents hosts configuation map.

func New

func New(hostsConfig []Config) (*Hosts, error)

New initializes configured hosts type and returns associated hosts.

func (*Hosts) Certificates

func (h *Hosts) Certificates() []tls.Certificate

Certificates returns a list of TLS certificat.

func (*Hosts) DefaultHostName

func (h *Hosts) DefaultHostName() string

DefaultHostName returns the default hostname.

func (*Hosts) HostName

func (h *Hosts) HostName() []string

HostName returns a sorted list of hostname.

func (*Hosts) IsLocalHost

func (h *Hosts) IsLocalHost(domain string) bool

IsLocalHost returns whether a domain is hosted.

type TLSConfig

type TLSConfig struct {
	CertFile       string `yaml:"cert_path"`
	PrivateKeyFile string `yaml:"privkey_path"`

TLSConfig represents a TLS certification configuration.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL