golazy.dev golazy.dev / lazycontroller Index | Files

package lazycontroller

import "golazy.dev/lazycontroller"

Functions

func Bind[T any]

func Bind[T any](
	ctx context.Context,
	factory Factory[T],
	action func(*T, http.ResponseWriter, *http.Request) error,
) http.Handler

func Error

func Error(status int, err error) error

func WithWriter

func WithWriter(ctx context.Context, writer http.ResponseWriter) context.Context

Types

type Action

type Action func(http.ResponseWriter, *http.Request) error