config

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config provides configuration management for cfl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() string

DefaultConfigPath returns the default configuration file path.

Types

type Config

type Config struct {
	URL          string `yaml:"url"`
	Email        string `yaml:"email"`
	APIToken     string `yaml:"api_token"`
	DefaultSpace string `yaml:"default_space,omitempty"`
	OutputFormat string `yaml:"output_format,omitempty"`
}

Config holds the cfl configuration.

func Load

func Load(path string) (*Config, error)

Load reads the configuration from the specified path.

func LoadWithEnv

func LoadWithEnv(path string) (*Config, error)

LoadWithEnv loads configuration from file and overrides with environment variables.

func (*Config) LoadFromEnv

func (c *Config) LoadFromEnv()

LoadFromEnv loads configuration from environment variables. Environment variables override existing values only if set and non-empty. Precedence: CFL_* → ATLASSIAN_* → existing config value

func (*Config) NormalizeURL

func (c *Config) NormalizeURL()

NormalizeURL ensures the URL has the /wiki suffix for Confluence Cloud.

func (*Config) Save

func (c *Config) Save(path string) error

Save writes the configuration to the specified path.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks that all required fields are present and valid.

Jump to

Keyboard shortcuts

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