handler

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingEncryptedParam   = errors.New("missing encrypted parameter")
	ErrFailedToDecrypt         = errors.New("failed to decrypt the path")
	ErrInvalidSignature        = errors.New("invalid signature")
	ErrInvalidSignatureFormat  = errors.New("invalid signature format")
	ErrErrorGeneratingFileTree = errors.New("error generating file tree")
)

Error declaration for specific Error handling

Functions

func DefaultHandler

func DefaultHandler(w http.ResponseWriter, r *http.Request)

func DetermineHTTPStatusCode added in v1.2.0

func DetermineHTTPStatusCode(err error) int

Maps specific error types to HTTP status codes

func HTTPHandler added in v1.1.6

func HTTPHandler(w http.ResponseWriter, r *http.Request)

func HTTPMessage added in v1.2.0

func HTTPMessage(w http.ResponseWriter, r *http.Request, message string)

func ProcessEncryptedPath added in v1.2.0

func ProcessEncryptedPath(r *http.Request) (interface{}, error)

Processes the encrypted path, decrypts it, and generates the file tree.

func UnifiedHandler added in v1.1.6

func UnifiedHandler(w http.ResponseWriter, r *http.Request)

func UpgradeToWebSocket added in v1.2.0

func UpgradeToWebSocket(w http.ResponseWriter, r *http.Request) (*websocket.Conn, error)

func WebSocketHandler added in v1.1.6

func WebSocketHandler(w http.ResponseWriter, r *http.Request)

func WebSocketMessage added in v1.2.0

func WebSocketMessage(w http.ResponseWriter, r *http.Request, message string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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