Documentation
¶
Index ¶
- Constants
- func GetAPIKey(provider string) (string, error)
- func HasAPIKey(provider string) (bool, error)
- func NormalizeRepoPath(path string) (string, error)
- func PromptAndStoreAPIKey(provider string, stdin *os.File, stderr io.Writer) error
- func WorkspaceBaseDir() (string, error)
- type Config
- type Manager
- func (m *Manager) BaseDir() string
- func (m *Manager) CacheDurationHours() int
- func (m *Manager) ConfigPath() string
- func (m *Manager) Get(key string) (string, error)
- func (m *Manager) InitializeGoalsFile() (created bool, path string, hasAPIKey bool, err error)
- func (m *Manager) ListRepositories() []models.RegisteredRepo
- func (m *Manager) LogsDir() string
- func (m *Manager) RegisterRepository(path string) (models.RegisteredRepo, error)
- func (m *Manager) RepositoryPath(name string) (string, bool)
- func (m *Manager) Save() error
- func (m *Manager) Set(key string, value string) error
- func (m *Manager) UnregisterRepository(name string) error
Constants ¶
const ( ConfigEnv = "DEVPULSE_CONFIG" KeyringService = "devpulse" )
Variables ¶
This section is empty.
Functions ¶
func HasAPIKey ¶
HasAPIKey reports whether an API key is available for the provider, matching the precedence of GetAPIKey: the *_API_KEY environment variable first, then the OS keychain.
func NormalizeRepoPath ¶ added in v0.3.0
NormalizeRepoPath returns a cleaned absolute path for a repository registration. It deliberately does not resolve symlinks: the path saved in config should remain the path the user selected while still being stable for relative inputs and duplicate-path checks.
func PromptAndStoreAPIKey ¶
func WorkspaceBaseDir ¶
WorkspaceBaseDir returns the root DevPulse data directory. When the DEVPULSE_CONFIG env var points at a config file, the workspace follows it so notes, goals, cache, and logs live alongside the config; otherwise it is ~/.devpulse.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CacheDurationHours ¶
CacheDurationHours returns the configured cache lifetime in hours.
func (*Manager) ConfigPath ¶
func (*Manager) InitializeGoalsFile ¶
func (*Manager) ListRepositories ¶
func (m *Manager) ListRepositories() []models.RegisteredRepo
func (*Manager) RegisterRepository ¶
func (m *Manager) RegisterRepository(path string) (models.RegisteredRepo, error)
func (*Manager) RepositoryPath ¶
RepositoryPath returns the absolute path for a registered repository name. Returns false if the name is not registered.