Help us shape the future of Go! Take the 2026 Go Developer Survey

submissionshttp

package
v1.152.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package submissionshttp serves a form's stored submissions on its script's portal page (#2180): the newest rows of the form's source, sensitive fields decrypted for the reader and the read audited (#2179), and the same rows as CSV or an Excel workbook.

It is mounted by scripthttp, whose ownership gate refuses everybody but the script's owner and an administrator before any handler here runs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Reader *epsubmit.Reader
	// Owned resolves the script in the path for a caller who owns it, or
	// writes the refusal and reports false.
	Owned func(w http.ResponseWriter, r *http.Request) (scriptID, actor string, ok bool)
	// Viewer is who the request is from, as a decrypt is audited.
	Viewer func(r *http.Request) epsubmit.Viewer
}

Deps carries the reader and the ownership gate.

type Handler

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

Handler serves the submission routes.

func ForPortal

func ForPortal(scripts *scripthttp.Handler, deps scripthttp.Deps, reader *epsubmit.Reader) *Handler

ForPortal builds the handler over the scripts handler's ownership gate and the portal's identity of the caller; nil, which mounts nothing, without a reader.

func New

func New(deps Deps) *Handler

New builds the handler.

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux, wrap func(http.Handler) http.Handler)

Register mounts the routes, each wrapped in the portal authentication middleware. A nil handler mounts nothing.

Jump to

Keyboard shortcuts

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