Documentation
¶
Overview ¶
Package config provides configuration management for the mink CLI.
Index ¶
Constants ¶
View Source
const ConfigFileName = "mink.yaml"
ConfigFileName is the default config file name
Variables ¶
This section is empty.
Functions ¶
func GenerateYAML ¶
GenerateYAML generates YAML content with comments
Types ¶
type Config ¶
type Config struct {
// Version of the config file format
Version string `yaml:"version"`
// Project configuration
Project ProjectConfig `yaml:"project"`
// Database configuration
Database DatabaseConfig `yaml:"database"`
// EventStore configuration
EventStore EventStoreConfig `yaml:"event_store"`
// Generation configuration
Generation GenerationConfig `yaml:"generation"`
}
Config represents the mink CLI configuration
func FindConfig ¶
FindConfig searches for a config file starting from dir and going up
type DatabaseConfig ¶
type DatabaseConfig struct {
// Driver is the database driver (postgres, memory)
Driver string `yaml:"driver"`
// URL is the database connection string
URL string `yaml:"url,omitempty"`
// Schema is the database schema to use
Schema string `yaml:"schema"`
// MigrationsDir is the directory for migration files
MigrationsDir string `yaml:"migrations_dir"`
}
DatabaseConfig contains database connection settings
type EventStoreConfig ¶
type EventStoreConfig struct {
// TableName for events
TableName string `yaml:"table_name"`
// SnapshotTableName for snapshots
SnapshotTableName string `yaml:"snapshot_table_name"`
// OutboxTableName for outbox messages
OutboxTableName string `yaml:"outbox_table_name"`
}
EventStoreConfig contains event store settings
type GenerationConfig ¶
type GenerationConfig struct {
// AggregatePackage is the package for aggregates
AggregatePackage string `yaml:"aggregate_package"`
// EventPackage is the package for events
EventPackage string `yaml:"event_package"`
// ProjectionPackage is the package for projections
ProjectionPackage string `yaml:"projection_package"`
// CommandPackage is the package for commands
CommandPackage string `yaml:"command_package"`
}
GenerationConfig contains code generation settings
type ProjectConfig ¶
type ProjectConfig struct {
// Name of the project
Name string `yaml:"name"`
// Module is the Go module path
Module string `yaml:"module"`
// SourceDir is the root source directory
SourceDir string `yaml:"source_dir"`
}
ProjectConfig contains project-level settings
Click to show internal directories.
Click to hide internal directories.