rest

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LeaseShellCodeStdout         = 100
	LeaseShellCodeStderr         = 101
	LeaseShellCodeResult         = 102
	LeaseShellCodeFailure        = 103
	LeaseShellCodeStdin          = 104
	LeaseShellCodeTerminalResize = 105
)

Variables

View Source
var (
	// ErrJWTMissing is returned when the JWT is missing.
	ErrJWTMissing = errors.New("jwt: missing")

	// ErrJWTInvalid is returned when the JWT is invalid.
	ErrJWTInvalid     = errors.New("jwt: invalid")
	ErrInvalidRequest = errors.New("invalid request")
	ErrUnauthorized   = errors.New("unauthorized")
)

Functions

func AuthHeaderTokenExtractor added in v0.7.0

func AuthHeaderTokenExtractor(r *http.Request) (string, error)

AuthHeaderTokenExtractor is a TokenExtractor that takes a request and extracts the token from the Authorization header.

func DefaultErrorHandler added in v0.7.0

func DefaultErrorHandler(w http.ResponseWriter, _ *http.Request, err error)

func NewServer

func NewServer(
	ctx context.Context,
	log log.Logger,
	pclient provider.Client,
	cquery gwutils.CertGetter,
	sni string,
	address string,
	pid sdk.Address,
	clusterConfig map[interface{}]interface{},
) (*http.Server, error)

Types

type CtxAuthKey

type CtxAuthKey string

Jump to

Keyboard shortcuts

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