responder

package
v0.0.0-...-8c601d7 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = zerolog.New(os.Stdout).With().Str("service", "responder").Timestamp().Logger()

Functions

func New

Types

type DetailResponse

type DetailResponse struct {
	// Human-readable detail of the response.
	Detail string `json:"detail"`
}

type NewParams

type NewParams struct {
	EnvService poeticmetric.EnvService
}

type Responder

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

func (*Responder) Detail

func (r *Responder) Detail(w http.ResponseWriter, status int, detail string)

func (*Responder) Error

func (r *Responder) Error(w http.ResponseWriter, err error)

func (*Responder) Forbidden

func (r *Responder) Forbidden(w http.ResponseWriter)

func (*Responder) JSON

func (r *Responder) JSON(w http.ResponseWriter, status int, data any)

func (*Responder) NotFound

func (r *Responder) NotFound(w http.ResponseWriter)

func (*Responder) String

func (r *Responder) String(w http.ResponseWriter, contentType string, data []byte)

func (*Responder) Unauthorized

func (r *Responder) Unauthorized(w http.ResponseWriter)

Jump to

Keyboard shortcuts

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