config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config handle user credentials and config fetching/saving

Index

Constants

This section is empty.

Variables

View Source
var (
	PathCredentialsFile = ".config/gira/credentials.toml"
	PathLogsDir         = ".config/gira/logs/"
)

Functions

This section is empty.

Types

type Config

type Config struct {
	General     GeneralConfig     `toml:"general"`
	Credentials CredentialsConfig `toml:"credentials"`
}

Config represents the application configuration

func Load

func Load(basePath string) (Config, error)

Load reads and parses the configuration file from ~/.config/gira/credentials.toml If the file doesn't exist, it creates it with example values

type CredentialsConfig added in v0.1.1

type CredentialsConfig struct {
	Email  string `toml:"email"`
	Secret string `toml:"secret"`
	Domain string `toml:"domain"`
}

CredentialsConfig holds user credentials

type FirstTimeError added in v0.1.1

type FirstTimeError struct {
	Message string
}

func (*FirstTimeError) Error added in v0.1.1

func (e *FirstTimeError) Error() string

type GeneralConfig added in v0.1.1

type GeneralConfig struct {
	Debug bool `toml:"debug"`
}

GeneralConfig holds general application settings

Jump to

Keyboard shortcuts

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