Categorygithub.com/podhmo/quickapi
modulepackage
0.0.0
Repository: https://github.com/podhmo/quickapi.git
Documentation: pkg.go.dev

# README

quickapi (WIP)

not fast implementation, but quick web API development

Warning 🚧 This package is under construction, so all examples may not work correctly.

We need the type just like this.

type Action[I any, O any] func(ctx context.Context, input I) (output O, err error)

and lift it.

func ListTodo(context.Context, quickapi.Empty) ([]Todo, error) {
    return []Todo{{Title: "foo"}}, nil
}

r.Get("/todos", quickapi.Lift(ListTodo))

experimental openapi support

:warning: this is experimental feature, using quickapi/experimental/define package can be able to define openapi doc with define router.

how to use

see examples

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
Lift transforms Action to http.Handler.
No description provided by the author

# Variables

A good base middleware stack https://github.com/go-chi/chi.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author

# Type aliases

No description provided by the author
Empty is zero Input.
ErrorResponse represents a normal error response type.