Documentation ¶ Index ¶ type Error func ErrStatus(status int, message string) Error func NewErr(err error) Error func (e Error) Error() string type Response func JSON(status int, v any) Response func NoContent() Response func Stream(status int, body io.ReadCloser) Response func Text(status int, s string) Response func (r Response) Write(w http.ResponseWriter, logger *zap.Logger) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Error ¶ type Error struct { Status int Message string } func ErrStatus ¶ func ErrStatus(status int, message string) Error func NewErr ¶ func NewErr(err error) Error func (Error) Error ¶ func (e Error) Error() string type Response ¶ type Response struct { // contains filtered or unexported fields } func JSON ¶ func JSON(status int, v any) Response func NoContent ¶ func NoContent() Response func Stream ¶ func Stream(status int, body io.ReadCloser) Response func Text ¶ func Text(status int, s string) Response func (Response) Write ¶ func (r Response) Write(w http.ResponseWriter, logger *zap.Logger) Source Files ¶ View all Source files response.go Click to show internal directories. Click to hide internal directories.