core

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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