application

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 19 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.Module("application",
	fx.Provide(
		New,
		provideRequestUtils,
		provideErrorHandler,
		provideRecoveryMiddleware,
	),
	validation.Module,
)

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(_ 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.Manager
	Sanitizer         sanitization.ServiceInterface
}

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
Package constants provides application-wide constants for HTTP status codes, paths, timeouts, headers, content types, and other configuration values.
Package constants provides application-wide constants for HTTP status codes, paths, timeouts, headers, content types, and other configuration values.
handlers
web
Package web provides HTTP handlers for web-based functionality including authentication, form management, and user interface components.
Package web provides HTTP handlers for web-based functionality including authentication, form management, and user interface components.
Package middleware provides framework-agnostic middleware interfaces and abstractions for the GoForms application.
Package middleware provides framework-agnostic middleware interfaces and abstractions for the GoForms application.
access
Package access provides access control middleware and utilities for the application.
Package access provides access control middleware and utilities for the application.
auth
Package auth provides authentication middleware and utilities for protecting routes and managing user authentication state.
Package auth provides authentication middleware and utilities for protecting routes and managing user authentication state.
chain
Package chain provides chain building logic for middleware orchestration.
Package chain provides chain building logic for middleware orchestration.
context
Package context provides middleware utilities for managing request context and user authentication state.
Package context provides middleware utilities for managing request context and user authentication state.
core
Package core provides the core interfaces and types for middleware functionality.
Package core provides the core interfaces and types for middleware functionality.
request
Package request provides utilities for HTTP request parsing and validation middleware.
Package request provides utilities for HTTP request parsing and validation middleware.
session
Package session provides session management middleware and utilities for the application.
Package session provides session management middleware and utilities for the application.
Package response provides HTTP response handling utilities including error handling, response building, and standardized response formats.
Package response provides HTTP response handling utilities including error handling, response building, and standardized response formats.
Package validation provides comprehensive form validation utilities for validating form schemas, submissions, and generating client-side rules.
Package validation provides comprehensive form validation utilities for validating form schemas, submissions, and generating client-side rules.

Jump to

Keyboard shortcuts

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