jsonutil

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalFromFile

func UnmarshalFromFile[T any](filePath string) (T, error)

Unmarshals the given type from the given JSON file.

func WrapHandler

func WrapHandler[RequestT any, ResponseT any](
	handler func(
		req *http.Request,
		requestBody RequestT,
	) (
		httpStatus int,
		responseBody optionals.Optional[ResponseT],
		err error,
	),
) caddyhttp.Handler

Wraps the given handler function with a layer that handles the marshalling and unmarshalling of request/response modies.

Types

This section is empty.

Jump to

Keyboard shortcuts

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