config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 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 Config

type Config struct {
	// Application
	AppEnv        string
	LogLevel      string
	UserID        string
	EncryptionKey string

	// Database
	DatabaseURL    string
	DatabaseDriver string // "postgres", "sqlite", or "auto" (default)
	SQLitePath     string // Path to SQLite database file (default: ~/.orbita/data.db)
	LocalMode      bool   // If true, uses SQLite and disables external services

	// Redis
	RedisURL string

	// RabbitMQ
	RabbitMQURL string

	// Outbox
	OutboxPollInterval     time.Duration
	OutboxBatchSize        int
	OutboxMaxRetries       int
	OutboxStatsInterval    time.Duration
	OutboxRetentionDays    int
	OutboxCleanupInterval  time.Duration
	OutboxProcessorEnabled bool

	// Worker
	WorkerHealthAddr string

	// OAuth
	OAuthProvider     string
	OAuthClientID     string
	OAuthClientSecret string
	OAuthAuthURL      string
	OAuthTokenURL     string
	OAuthRedirectURL  string
	OAuthScopes       string

	// Calendar
	CalendarDeleteMissing bool
	CalendarID            string

	// Calendar Sync (bi-directional)
	CalendarSyncEnabled          bool          // Enable automatic calendar sync
	CalendarSyncInterval         time.Duration // How often to check for external changes
	CalendarSyncLookAheadDays    int           // How far ahead to look for events
	CalendarConflictStrategy     string        // orbita_wins, external_wins, manual, time_first
	CalendarAutoScheduleTasks    bool          // Auto-schedule new tasks
	CalendarAutoScheduleHabits   bool          // Auto-schedule habit sessions
	CalendarAutoScheduleMeetings bool          // Auto-schedule meeting blocks

	// Billing
	StripeAPIKey        string
	StripeWebhookSecret string

	// MCP
	MCPAddr      string
	MCPAuthToken string

	// Plugins
	OrbitSearchPaths  []string
	EngineSearchPaths []string

	// Marketplace
	MarketplaceURL        string
	MarketplaceInstallDir string
}

Config holds application configuration.

func Load

func Load() (*Config, error)

Load loads configuration from environment variables.

func (*Config) IsDevelopment

func (c *Config) IsDevelopment() bool

IsDevelopment returns true if running in development mode.

func (*Config) IsLocalMode added in v0.4.0

func (c *Config) IsLocalMode() bool

IsLocalMode returns true if using SQLite local mode.

func (*Config) IsPostgres added in v0.4.0

func (c *Config) IsPostgres() bool

IsPostgres returns true if using PostgreSQL as the database.

func (*Config) IsProduction

func (c *Config) IsProduction() bool

IsProduction returns true if running in production mode.

func (*Config) IsSQLite added in v0.4.0

func (c *Config) IsSQLite() bool

IsSQLite returns true if using SQLite as the database.

func (*Config) LicenseFilePath added in v0.4.0

func (c *Config) LicenseFilePath() string

LicenseFilePath returns the path to the license file.

Jump to

Keyboard shortcuts

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