infrastructure

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 infrastructure provides core infrastructure components and their dependency injection setup.

Index

Constants

View Source
const (
	// MinSecretLength is the minimum length required for security secrets
	MinSecretLength = 32
)

Variables

View Source
var Module = fx.Options(
	fx.Provide(

		echo.New,
		server.New,
		NewEventPublisher,

		database.New,
	),
)

Module provides infrastructure dependencies

Functions

func AnnotateHandler

func AnnotateHandler(fn any) fx.Option

AnnotateHandler is a helper function that simplifies the creation of handler providers

func NewEventPublisher added in v0.1.5

func NewEventPublisher(p EventPublisherParams) (formevent.Publisher, error)

NewEventPublisher creates a new event publisher with dependencies

Types

type CoreParams

type CoreParams struct {
	fx.In
	Config   *config.Config
	Logger   logging.Logger
	Renderer view.Renderer
	Echo     *echo.Echo
}

CoreParams groups core infrastructure dependencies

type EventPublisherParams added in v0.1.5

type EventPublisherParams struct {
	fx.In
	Logger logging.Logger
}

EventPublisherParams contains dependencies for creating an event publisher

type ServiceParams

type ServiceParams struct {
	fx.In
	UserService user.Service
	FormService form.Service
}

ServiceParams groups business service dependencies

Directories

Path Synopsis
Package logging provides a unified logging interface
Package logging provides a unified logging interface
repository
Package version provides version information for the application.
Package version provides version information for the application.
Package web provides utilities for handling web assets in the application.
Package web provides utilities for handling web assets in the application.

Jump to

Keyboard shortcuts

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