utils

package
v0.0.0-...-7eccccd Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Domain            string `json:"domain"`
	CertURL           string `json:"certUrl"`
	CertStableURL     string `json:"certStableUrl"`
	PrivateKey        []byte `json:"-"`
	Certificate       []byte `json:"-"`
	IssuerCertificate []byte `json:"-"`
	CSR               []byte `json:"-"`
}

func (*Certificate) WriteTo

func (c *Certificate) WriteTo(filename string) error

type CertificateProvider

type CertificateProvider interface {
	GetSelfSigned(domain string) (string, error)
	GetCertificateForDomain(domain string) (string, error)
	GetAuthServicePort(ssl bool) int
	GetDomainsToReissue() []string
}

type DefaultCertificateProvider

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

func (*DefaultCertificateProvider) GetAuthServicePort

func (p *DefaultCertificateProvider) GetAuthServicePort(ssl bool) int

func (*DefaultCertificateProvider) GetCertificateForDomain

func (p *DefaultCertificateProvider) GetCertificateForDomain(domain string) (string, error)

func (*DefaultCertificateProvider) GetDomainsToReissue

func (p *DefaultCertificateProvider) GetDomainsToReissue() []string

func (*DefaultCertificateProvider) GetSelfSigned

func (p *DefaultCertificateProvider) GetSelfSigned(domain string) (string, error)

type DefaultCertificateProviderConfig

type DefaultCertificateProviderConfig struct {
	ConfigDir     string
	Email         string
	Organization  string
	AuthPortHTTP  int
	AuthPortHTTPS int
}

type DockerMonitor

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

func CreateDockerMonitor

func CreateDockerMonitor() (*DockerMonitor, error)

func (*DockerMonitor) GetProxyEndpoints

func (m *DockerMonitor) GetProxyEndpoints() ([]ProxyEndpoint, error)

type HAPBackendRecord

type HAPBackendRecord struct {
	Index int
	Port  int
	Host  string
	Order int

	// Needed for URL rewriting
	PathBe string
	PathFe string
}

type HAPFrontendRecord

type HAPFrontendRecord struct {
	Index   int
	Domain  string
	SSL     bool
	Mapping []*HAPMappingRecord
}

type HAPMappingRecord

type HAPMappingRecord struct {
	Index   int
	Path    string
	Backend *HAPBackendRecord
}

type HAProxyManager

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

func CreateHAProxyManager

func CreateHAProxyManager(config HAProxyManagerConfig) *HAProxyManager

func (*HAProxyManager) Reload

func (h *HAProxyManager) Reload() error

func (*HAProxyManager) SetState

func (h *HAProxyManager) SetState(cfg *HAProxyState) error

func (*HAProxyManager) Start

func (h *HAProxyManager) Start() error

func (*HAProxyManager) Stop

func (h *HAProxyManager) Stop() error

type HAProxyManagerConfig

type HAProxyManagerConfig struct {
	Certificates           CertificateProvider
	BinaryPath             string
	DefaultLocalServerPort int
}

type HAProxyState

type HAProxyState struct {
	Endpoints []ProxyEndpoint
}

type ProxyEndpoint

type ProxyEndpoint struct {
	FrontendDomain string `json:"frontend_domain"`
	FrontendPath   string `json:"frontend_path"`
	BackendIP      string `json:"backend_ip"`
	BackendPort    int    `json:"backend_port"`
	BackendPath    string `json:"backend_path"`
	SSLAutoCert    bool   `json:"ssl_autocert"`
	Order          int    `json:"order"`
}

func (*ProxyEndpoint) Hash

func (e *ProxyEndpoint) Hash() uint64

Jump to

Keyboard shortcuts

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