jsend

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

Handler is the handler implementation for handling JSON requests and responses

func NewHandler

func NewHandler(
	mode *goflagsmode.Flag,
	rawErrorHandler gonethttphandler.RawErrorHandler,
) (*Handler, error)

NewHandler creates a new JSON handler

Parameters:

  • mode: the flag mode
  • rawErrorHandler: the raw error handler

Returns:

  • *Handler: the created JSON handler
  • error: the error if any

type StreamHandler

StreamHandler is the handler implementation for handling JSON stream requests and responses

func NewStreamHandler

func NewStreamHandler(
	mode *goflagsmode.Flag,
	rawErrorhandler gonethttphandler.RawErrorHandler,
	logger *slog.Logger,
) (
	*StreamHandler,
	error,
)

NewStreamHandler creates a new JSON handler

Parameters:

  • mode: the flag mode
  • rawErrorhandler: the raw error handler
  • logger: the logger

Returns:

  • *StreamHandler: the created JSON handler
  • error: the error if any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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