config

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCacheTTL = 24 * time.Hour
)

Default values

Variables

View Source
var (
	BuildSupabaseURL     string
	BuildSupabaseAnonKey string
)

Functions

func GetConfigDir

func GetConfigDir() (string, error)

GetConfigDir returns the configuration directory (public helper)

Types

type Config

type Config struct {
	// Supabase configuration
	SupabaseURL     string `env:"SUPABASE_URL" yaml:"supabase_url"`
	SupabaseAnonKey string `env:"SUPABASE_ANON_KEY" yaml:"supabase_anon_key"`

	// Auth configuration
	AuthToken string `env:"AUTH_TOKEN" yaml:"auth_token"`

	// Cache configuration
	CacheDir string        `env:"CACHE_DIR" yaml:"cache_dir"`
	CacheTTL time.Duration `env:"CACHE_TTL" yaml:"cache_ttl"`

	// General settings
	Debug   bool `env:"DEBUG" yaml:"debug"`
	NoColor bool `env:"NO_COLOR" yaml:"no_color"`
}

Config holds all configuration for the CLI

func Load

func Load() (*Config, error)

Load loads configuration from environment and config file

func (*Config) Save

func (c *Config) Save() error

Save saves configuration to file

Jump to

Keyboard shortcuts

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