heimdall

package
v0.14.5-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 6 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 {
	Request() *Request

	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() []byte
	Keys() []jose.JSONWebKey
}

type RedirectError

type RedirectError struct {
	Message    string
	Code       int
	RedirectTo string
}

func (*RedirectError) Error

func (e *RedirectError) Error() string

func (*RedirectError) Is

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

type Request

type Request struct {
	RequestFunctions

	Method            string
	URL               *url.URL
	ClientIPAddresses []string
}

type RequestFunctions

type RequestFunctions interface {
	Header(name string) string
	Cookie(name string) string
	Headers() map[string]string
	Body() any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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