Versions in this module Expand all Collapse all v0 v0.1.4 Sep 16, 2023 v0.1.3 Aug 24, 2023 Changes in this version + func ReadJSONBody(in bunrouter.Request, target interface{}) error + func WriteJSONResponse(payload interface{}, out http.ResponseWriter, _ bunrouter.Request) + func WriteTextResponse(payload string, out http.ResponseWriter, _ bunrouter.Request) + type CORSHandler struct + Next http.Handler + func (handler CORSHandler) ServeHTTP(out http.ResponseWriter, in *http.Request) + type Server struct + func FromContext(ctx context.Context) *Server + func GetServer() *Server + func New(version, port int, db *database.DBConn, translator *translate.Translator, ...) *Server + func ToContext(ctx context.Context, version, port int, db *database.DBConn, ...) (*Server, context.Context) + func (server *Server) AddMiddleware(ctx context.Context, ...) + func (server *Server) AddRoutes(ctx context.Context, static bool, ...) + func (server *Server) Addresses() []string + func (server *Server) Run(ctx context.Context) error + func (server *Server) ToContext(ctx context.Context) context.Context