Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadJSONBody ¶
func WriteJSONResponse ¶
func WriteJSONResponse(payload interface{}, out http.ResponseWriter, _ bunrouter.Request)
func WriteTextResponse ¶
func WriteTextResponse(payload string, out http.ResponseWriter, _ bunrouter.Request)
Types ¶
type CORSHandler ¶
func (CORSHandler) ServeHTTP ¶
func (handler CORSHandler) ServeHTTP(out http.ResponseWriter, in *http.Request)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func FromContext ¶
func (*Server) AddMiddleware ¶
func (server *Server) AddMiddleware(ctx context.Context, middlewares ...func(next bunrouter.HandlerFunc) bunrouter.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.