config

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() string

GetConfigPath returns the path to the config file

func IsFirstRun

func IsFirstRun() bool

IsFirstRun checks if this is the first run (no auth or config)

func Save

func Save(config *Config) error

Save saves the configuration to file

Types

type AccountConfig

type AccountConfig struct {
	Name            string                     `json:"name"`
	DefaultProject  string                     `json:"default_project,omitempty"`
	ProjectDefaults map[string]ProjectDefaults `json:"project_defaults,omitempty"`
}

AccountConfig represents per-account configuration

type Config

type Config struct {
	ClientID       string                   `json:"client_id,omitempty"`
	ClientSecret   string                   `json:"client_secret,omitempty"`
	DefaultAccount string                   `json:"default_account,omitempty"`
	DefaultProject string                   `json:"default_project,omitempty"`
	Accounts       map[string]AccountConfig `json:"accounts,omitempty"`
	Preferences    PreferencesConfig        `json:"preferences,omitempty"`
}

Config represents the application configuration

func Load

func Load() (*Config, error)

Load loads the configuration from file

type PreferencesConfig

type PreferencesConfig struct {
	Editor string `json:"editor,omitempty"`
	Pager  string `json:"pager,omitempty"`
	Color  string `json:"color,omitempty"`
}

PreferencesConfig represents user preferences

type ProjectDefaults

type ProjectDefaults struct {
	DefaultTodoList  string `json:"default_todo_list,omitempty"`
	DefaultCampfire  string `json:"default_campfire,omitempty"`
	DefaultCardTable string `json:"default_card_table,omitempty"`
}

ProjectDefaults represents per-project default settings

Jump to

Keyboard shortcuts

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