requestcontext

package
v0.12.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	heimdall.Context

	Finalize(backend rule.Backend) error
}

type ContextFactory

type ContextFactory interface {
	Create(rw http.ResponseWriter, req *http.Request) Context
}

type FactoryFunc

type FactoryFunc func(rw http.ResponseWriter, req *http.Request) Context

func (FactoryFunc) Create

func (f FactoryFunc) Create(rw http.ResponseWriter, req *http.Request) Context

type RequestContext

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

func New

func New(signer heimdall.JWTSigner, req *http.Request) *RequestContext

func (*RequestContext) AddCookieForUpstream

func (r *RequestContext) AddCookieForUpstream(name, value string)

func (*RequestContext) AddHeaderForUpstream

func (r *RequestContext) AddHeaderForUpstream(name, value string)

func (*RequestContext) AppContext

func (r *RequestContext) AppContext() context.Context

func (*RequestContext) Body

func (r *RequestContext) Body() any

func (*RequestContext) Cookie

func (r *RequestContext) Cookie(name string) string

func (*RequestContext) Header

func (r *RequestContext) Header(name string) string

func (*RequestContext) Headers

func (r *RequestContext) Headers() map[string]string

func (*RequestContext) PipelineError

func (r *RequestContext) PipelineError() error

func (*RequestContext) Request

func (r *RequestContext) Request() *heimdall.Request

func (*RequestContext) SetPipelineError

func (r *RequestContext) SetPipelineError(err error)

func (*RequestContext) Signer

func (r *RequestContext) Signer() heimdall.JWTSigner

func (*RequestContext) UpstreamCookies

func (r *RequestContext) UpstreamCookies() map[string]string

func (*RequestContext) UpstreamHeaders

func (r *RequestContext) UpstreamHeaders() http.Header

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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