app

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 39 Imported by: 0

README

internal/app

Pattern used

  • Manual DI via constructor wiring (no service locator).
  • Build in stages: infra -> repositories -> usecases -> handlers -> server.
  • Return startup errors early; clean up already-initialized resources.

How to extend

  • Add constructor wiring in wiring.go.
  • Keep business logic out of this package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config        config.Config
	Logger        logger.Logger
	DBPool        *pgxpool.Pool
	RedisClient   *goredis.Client
	Server        *httpDelivery.Server
	Observability observability.Runtime
}

func New

func New(ctx context.Context) (*App, error)

func (*App) Shutdown

func (a *App) Shutdown(ctx context.Context) error

func (*App) Start

func (a *App) Start() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL