Documentation
¶
Index ¶
- type App
- func (app *App) Run() error
- func (app *App) WithBasePath(basePath string) *App
- func (app *App) WithBuildInfo(buildInfo model.BuildInfo) *App
- func (app *App) WithLog(log *slog.Logger) *App
- func (app *App) WithObservability(observability *o11.ObservabilityInst) *App
- func (app *App) WithServer(server Server) *App
- type Handlers
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) WithBasePath ¶
WithBasePath sets the base path for all routes and returns the app instance for chaining
func (*App) WithBuildInfo ¶
WithBuildInfo sets the build information and returns the app instance for chaining
func (*App) WithObservability ¶
func (app *App) WithObservability(observability *o11.ObservabilityInst) *App
WithObservability allows setting up observability providers (tracing, metrics) and returns the app instance for chaining
func (*App) WithServer ¶
type Server ¶
type Server interface {
Start() error
Stop(ctx context.Context) error
Handle(pattern string, handler http.Handler)
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
HandleWithMiddleware(pattern string, handler http.Handler, middlewares ...middleware.Middleware)
HandleFuncWithMiddleware(pattern string, handler func(http.ResponseWriter, *http.Request), middlewares ...middleware.Middleware)
}
Server defines the interface for any HTTP server implementation This interface is defined in the consumer (app) package
Click to show internal directories.
Click to hide internal directories.