Versions in this module Expand all Collapse all v0 v0.4.0 Feb 27, 2025 Changes in this version + func DecodeRequest(r *http.Request, decoder Decoder, body any, args ...any) error + func EncodeResponse[T Success](w http.ResponseWriter, encoder Encoder, value any, status *T) + func GetEncDec(w http.ResponseWriter, r *http.Request) (Encoder, Decoder) + func GetStatus[T Success](object *T) int + type Accepted struct + Header http.Header + func (Accepted) HttpStatus() int + type Context struct + Request *http.Request + func (c Context) Deadline() (deadline time.Time, ok bool) + func (c Context) Done() <-chan struct{} + func (c Context) Err() error + func (c Context) Value(key any) any + type Created struct + Header http.Header + func (Created) HttpStatus() int + type Decoder interface + Decode func(v any) error + type Encoder interface + Encode func(v any) error + type HandleFunc1 func(ctx Context, in H) (*S, error) + func (f HandleFunc1[H, S]) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HandleFunc2 func(ctx Context, in Request[H, B]) (*S, error) + func (f HandleFunc2[H, B, S]) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HandleFunc3 func(ctx Context, in Request[H, B], out *R) (*S, error) + func (f HandleFunc3[H, B, R, S]) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HandleFunc4 func(ctx Context, in H, out *V) (*S, error) + func (f HandleFunc4[H, V, R]) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HandleFunc5 func(ctx Context, in Request[H, B]) (*NoContent, error) + func (f HandleFunc5[H, B]) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HttpResponse interface + HttpResponse func() errors.HttpResponse + type HttpStatus interface + HttpStatus func() int + type NoContent struct + Header http.Header + func (NoContent) HttpStatus() int + type OK struct + Header http.Header + func (OK) HttpStatus() int + type Operation struct + Description string + Errors []error + Header any + ID string + Request any + Responses map[int]any + Security []string + Summary string + Tags []string + func DeleteHandler[T any, S Success](handler HandleFunc1[T, S], id string, summary string, tags []string) *Operation + func GetHandler[H, V any, S Success](handler HandleFunc4[H, V, S], id string, summary string, tags []string) *Operation + func Handle(handler http.Handler, options ...OperationFunc) *Operation + func Handlers(operation *Operation, fn ...func(http.Handler) http.Handler) *Operation + func NewOp1[H any, S Success](handler HandleFunc1[H, S], options ...OperationFunc) *Operation + func NewOp2[H, B any, S Success](handler HandleFunc2[H, B, S], options ...OperationFunc) *Operation + func NewOp3[H, B, R any, S Success](handler HandleFunc3[H, B, R, S], options ...OperationFunc) *Operation + func NewOp4[H, R any, S Success](handler HandleFunc4[H, R, S], options ...OperationFunc) *Operation + func NewOp5[H, B any](handler HandleFunc5[H, B], options ...OperationFunc) *Operation + func PutHandler[H, B, V any, S Success](handler HandleFunc3[H, B, V, S], id string, summary string, tags []string) *Operation + func Security(operation *Operation, s ...string) *Operation + func (o *Operation) OperationContext(reflector *openapi3.Reflector, method string, route string) (openapi.OperationContext, error) + type OperationFunc func(*Operation) + func WithDescription(description string) OperationFunc + func WithErrors(errors ...error) OperationFunc + func WithHandlers(handlers ...func(http.Handler) http.Handler) OperationFunc + func WithHeader(object any) OperationFunc + func WithID(id string) OperationFunc + func WithRequest(object any) OperationFunc + func WithResponse(status int, object any) OperationFunc + func WithSecurity(methods ...string) OperationFunc + func WithSummary(summary string) OperationFunc + func WithTags(tags ...string) OperationFunc + type Request struct + Body V + Header T + type Success interface