web

package
v0.0.0-...-ce79441 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger       *zap.SugaredLogger `yaml:"-"`
	AccessLogger *zap.SugaredLogger `yaml:"-"`
	ListenAddr   string             `yaml:"listen_addr"`
}

type SubdomainRouter

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

func (SubdomainRouter) ServeHTTP

func (s SubdomainRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WebBackend

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

func New

func New(cfg Config, webFS fs.FS) (backend *WebBackend, err error)

func (*WebBackend) AddSubdomainRouter

func (b *WebBackend) AddSubdomainRouter(subdomain string, r http.Handler) error

func (*WebBackend) RunHTTP

func (b *WebBackend) RunHTTP() error

func (*WebBackend) RunUnix

func (b *WebBackend) RunUnix(file string, remove bool) error

Jump to

Keyboard shortcuts

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