Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultAppName = "hyperrr" DefaultAppEnv = "local" DefaultLogLevel = "info" DefaultLogFormat = "text" DefaultServerPort = 8080 DefaultEventBusProvider = "inmem" DefaultWorkflowStoreType = "mem" DefaultNatsStateBucket = "hyperrr_state" DefaultNatsLocksBucket = "hyperrr_locks" DefaultDBDriver = "sqlite" DefaultDBDSN = "hyperrr.db" DefaultStorageProvider = "cloud" DefaultStorageBucketURL = "mem://" DefaultNatsURL = "nats://localhost:4222" DefaultCurrency = "USD" )
Default configuration constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
AppName string `mapstructure:"APP_NAME"`
AppEnv string `mapstructure:"APP_ENV"`
LogLevel string `mapstructure:"LOG_LEVEL"`
LogFormat string `mapstructure:"LOG_FORMAT"`
ServerPort int `mapstructure:"SERVER_PORT"`
EventBusProvider string `mapstructure:"EVENT_BUS_PROVIDER"`
WorkflowStoreType string `mapstructure:"WORKFLOW_STORE_TYPE"`
NATSStateBucket string `mapstructure:"NATS_STATE_BUCKET"`
NATSLocksBucket string `mapstructure:"NATS_LOCKS_BUCKET"`
DBDriver string `mapstructure:"DB_DRIVER"`
DBDSN string `mapstructure:"DB_DSN"`
StorageProvider string `mapstructure:"STORAGE_PROVIDER"`
StoragePath string `mapstructure:"STORAGE_PATH"`
StorageBucketURL string `mapstructure:"STORAGE_BUCKET_URL"`
NATSURL string `mapstructure:"NATS_URL"`
Currency string `mapstructure:"CURRENCY"`
MCPAuthProviders []string `mapstructure:"MCP_AUTH_PROVIDERS"`
AuthProviders []string `mapstructure:"AUTH_PROVIDERS"`
Modules []ModuleConfig `mapstructure:"modules"`
}
Config represents the application configuration.
func LoadWithFile ¶
LoadWithFile loads the configuration from a specific file.
func (*Config) ResolveEnvOptions ¶
func (cfg *Config) ResolveEnvOptions()
ResolveEnvOptions resolves any "env.XXX" references in module options using the OS environment.
type ModuleConfig ¶
type ModuleConfig struct {
Resolve string `mapstructure:"resolve" json:"resolve" yaml:"resolve"`
ID string `mapstructure:"id" json:"id" yaml:"id"`
Options map[string]any `mapstructure:"options" json:"options" yaml:"options"`
}
ModuleConfig represents registration info for a dynamic module.
Click to show internal directories.
Click to hide internal directories.