host

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hosts

type Hosts struct {
	// contains filtered or unexported fields
}

Hosts type represents all local domains set.

func New

func New() *Hosts

New creates and returns an empty Hosts instance.

func (*Hosts) Certificates

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

Certificates returns all registered domain certificates.

func (*Hosts) DefaultHostName

func (hs *Hosts) DefaultHostName() string

DefaultHostName returns default host name value.

func (*Hosts) HostNames

func (hs *Hosts) HostNames() []string

HostNames returns the list of all registered local hosts.

func (*Hosts) IsLocalHost

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

IsLocalHost tells whether or not d value corresponds to local host.

func (*Hosts) RegisterDefaultHost

func (hs *Hosts) RegisterDefaultHost(h string, cer tls.Certificate)

RegisterDefaultHost registers default host value along with its certificate.

func (*Hosts) RegisterHost

func (hs *Hosts) RegisterHost(h string, cer tls.Certificate)

RegisterHost registers a host value along with its certificate.

Jump to

Keyboard shortcuts

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