network

package
v0.0.0-...-418de2e Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2017 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupForwarding

func SetupForwarding(localPort, externalPort uint16) (string, error)

SetupForwarding contacts a local gateway via UPnP and instructs it to forward externalPort to localPort on the internal local IP address discovered.

Types

type ACMEClient

type ACMEClient struct {
	DNS           *DNSClient
	WorkDirectory string
	// contains filtered or unexported fields
}

ACMEClient is incapsulating needed information to access ACME and Google Cloud DNS

func NewACMEClient

func NewACMEClient(ctx context.Context, directory string) (*ACMEClient, error)

NewACMEClient creates an ACME account, if necessary, and writes it's key and config to disk

func (*ACMEClient) CheckOrRefreshCertificate

func (c *ACMEClient) CheckOrRefreshCertificate(ctx context.Context, domains ...string) error

CheckOrRefreshCertificate checks expiration date of the certificate (if it exists), and renews it if necessary

func (*ACMEClient) GetDomainsCertpairPath

func (c *ACMEClient) GetDomainsCertpairPath(domains ...string) (string, string)

GetDomainsCertpairPath returns paths to a certificate and key for domains, based on WorkDirectory

type DNSClient

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

DNSClient is a wrapper around Google Cloud DNS client.

func NewDNSClient

func NewDNSClient(ctx context.Context, zone string) (*DNSClient, error)

NewDNSClient connects new DNSClient and prepopulates some fields.

func (*DNSClient) UpdateDNS

func (c *DNSClient) UpdateDNS(ctx context.Context, rrs *dns.ResourceRecordSet,
	waitPropagation bool) error

UpdateDNS adds or replaces DNS record in Google Cloud DNS according to the arguments specified.

Jump to

Keyboard shortcuts

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