config

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Env           string         `yaml:"env" envconfig:"ENV"`
	IsDev         bool           `yaml:"isDev" envconfig:"IS_DEV"`
	BaseDir       string         `yaml:"baseDir" envconfig:"BASE_DIR"`
	TestDir       string         `yaml:"testDir" envconfig:"TEST_DIR"`
	EnforceAcl    bool           `yaml:"enforceAcl" envconfig:"ENFORCE_ACL"`
	AutoMigrate   bool           `yaml:"autoMigrate" envconfig:"AUTOMIRGATE"`
	MigrationsDir string         `yaml:"migrationsDir" envconfig:"MIGRATION_DIR"`
	Database      DatabaseConfig `yaml:"database"`
	Server        ServeConfig    `yaml:"server"`
	Endpoints     Endpoints      `yaml:"endpoints"`
	TenantConfig  TenantConfig   `yaml:"tenantConfig"`
}

func New

func New(configFilePath string) (*AppConfig, error)

type DatabaseConfig

type DatabaseConfig struct {
	Type     types.DatabaseType `yaml:"type" envconfig:"DATABASE_TYPE"`
	Host     string             `yaml:"host" envconfig:"DATABASE_HOST"`
	Username string             `yaml:"username" envconfig:"DATABASE_USERNAME"`
	Password string             `yaml:"password" envconfig:"DATABASE_PASSWORD"`
	Name     string             `yaml:"name" envconfig:"DATABASE_NAME"`
	Port     string             `yaml:"port" envconfig:"DATABASE_PORT"`
	SSLMode  string             `yaml:"sslmode" envconfig:"DATABASE_SSLMODE"`
}

type Endpoints

type Endpoints struct {
	AuthEnabled bool `yaml:"authEnabled" envconfig:"AUTH_ENABLED"`
}

type ServeConfig

type ServeConfig struct {
	Port            string `yaml:"port" envconfig:"PORT"`
	Host            string `yaml:"host" envconfig:"HOST"`
	ShutdownTimeout int    `yaml:"shutdownTimeout" envconfig:"SHUTDOWN_TIMEOUT"`
	AllowedOrigins  string `yaml:"allowedOrigins" envconfig:"ALLOWED_ORIGINS"`
}

type TenantConfig

type TenantConfig struct {
	Enabled             bool   `json:"enabled" yaml:"enabled"`
	TenantsTableName    string `json:"tenantsTableName" yaml:"tenantsTableName"`
	TenantSchemaColName string `json:"tenantSchemaColName" yaml:"tenantSchemaColName"`
	BaseDir             string `json:"baseDir" yaml:"baseDir"`
	MigrationPath       string `json:"migrationPath" yaml:"migrationPath"`
	SchemaDerivation    string `json:"schemaDerivation" yaml:"schemaDerivation"`
	SchemaSalt          string `json:"schemaSalt" yaml:"schemaSalt"`
}

Jump to

Keyboard shortcuts

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