http

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	proxy.Proxy
	HandleError func(err error, w http.ResponseWriter)
}

func NewDefaultProxy

func NewDefaultProxy(provider proxy.RequestConfigProvider, middlewares ...middleware.GraphqlMiddleware) *Proxy

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Proxy) SetContextValues added in v1.5.0

func (f *Proxy) SetContextValues(ctx context.Context, header http.Header, addHeaders [][]byte) context.Context

type ProxyRequest added in v1.5.0

type ProxyRequest struct {
	proxy.Request
	Proxy *Proxy
}

func (*ProxyRequest) AcceptRequest added in v1.5.0

func (pr *ProxyRequest) AcceptRequest(buff *bytes.Buffer) error

func (*ProxyRequest) AcceptResponse added in v1.5.0

func (pr *ProxyRequest) AcceptResponse()

func (*ProxyRequest) DispatchRequest added in v1.5.0

func (pr *ProxyRequest) DispatchRequest(buff *bytes.Buffer) (io.ReadCloser, error)

func (*ProxyRequest) DispatchResponse added in v1.5.0

func (pr *ProxyRequest) DispatchResponse()

type StaticProxy added in v1.4.0

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

func NewDefaultStaticProxy added in v1.5.0

func NewDefaultStaticProxy(config proxy.RequestConfig, middlewares ...middleware.GraphqlMiddleware) *StaticProxy

func (*StaticProxy) ListenAndServe added in v1.4.0

func (s *StaticProxy) ListenAndServe(addr string) error

Jump to

Keyboard shortcuts

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