authconfig

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() (string, error)

Dir returns the config directory path ($HOME/.config/dune).

func Path

func Path() (string, error)

Path returns the full path to the config file.

func ResetDirFunc

func ResetDirFunc()

ResetDirFunc restores the default config directory function.

func Save

func Save(cfg *Config) error

Save writes the config to disk, creating the directory (0700) and file (0600) as needed.

func SetDirFunc

func SetDirFunc(fn func() (string, error))

SetDirFunc overrides the config directory function (for testing).

Types

type Config

type Config struct {
	APIKey    string `yaml:"api_key"`
	Telemetry *bool  `yaml:"telemetry,omitempty"`
}

Config holds the persisted CLI configuration.

func Load

func Load() (*Config, error)

Load reads and parses the config file. Returns nil, nil if the file does not exist.

Jump to

Keyboard shortcuts

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