config

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingSupabaseURL    = newConfigError("missing Supabase URL")
	ErrMissingSupabaseAPIKey = newConfigError("missing Supabase API key")
)

Error definitions

Functions

This section is empty.

Types

type Config

type Config struct {
	SupabaseURL    string `json:"supabase_url,omitempty"`
	SupabaseAPIKey string `json:"supabase_key,omitempty"`
	// contains filtered or unexported fields
}

Config holds the application configuration

func GetConfig added in v0.2.7

func GetConfig() *Config

GetConfig returns the singleton instance of Config

func New

func New() *Config

New creates a new configuration with values from environment variables and config file

func (*Config) BindFlags added in v0.2.7

func (c *Config) BindFlags(flags *pflag.FlagSet) error

BindFlags binds command-line flags to the configuration

func (*Config) IsConfigured added in v0.2.7

func (c *Config) IsConfigured() bool

IsConfigured returns true if the required configuration is present

func (*Config) Save added in v0.2.7

func (c *Config) Save() error

Save writes the configuration to disk

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the required configuration values are set

Jump to

Keyboard shortcuts

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