Documentation
¶
Index ¶
- func GetTime(ctx context.Context) time.Time
- func GetTraceID(ctx context.Context) string
- func IsShutdown(err error) bool
- func NewShutdownError(message string) error
- func Param(r *http.Request, key string) string
- func Respond(ctx context.Context, w http.ResponseWriter, data any, statusCode int) error
- type App
- type Handler
- type MiddleWare
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTraceID ¶
func IsShutdown ¶
func NewShutdownError ¶
Types ¶
type App ¶
type App struct {
*httptreemux.ContextMux
// contains filtered or unexported fields
}
func (*App) Handle ¶
func (a *App) Handle(method string, path string, handler Handler, mw ...MiddleWare)
Handle sets a handler function for a given HTTP method and path pair to the application server mux.
func (*App) SignalShutdown ¶
func (a *App) SignalShutdown()
type MiddleWare ¶
MidHandler is a handler function designed to run code before and/or after another Handler. It is designed to remove boilerplate or other concerns not direct to any given app Handler.
Click to show internal directories.
Click to hide internal directories.