credentials

package
v0.0.0-...-57b7a54 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package credentials resolves credential references against environment variables and the OS keyring.

Lookup order for a reference named "github_pat":

  1. Environment variable OMP_SYNC_GITHUB_PAT
  2. Keyring entry "github_pat" (via zalando/go-keyring)

The CLI never stores raw secrets in the config file; it stores references.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("credential not found")

ErrNotFound is returned when no credential could be located.

Functions

func Delete

func Delete(name string) error

Delete removes a credential from the keyring.

func EnvName

func EnvName(name string) string

EnvName returns the environment-variable name a credential would be looked up under. Useful for actionable error messages (SC-007).

func Lookup

func Lookup(name string) (string, error)

Lookup resolves a credential by name. Returns ErrNotFound if absent. If the lookup fails because of a missing keyring entry AND no env var was provided, the wrapped error includes the expected env var name so the user can act on it.

func Store

func Store(name, value string) error

Store sets a credential in the keyring. Used by `omp-sync config set` for interactive flows.

Types

This section is empty.

Jump to

Keyboard shortcuts

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