proxy

package
v0.0.0-...-a52e8f6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(serviceDefService metadata.ServiceDefinitionService, authorizationStrategyFactory authorization.StrategyFactory, csrfTokenStrategyFactory csrf.TokenStrategyFactory, config Config) http.Handler

New creates proxy for handling user's services calls

func NewInvalidStateHandler

func NewInvalidStateHandler(message string) http.Handler

NewInvalidStateHandler creates handler always returning 500 response

Types

type Cache

type Cache interface {
	// Get returns entry from the cache
	Get(id string) (*CacheEntry, bool)
	// Put adds entry to the cache
	Put(id string, reverseProxy *httputil.ReverseProxy, authorizationStrategy authorization.Strategy, csrfTokenStrategy csrf.TokenStrategy) *CacheEntry
}

func NewCache

func NewCache(proxyCacheTTL int) Cache

NewCache creates new cache with specified TTL

type CacheEntry

type CacheEntry struct {
	Proxy                 *httputil.ReverseProxy
	AuthorizationStrategy *authorizationStrategyWrapper
	CSRFTokenStrategy     csrf.TokenStrategy
}

type Config

type Config struct {
	SkipVerify    bool
	ProxyTimeout  int
	Application   string
	ProxyCacheTTL int
}

Jump to

Keyboard shortcuts

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