domain

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(rootDomain string, updater domainsUpdater, interval time.Duration)

Watch polls the filesystem and kicks off a new domain directory scan when needed.

Types

type D

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

D is a domain that gitlab-pages can serve.

func (*D) EnsureCertificate

func (d *D) EnsureCertificate() (*tls.Certificate, error)

EnsureCertificate parses the PEM-encoded certificate for the domain

func (*D) IsHTTPSOnly

func (d *D) IsHTTPSOnly(r *http.Request) bool

IsHTTPSOnly figures out if the request should be handled with HTTPS only by looking at group and project level config.

func (*D) ServeHTTP

func (d *D) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

func (*D) String

func (d *D) String() string

String implements Stringer.

type Map

type Map map[string]*D

Map maps domain names to D instances.

func (Map) ReadGroups

func (dm Map) ReadGroups(rootDomain string) error

ReadGroups walks the pages directory and populates dm with all the domains it finds.

Jump to

Keyboard shortcuts

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