reverseproxy

package
v0.0.0-...-51fd5d7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHandler

func CreateHandler(api *api.API) func(c *gin.Context)

Creates a reverse proxy. Responses:

  • 400 If invalid body.
  • 400 If json fields are invalid.
  • 400 If host + port is already in use.
  • 200 If succeeded.

func CreatePathHandler

func CreatePathHandler(api *api.API) func(c *gin.Context)

Creates a reverse proxy path. Responses:

  • 400 If invalid body.
  • 400 If json fields are invalid.
  • 400 If path already exists.
  • 404 If proxy not found.
  • 200 If succeeded.

func DeleteHandler

func DeleteHandler(api *api.API) func(c *gin.Context)

Deletes a reverse proxy. Responses:

  • 404 If reverse proxy not found.
  • 200 If succeeded.

func DeletePathHandler

func DeletePathHandler(api *api.API) func(c *gin.Context)

Deletes a reverse proxy. Responses:

  • 404 If reverse proxy not found.
  • 200 If succeeded.

func GetHandler

func GetHandler(api *api.API) func(c *gin.Context)

Get a reverse proxy. Responses:

  • 404 If reverse proxy not found.
  • 200 If succeeded.

func GetPathHandler

func GetPathHandler(api *api.API) func(c *gin.Context)

Get a reverse proxy. Responses:

  • 404 If reverse proxy path not found.
  • 200 If succeeded.

func MGetHandler

func MGetHandler(api *api.API) func(c *gin.Context)

Get a reverse proxy. Responses:

  • 404 If reverse proxy not found.
  • 200 If succeeded.

func MGetPathHandler

func MGetPathHandler(api *api.API) func(c *gin.Context)

Get reverse proxy paths. Responses:

  • 404 If reverse proxy not found.
  • 200 If succeeded.

func RemoveReverseProxy

func RemoveReverseProxy(id int32)

RemoveReverseProxy shutdowns a reverse proxy server. Does not panic if server not found.

func RestartHandler

func RestartHandler(api *api.API) func(c *gin.Context)

Restarts a reverse proxy. Responses:

  • 404 If reverse proxy not found.
  • 200 If succeeded.

func RunReverseProxy

func RunReverseProxy(proxy models.ReverseProxyHTTP)

RunReverseProxy is a blocking function that runs a reverse proxy server. Shutdowns the server and restart if already running.

func StartReverseProxyManager

func StartReverseProxyManager(api *api.API)

func UpdateHandler

func UpdateHandler(api *api.API) func(c *gin.Context)

Upadtes a reverse proxy. Responses:

  • 400 If invalid body.
  • 400 If json fields are invalid.
  • 400 If host + port is already in use.
  • 404 If reverse proxy not found.
  • 200 If succeeded.

func UpdatePathHandler

func UpdatePathHandler(api *api.API) func(c *gin.Context)

Upadtes a reverse proxy path. Responses:

  • 400 If invalid body.
  • 400 If json fields are invalid.
  • 400 If invalid headers.
  • 400 If path already exists.
  • 404 If reverse proxy not found.
  • 404 If reverse proxy path not found.
  • 200 If succeeded.

Types

type ReverseProxyManager

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

func (*ReverseProxyManager) Close

func (x *ReverseProxyManager) Close()

Close closes all reverse proxy servers.

Jump to

Keyboard shortcuts

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