Documentation ¶
Index ¶
- func CreateHandler(api *api.API) func(c *gin.Context)
- func CreatePathHandler(api *api.API) func(c *gin.Context)
- func DeleteHandler(api *api.API) func(c *gin.Context)
- func DeletePathHandler(api *api.API) func(c *gin.Context)
- func GetHandler(api *api.API) func(c *gin.Context)
- func GetPathHandler(api *api.API) func(c *gin.Context)
- func MGetHandler(api *api.API) func(c *gin.Context)
- func MGetPathHandler(api *api.API) func(c *gin.Context)
- func RemoveReverseProxy(id int32)
- func RestartHandler(api *api.API) func(c *gin.Context)
- func RunReverseProxy(proxy models.ReverseProxyHTTP)
- func StartReverseProxyManager(api *api.API)
- func UpdateHandler(api *api.API) func(c *gin.Context)
- func UpdatePathHandler(api *api.API) func(c *gin.Context)
- type ReverseProxyManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHandler ¶
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 ¶
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 ¶
Deletes a reverse proxy. Responses:
- 404 If reverse proxy not found.
- 200 If succeeded.
func DeletePathHandler ¶
Deletes a reverse proxy. Responses:
- 404 If reverse proxy not found.
- 200 If succeeded.
func GetPathHandler ¶
Get a reverse proxy. Responses:
- 404 If reverse proxy path not found.
- 200 If succeeded.
func MGetHandler ¶
Get a reverse proxy. Responses:
- 404 If reverse proxy not found.
- 200 If succeeded.
func MGetPathHandler ¶
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 ¶
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 UpdateHandler ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.