handler

package
v0.0.0-...-339412c Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 14 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"

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

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

	// host to proxy for Apps
	OrgHost = "m3o.org"

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

	// host for user auth
	UserHost = "user.m3o.com"
)
View Source
var WebTemplate = `` /* 727-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() *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