db

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoute

func AddRoute(r *pb.Route) error

func InitialCaddyConfigSrc

func InitialCaddyConfigSrc() string

func ReadCaddyConf

func ReadCaddyConf() (string, error)

ReadCaddyConf sends string representation of a config unless empty.

func SetCaddyConf

func SetCaddyConf(conf []byte) error

Types

type CaddyConf

type CaddyConf struct {
	Apps struct {
		Http struct {
			Servers struct {
				Myserver struct {
					AutomaticHttps struct {
						Skip []string `json:"skip"`
					} `json:"automatic_https"`
					Listen []string `json:"listen"`
					Routes *[]Route `json:"routes"`
				} `json:"myserver"`
			} `json:"servers"`
		} `json:"http"`
	} `json:"apps"`
}

func InitialCaddyConfig

func InitialCaddyConfig() CaddyConf

type Handle

type Handle struct {
	Handler   string     `json:"handler"`
	Transport Transport  `json:"transport"`
	Upstreams []Upstream `json:"upstreams"`
}

type Match

type Match struct {
	Hosts []string `json:"host"`
	Paths []string `json:"path"`
}

type Route

type Route struct {
	Id      string   `json:"@id"`
	Handles []Handle `json:"handle"`
	Matches []Match  `json:"match"`
}

type Transport

type Transport struct {
	Protocol string `json:"protocol"`
}

type Upstream

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

Jump to

Keyboard shortcuts

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