basic

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AppGraph wires the application.

Functions

This section is empty.

Types

type App

type App struct {
	Service *Service
}

App is the assembled application.

func InitApp

func InitApp() (*App, *loom.Lifecycle, error)

InitApp builds *App from the graph declared by AppGraph.

func NewApp

func NewApp(svc *Service) *App

NewApp builds the application.

type Config

type Config struct {
	DSN string
}

Config holds static application configuration.

func NewConfig

func NewConfig() *Config

NewConfig loads configuration.

type DB

type DB struct {
	DSN string
}

DB is a database handle.

func NewDB

func NewDB(cfg *Config) *DB

NewDB opens a database.

type Repository

type Repository struct {
	DB *DB
}

Repository exposes user persistence.

func NewRepository

func NewRepository(db *DB) *Repository

NewRepository builds a repository.

type Service

type Service struct {
	Repo *Repository
}

Service contains business logic.

func NewService

func NewService(repo *Repository) *Service

NewService builds the service layer.

Jump to

Keyboard shortcuts

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