config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete() error

Delete removes the config file.

func ExtractAlias added in v0.2.0

func ExtractAlias(spaceURL string) string

ExtractAlias derives an alias from a Backlog space URL. e.g., "https://myteam.backlog.com" -> "myteam"

func Save

func Save(cfg *Config) error

Save writes the config to the config file.

Types

type Config

type Config struct {
	CurrentSpace string                 `yaml:"current_space"`
	Spaces       map[string]SpaceConfig `yaml:"spaces"`
}

Config holds the application configuration supporting multiple spaces.

func Load

func Load() (*Config, error)

Load reads the config file and returns a Config. Automatically migrates from the old single-space format.

func (*Config) Current added in v0.2.0

func (c *Config) Current() *SpaceConfig

Current returns the currently active SpaceConfig, or nil if not set.

func (*Config) SpaceNames added in v0.2.0

func (c *Config) SpaceNames() []string

SpaceNames returns sorted space alias names.

type SpaceConfig added in v0.2.0

type SpaceConfig struct {
	SpaceURL       string `yaml:"space_url"`
	APIKey         string `yaml:"api_key"`
	DefaultProject string `yaml:"default_project,omitempty"`
}

SpaceConfig holds credentials and settings for a single Backlog space.

Jump to

Keyboard shortcuts

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