host

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Certificates

func Certificates() []tls.Certificate

Certificates returns an array of all configured domain certificates.

func HostNames added in v0.3.3

func HostNames() []string

HostNames returns current registered domain names.

func Initialize

func Initialize(configurations []Config)

Initialize initializes host manager sub system.

func IsLocalHost

func IsLocalHost(domain string) bool

IsLocalHost returns true if domain is a local server domain.

func Shutdown

func Shutdown()

Shutdown shuts down host sub system.

Types

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 TLSConfig

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

TLSConfig represents a host TLS configuration.

Jump to

Keyboard shortcuts

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