config

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ApplicationName string = "a7-journal"

Variables

View Source
var (
	Home          string = os.Getenv("HOME")
	XdgConfigHome string = os.Getenv("XDG_CONFIG_HOME")
	AppConfDir    string = ".a7-journal"
	ConfFileName  string = "conf.ini"
	SshPath       string = filepath.Join(Home, ".ssh")

	ErrHomeConfigEnvVarNotSetError error = errors.New("home and xdg_config_home are not set")
)

Functions

func BuildConfPath

func BuildConfPath(homeDir, xdgConfigHomeDir string) (string, error)

Types

type Conf

type Conf struct {
	JournalPath string
	SshKeyFile  string
	SshPubKey   string
	FirstSetup  bool
	Encrypt     bool
}

func LoadConf

func LoadConf() (*Conf, error)

func NewConf

func NewConf(journalPath, sshKeyPath, sshPubKey string, encrypt bool) *Conf

func (*Conf) CreateJournalPath

func (c *Conf) CreateJournalPath() error

func (*Conf) JournalPathExists

func (c *Conf) JournalPathExists() (bool, error)

func (*Conf) SaveConfig

func (c *Conf) SaveConfig() error

Jump to

Keyboard shortcuts

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