httpadapter

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Package httpadapter exposes authenticated root-scoped REST and signed transfers.

Index

Constants

View Source
const ExecutionHeader = "X-Filegate-Execution"

ExecutionHeader is accepted only on backend-authenticated operations. Direct transfers use the identity authenticated by their capability instead.

Variables

This section is empty.

Functions

func ValidateDownloadName

func ValidateDownloadName(name string) error

ValidateDownloadName validates one presentation filename, never a filesystem path. Empty optional request fields select the original path's basename.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(roots []*domain.Root, o Options) *Handler

func (*Handler) Drain

func (h *Handler) Drain()

Drain prevents state from closing while a handler still publishes a file.

func (*Handler) Maintain

func (h *Handler) Maintain(ctx context.Context)

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Options

type Options struct {
	Token     string
	PublicURL string
	Origins   []string
	Version   string
}

Jump to

Keyboard shortcuts

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