httpadapter

package
v5.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
⌂ 换网址