decryptionproxy

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const GcsEndpoint = "storage.googleapis.com"

GcsEndpoint specifies REST base endpoint for GCS

Variables

This section is empty.

Functions

func Decorate

func Decorate(handler http.Handler, decorators ...Decorator) http.Handler

Decorate executes each middleware in the order it's specified

func New

func New(c env.Config, client *http.Client) http.Handler

New returns a tink proxy handler

Types

type Decorator

type Decorator func(http.Handler) http.Handler

Decorator allows creation of uniform middleware for the proxy

func ConstraintHandler

func ConstraintHandler(logger *logrus.Logger) Decorator

ConstraintHandler middleware enforces limitations that the proxy currently has 1. proxy only supports GET 2. must have at least a bucket name

func LoggerHandler

func LoggerHandler(logger *logrus.Logger) Decorator

LoggerHandler middleware adds logging before and after the main handler is invoked

func RouteHandler

func RouteHandler() Decorator

RouteHandler middleware does basic path checks. Enforces a root path

type RespWrapper

type RespWrapper struct {
	Status int
	http.ResponseWriter
}

RespWrapper contains response status

func (*RespWrapper) SaveStatus

func (w *RespWrapper) SaveStatus(status int)

SaveStatus eases logging http status and updates status in the response header

Jump to

Keyboard shortcuts

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