config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config provides credential management functionality for git-bulk operations. It handles loading and parsing credentials from various sources including environment variables and configuration files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCredentialsFile

func FindCredentialsFile() string

FindCredentialsFile looks for a credentials file in common locations

Types

type CredentialsLoader

type CredentialsLoader struct {
	// contains filtered or unexported fields
}

CredentialsLoader handles loading credentials from files and environment variables

func NewCredentialsLoader

func NewCredentialsLoader(credentialsPath string) *CredentialsLoader

NewCredentialsLoader creates a new credentials loader

func (*CredentialsLoader) GetCredential

func (c *CredentialsLoader) GetCredential(key string) string

GetCredential gets a credential value, checking environment variables first, then the file

func (*CredentialsLoader) ListCredentials

func (c *CredentialsLoader) ListCredentials() map[string]bool

ListCredentials returns all available credentials (for debugging/status)

func (*CredentialsLoader) LoadCredentials

func (c *CredentialsLoader) LoadCredentials() error

LoadCredentials loads credentials from the file if it exists

func (*CredentialsLoader) SetEnvironmentFromFile

func (c *CredentialsLoader) SetEnvironmentFromFile() error

SetEnvironmentFromFile sets environment variables from the loaded credentials file This is useful for tools that expect environment variables

Jump to

Keyboard shortcuts

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