ginproxy

package module
v0.0.0-...-17006b6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2016 License: MIT Imports: 3 Imported by: 0

README

ginproxy

A very simple proxy handler for gin-gonic

Can be used like this:

import (
	"github.com/gin-gonic/gin"
	"github.com/abrander/ginproxy"
)

func main() {
	router := gin.Default()
	g, _ := ginproxy.NewGinProxy("http://backend01.example.com/")
	router.Any("/api/*all", g.Handler)
	router.Run(":8080")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyRouter

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

func NewGinProxy

func NewGinProxy(upstream string) (*ProxyRouter, error)

func (*ProxyRouter) Handler

func (p *ProxyRouter) Handler(c *gin.Context)

Jump to

Keyboard shortcuts

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