application

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package application provides the application layer components and their dependency injection setup.

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(
		New,
		provideMiddlewareManager,
	),
)

Module represents the application module

Functions

func NewHandlerDeps added in v0.1.5

func NewHandlerDeps(deps Dependencies) (*web.HandlerDeps, error)

NewHandlerDeps creates handler dependencies

Types

type Application added in v0.1.5

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

Application represents the main application

func New added in v0.1.5

func New(lc fx.Lifecycle, deps Dependencies) *Application

New creates a new application instance

func (*Application) Start added in v0.1.5

func (a *Application) Start(ctx context.Context) error

Start starts the application

func (*Application) Stop added in v0.1.5

func (a *Application) Stop(ctx context.Context) error

Stop stops the application

type Dependencies added in v0.1.5

type Dependencies struct {
	fx.In

	// Domain services
	UserService user.Service
	FormService form.Service

	// Infrastructure
	Logger            logging.Logger
	Config            *config.Config
	Server            *server.Server
	DomainModule      fx.Option
	Presentation      fx.Option
	MiddlewareModule  fx.Option
	SessionManager    *session.Manager
	Renderer          view.Renderer
	MiddlewareManager *middleware.Manager
	AccessManager     *access.AccessManager
}

Dependencies holds all application dependencies

func (*Dependencies) Validate added in v0.1.5

func (d *Dependencies) Validate() error

Validate checks if all required dependencies are present

Directories

Path Synopsis
handlers
web
Package middleware provides HTTP middleware components.
Package middleware provides HTTP middleware components.

Jump to

Keyboard shortcuts

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