auth

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigDir

func DefaultConfigDir() string

DefaultConfigDir returns the default glab config directory path.

Types

type Credentials

type Credentials struct {
	Host     string
	Token    string
	Protocol string // "https" or "http"
}

Credentials holds the GitLab host and token.

func ReadCredentials

func ReadCredentials(configDir, host string) (*Credentials, error)

ReadCredentials reads glab credentials from the config file. If host is empty, returns the first host found (in file order). If host is specified, returns credentials for that specific host. configDir is the path to the glab config directory (e.g., ~/.config/glab-cli).

Jump to

Keyboard shortcuts

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