core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v1.0.0

func New[T config.Settings](opts Options[T]) (*baseApp[T], error)

New creates a new application instance

Types

type App

type App[T config.Settings] interface {
	// Core functionality
	Bootstrap(ctx context.Context) error
	Shutdown(ctx context.Context) error
	Run(ctx context.Context) error

	// Configuration access
	Config() *config.CoreConfig
	Settings() T

	// Module management
	RegisterModule(m module.Module) error
	GetModule(name string) (module.Module, bool)
	GetModulesByNamespace(namespace module.ModuleNamespace) map[string]module.Module
	GetModulesInOrder(namespace module.ModuleNamespace) []module.OrderedModule

	// Core services
	Router() *gin.Engine
	DB() *gorm.DB
}

App defines the core application interface

type Options added in v1.0.0

type Options[T config.Settings] struct {
	ConfigPath string
	EnvPrefix  string
}

Options for creating a new application

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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