Documentation
¶
Overview ¶
Package coreapp provides the application entry point for go-core.
It lives in internal/ rather than the root package because the root package exports types (CacheStore, Config, etc.) that internal packages import. Placing the wiring here avoids circular dependencies.
Index ¶
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
}
App holds the initialized services and handlers for the go-core module. Create via New() or NewWithDB().
func New ¶
New creates a new App by connecting to the database (pgx) and initializing all services and handlers.
func NewWithDB ¶
NewWithDB creates a new App using an externally managed DB pool. The caller is responsible for closing the pool.
func (*App) Close ¶
func (a *App) Close()
Close performs graceful shutdown of all background services and, if the pool was created by New(), closes the database connection pool.
func (*App) RegisterRoutes ¶
RegisterRoutes sets up the Gin template renderer, global middleware, and all route groups on the provided engine. This is a direct transplant of cmd/api/main.go lines ~478-1098.