reverb

package module
v0.0.0-...-378a5be Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: 0BSD Imports: 4 Imported by: 0

README

Reverb

A minimalistic server-side web framework written in Go, designed to be partially compatible with Echo.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustSubFS

func MustSubFS(fsys fs.FS, dir string) fs.FS

func NotFoundHandler

func NotFoundHandler(c Context) error

Types

type Context

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

func (Context) Cookie

func (c Context) Cookie(name string) (*http.Cookie, error)

func (Context) JSON

func (c Context) JSON(status int, v any) error

func (Context) Param

func (c Context) Param(name string) string

func (Context) Request

func (c Context) Request() *http.Request

func (Context) Response

func (c Context) Response() *Response

func (Context) SetCookie

func (c Context) SetCookie(cookie *http.Cookie)

func (Context) String

func (c Context) String(status int, text string) error

type DefaultBinder

type DefaultBinder struct{}

func (*DefaultBinder) BindBody

func (b *DefaultBinder) BindBody(c Context, v any) error

type HandlerFunc

type HandlerFunc func(Context) error

type Response

type Response struct {
	Writer http.ResponseWriter
}

type Reverb

type Reverb struct {
	HideBanner bool // Unused.
	HidePort   bool // Unused.
	// contains filtered or unexported fields
}

func New

func New() *Reverb

func (*Reverb) DELETE

func (r *Reverb) DELETE(path string, handler HandlerFunc)

func (*Reverb) GET

func (r *Reverb) GET(path string, handler HandlerFunc)

func (*Reverb) PATCH

func (r *Reverb) PATCH(path string, handler HandlerFunc)

func (*Reverb) POST

func (r *Reverb) POST(path string, handler HandlerFunc)

func (*Reverb) PUT

func (r *Reverb) PUT(path string, handler HandlerFunc)

func (*Reverb) Start

func (r *Reverb) Start(addr string) error

func (*Reverb) Use

func (r *Reverb) Use(func(HandlerFunc) HandlerFunc)

Directories

Path Synopsis
cmd
example command

Jump to

Keyboard shortcuts

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