httpapi

package
v0.0.0-...-ed59ffc Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocsHandler

func DocsHandler(title string) http.HandlerFunc

func NewHumaConfig

func NewHumaConfig(title, version string, opts ...Option) huma.Config

func NewRouter

func NewRouter(cfg RouterConfig, register func(api huma.API, r chi.Router)) chi.Router

Types

type DeletedResponse

type DeletedResponse struct {
	ID      string `json:"id"`
	Deleted bool   `json:"deleted"`
}

type EmptyInput

type EmptyInput struct{}

type Option

type Option func(*huma.Config)

func WithDescription

func WithDescription(d string) Option

func WithURLEncodedForms

func WithURLEncodedForms() Option

type RouterConfig

type RouterConfig struct {
	Title   string
	Version string
	Options []Option
}

type Server

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

func NewServer

func NewServer(addr string, handler http.Handler) *Server

func (*Server) Addr

func (s *Server) Addr() string

func (*Server) Listen

func (s *Server) Listen() error

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Directories

Path Synopsis
From go-chi https://github.com/go-chi/chi/blob/d32a83448b5f43e42bc96487c6b0b3667a92a2e4/middleware/request_id.go
From go-chi https://github.com/go-chi/chi/blob/d32a83448b5f43e42bc96487c6b0b3667a92a2e4/middleware/request_id.go

Jump to

Keyboard shortcuts

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