config

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config provides centralized configuration management for the application. It has no external dependencies to avoid circular imports with other internal packages.

Index

Constants

View Source
const (
	// DirName is the name of the configuration directory
	DirName = "google-readonly"
	// CredentialsFile is the name of the OAuth credentials file
	CredentialsFile = "credentials.json"
	// TokenFile is the name of the OAuth token file (fallback storage)
	TokenFile = "token.json"
)

Variables

This section is empty.

Functions

func GetConfigDir

func GetConfigDir() (string, error)

GetConfigDir returns the configuration directory path, creating it if needed. Uses XDG_CONFIG_HOME if set, otherwise ~/.config/google-readonly

func GetCredentialsPath

func GetCredentialsPath() (string, error)

GetCredentialsPath returns the full path to credentials.json

func GetTokenPath

func GetTokenPath() (string, error)

GetTokenPath returns the full path to token.json (fallback storage)

func ShortenPath

func ShortenPath(path string) string

ShortenPath replaces the home directory prefix with ~ for display purposes. This prevents exposing full paths including usernames in error messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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