caddy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIEndpoint = "http://localhost:2019"
)

Variables

This section is empty.

Functions

func UpdateConfigToCheckDomainReachability

func UpdateConfigToCheckDomainReachability(
	config *Config,
	domain string,
	uniqueID string,
)

Types

type API

type API struct{}

func NewAPI

func NewAPI() *API

func (*API) Load

func (a *API) Load(config *Config) error

type Config

type Config struct {
	Apps map[string]ConfigHTTPApp `json:"apps"`
}

func CreateConfigFromServedPorts

func CreateConfigFromServedPorts(
	ports map[string]*proto.EnvServedPortBindings,
) *Config

type ConfigHTTPApp

type ConfigHTTPApp struct {
	Servers ConfigHTTPServers `json:"servers"`
}

type ConfigHTTPServer

type ConfigHTTPServer struct {
	Listen []string                `json:"listen"`
	Routes []ConfigHTTPServerRoute `json:"routes"`
}

type ConfigHTTPServerHandle

type ConfigHTTPServerHandle struct {
	Handler   string                      `json:"handler"`
	Upstreams []ConfigHTTPServerUpstreams `json:"upstreams,omitempty"`
	Body      string                      `json:"body,omitempty"`
}

type ConfigHTTPServerMatch

type ConfigHTTPServerMatch struct {
	Host []string `json:"host"`
}

type ConfigHTTPServerRoute

type ConfigHTTPServerRoute struct {
	Match  []ConfigHTTPServerMatch  `json:"match,omitempty"`
	Handle []ConfigHTTPServerHandle `json:"handle"`
}

type ConfigHTTPServerUpstreams

type ConfigHTTPServerUpstreams struct {
	Dial string `json:"dial"`
}

type ConfigHTTPServers

type ConfigHTTPServers map[string]ConfigHTTPServer

Jump to

Keyboard shortcuts

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