config

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Project    ProjectConfig    `mapstructure:"project"`
	Database   DatabaseConfig   `mapstructure:"database"`
	Paths      PathsConfig      `mapstructure:"paths"`
	Generation GenerationConfig `mapstructure:"generation"`
	Tenant     TenantConfig     `mapstructure:"tenant"`
	Security   SecurityConfig   `mapstructure:"security"`
}

type DBConnConfig

type DBConnConfig struct {
	Driver string `mapstructure:"driver"`
	DSN    string `mapstructure:"dsn"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Default DBConnConfig `mapstructure:"default"`
	Admin   DBConnConfig `mapstructure:"admin"`
	Pool    PoolConfig   `mapstructure:"pool"`
}

type FeatureConfig

type FeatureConfig struct {
	SoftDelete bool `mapstructure:"soft_delete"`
	Timestamps bool `mapstructure:"timestamps"`
	JSONTags   bool `mapstructure:"json_tags"`
}

type GenerationConfig

type GenerationConfig struct {
	Dialect  string        `mapstructure:"dialect"`
	Package  string        `mapstructure:"package"`
	Naming   NamingConfig  `mapstructure:"naming"`
	Tags     []string      `mapstructure:"tags"`
	Features FeatureConfig `mapstructure:"features"`
}

type NamingConfig

type NamingConfig struct {
	Table string `mapstructure:"table"`
	Field string `mapstructure:"field"`
}

type PathsConfig

type PathsConfig struct {
	Models     string `mapstructure:"models"`
	Migrations string `mapstructure:"migrations"`
	Seeders    string `mapstructure:"seeders"`
}

type PoolConfig

type PoolConfig struct {
	MaxOpen     int           `mapstructure:"max_open"`
	MaxIdle     int           `mapstructure:"max_idle"`
	MaxLifetime time.Duration `mapstructure:"max_lifetime"`
}

type ProjectConfig

type ProjectConfig struct {
	Name   string `mapstructure:"name"`
	Module string `mapstructure:"module"`
}

type SecurityConfig

type SecurityConfig struct {
	MaxRowsDefault int  `mapstructure:"max_rows_default"`
	GuardStrict    bool `mapstructure:"guard_strict"`
}

type TenantConfig

type TenantConfig struct {
	Strategy         string        `mapstructure:"strategy"`
	TenantIDRegex    string        `mapstructure:"tenant_id_regex"`
	MaxCachedTenants int           `mapstructure:"max_cached_tenants"`
	ClientTTL        time.Duration `mapstructure:"client_ttl"`
}

Jump to

Keyboard shortcuts

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