fastfixture

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fastfixture is a handler package laid out for both builds.

It exists to compile. Every other test of the second build asserts something about the source that generation produced; this one is the only place both tag configurations are handed to the compiler, which is what would catch two halves that each look right and do not fit together.

The layout is the one decision:transport-source-transform requires and this framework's scaffolds must teach: the shared declarations sit in an untagged file, and the transport handlers in a file the tag can exclude whole. Putting them in one file would take the types out of the second build along with the handler, and the derived copy would have nothing to bind.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Greet

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

Greet is the authored handler, and the only one written here. Its fasthttp counterpart is generated from it, and so is the registration below.

func Handlers

func Handlers() *pw.ServeMux

Handlers is what an entry point mounts.

Types

type Greeted

type Greeted struct {
	Message string `json:"message"`
}

Greeted is what it gets back.

type Greeting

type Greeting struct {
	Name string `json:"name" check:"required"`
}

Greeting is what a caller asks for. It has a field that can arrive in the body, which is what makes the generated binder read the body lazily — the shape that used to refuse the whole derivation on the second run.

Jump to

Keyboard shortcuts

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