app

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Config *config.Config
	Logger *zap.Logger
	DB     database.DB

	// Clients
	LLMClient clients.LLMClient

	// Components
	FeedbackRepository feedback.Repository
	FeedbackService    feedback.Service
	FeedbackController *feedback.Controller

	// Server
	Router *gin.Engine
}

Container holds all application dependencies.

func NewContainer

func NewContainer(cfg *config.Config, logger *zap.Logger) (*Container, error)

NewContainer creates and wires all application dependencies. It returns an error instead of panicking so that the caller can handle failures gracefully (e.g. flush observability before exit).

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps the HTTP server with graceful shutdown.

func NewServer

func NewServer(container *Container) *Server

NewServer creates a Server from the wired Container.

func (*Server) Run

func (s *Server) Run() error

Run starts the HTTP listener and blocks until SIGINT/SIGTERM is received.

Jump to

Keyboard shortcuts

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