config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Headers

type Headers struct {
	Header   http.Header
	Username string // Username or blank. for basic authN
	Password string // Password or blank. for basic authN
}

Headers is configuration parameters for the http header

func (*Headers) String added in v0.1.2

func (h *Headers) String() string

String returns string representation of this configuration. useful for debugging.

type Parameters

type Parameters struct {
	URL
	Headers
	TLSClient
	Verbose bool
}

Parameters is the configuration parameters for the hfwd proxy server

func (*Parameters) Setup added in v0.1.2

func (p *Parameters) Setup() error

Setup configuration given parameters

func (*Parameters) String added in v0.1.2

func (p *Parameters) String() string

String returns string representation of this configuration. useful for debugging.

type PathRewriter added in v0.1.2

type PathRewriter interface {
	// Do rewrites the URL
	Do(*url.URL) (rewrited bool)
}

PathRewriter is an interface to path rewrite

type TLSClient

type TLSClient struct {
	CACertPath string

	PKCS12Path     string
	PKCS12Password string
	// contains filtered or unexported fields
}

TLSClient is configuration parameters for the tls client certification

func (*TLSClient) String added in v0.1.2

func (t *TLSClient) String() string

String returns string representation of this configuration. useful for debugging.

func (*TLSClient) TLSClientConfig

func (t *TLSClient) TLSClientConfig() *tls.Config

TLSClientConfig returns *tls.Config for the tls client certification

type URL

type URL struct {
	RewritePaths map[string]string // map[oldPath]newPath
	// contains filtered or unexported fields
}

URL is configuration parameters for the destination

func (*URL) PathRewriters

func (u *URL) PathRewriters() []PathRewriter

PathRewriters returns path rewriters

func (*URL) String added in v0.1.2

func (u *URL) String() string

String returns string representation of this configuration. useful for debugging.

Jump to

Keyboard shortcuts

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