handler

package
v0.0.0-...-fb1a1ec Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// API Key
	APIKey = os.Getenv("M3O_API_TOKEN")

	// API Url
	APIHost = "https://api.m3o.com"

	// dot com host
	ComHost = "m3o.com"

	// dev host
	DevHost = "m3o.dev"

	// host to proxy for URLs
	URLHost = "m3o.one"

	// host to proxy for Apps
	AppHost = "m3o.app"

	// host to proxy for Functions
	FunctionHost = "m3o.sh"

	// host of go vanity
	GoHost = "go.m3o.com"

	// host for user auth
	UserHost = "user.m3o.com"
)
View Source
var WebTemplate = `` /* 781-byte string literal not displayed */

Functions

This section is empty.

Types

type App

type App struct {
	Name    string
	Url     string
	Backend string
}

type Handler

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

func New

func New(server *server.Server, vanity1, vanity2 http.Handler) *Handler

func (*Handler) Proxy

func (h *Handler) Proxy(backend *url.URL, w http.ResponseWriter, r *http.Request)

Proxy reverse proxies any backend url, setting headers, etc

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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