httphandler

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackendListHandler

func BackendListHandler(mgr *manager.Manager) (string, http.HandlerFunc, *openapi.PathItem)

Path: /{$} GET returns the list of registered backends.

func ObjectHandler

func ObjectHandler(mgr *manager.Manager) (string, http.HandlerFunc, *openapi.PathItem)

Path: /{name}/{path...} GET downloads a file, HEAD returns metadata, PUT creates/replaces, POST uploads via multipart/form-data (field name: "file", repeatable for multiple files), DELETE removes.

func ObjectListHandler

func ObjectListHandler(mgr *manager.Manager) (string, http.HandlerFunc, *openapi.PathItem)

Path: /{name} GET lists objects at the backend root. POST uploads via multipart/form-data (field name: "file", repeatable for multiple files) to the backend root. DELETE removes objects at the backend root (use ?recursive to widen scope).

func RegisterHandlers

func RegisterHandlers(mgr *manager.Manager, router Router) error

RegisterHandlers registers all filer HTTP handlers on the provided router.

Types

type Router

type Router interface {
	RegisterFunc(path string, handler http.HandlerFunc, middleware bool, spec *openapi.PathItem) error
}

Router is the interface required to register HTTP handlers.

Jump to

Keyboard shortcuts

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