heimdall

package
v0.4.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrArgument             = errors.New("argument error")
	ErrAuthentication       = errors.New("authentication error")
	ErrAuthorization        = errors.New("authorization error")
	ErrCommunication        = errors.New("communication error")
	ErrCommunicationTimeout = errors.New("communication timeout error")
	ErrConfiguration        = errors.New("configuration error")
	ErrInternal             = errors.New("internal error")
	ErrMethodNotAllowed     = errors.New("method not allowed")
	ErrNoRuleFound          = errors.New("no rule found")
)

Functions

This section is empty.

Types

type Context

type Context interface {
	RequestMethod() string
	RequestHeaders() map[string]string
	RequestHeader(key string) string
	RequestCookie(key string) string
	RequestQueryParameter(key string) string
	RequestFormParameter(key string) string
	RequestBody() []byte
	RequestURL() *url.URL
	RequestClientIPs() []string

	AddHeaderForUpstream(name, value string)
	AddCookieForUpstream(name, value string)

	AppContext() context.Context

	SetPipelineError(err error)

	Signer() JWTSigner
}

type JWTSigner

type JWTSigner interface {
	Sign(sub string, ttl time.Duration, claims map[string]any) (string, error)
	Hash() string
}

type RedirectError

type RedirectError struct {
	Message    string
	Code       int
	RedirectTo *url.URL
}

func (*RedirectError) Error

func (e *RedirectError) Error() string

func (*RedirectError) Is

func (e *RedirectError) Is(target error) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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