all

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 10 Imported by: ? modules, 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

View Source
var Component = &component.Component{
	Dependencies: component.Components{
		manager.Component,
		migrator.Component,
		sqlGenerator.Component,
		mysql.Component,
	},
	Configuration: component.StepFunc(func(container container.Container) error {
		return container.Invoke(func(managerCfg *dbClient.Config, migratorCfg *dbMigrator.Config, generatorCfg *dbSqlGenerator.Config) {
			if strings.ToLower(managerCfg.Driver) != strings.ToLower(mysql.MySQL) {
				return
			}

			migratorCfg.Driver = mysql.MySQL
			generatorCfg.Driver = mysql.MySQL
		})
	}),
}

Component is a complete MySQL integration that automatically:

  • Provides the MySQL client
  • Registers MySQL with db-client
  • Registers MySQL migration driver with db-migrator
  • Registers MySQL dialect with db-sql-generator
  • Automatically propagates driver selection to all components

Usage (recommended for single-database applications):

compogo.WithComponents(
    db_client.Component,
    db_migrator.Component,
    db_sql_generator.Component,
    mysql.Component,
    all.Component,  // ← everything automatically wired
)

Then just select the driver via flag:

./myapp --db.driver=mysql --db.mysql.dsn="..."

The migrator and SQL generator will automatically use the same driver.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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