secrets

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearNamedSecret added in v0.14.8

func ClearNamedSecret(name string) error

func ClearUserHuggingFaceToken

func ClearUserHuggingFaceToken() error

func DefaultDopplerSecretLookup added in v0.14.6

func DefaultDopplerSecretLookup(dopplerPath, key, project, cfg string) (string, error)

DefaultDopplerSecretLookup runs the Doppler CLI to retrieve a single secret value. It hides the console window on Windows to avoid terminal flashes in GUI mode.

func FindDopplerExecutable added in v0.14.6

func FindDopplerExecutable(lookPath func(string) (string, error)) string

FindDopplerExecutable locates the doppler CLI binary. lookPath is injected so callers (and tests) can substitute exec.LookPath. Checks DOPPLER_PATH env override, PATH, and common Windows installation directories.

func MigrateInstallTokenBootstrap

func MigrateInstallTokenBootstrap() (bool, error)

func SetInstallHuggingFaceToken

func SetInstallHuggingFaceToken(token string) error

func SetNamedSecret added in v0.14.8

func SetNamedSecret(name, value string) error

func SetUserHuggingFaceToken

func SetUserHuggingFaceToken(token string) error

func UseMemoryStoreForTests

func UseMemoryStoreForTests() func()

Types

type TokenSource

type TokenSource string
const (
	TokenSourceNone    TokenSource = "none"
	TokenSourceUser    TokenSource = "user"
	TokenSourceInstall TokenSource = "install"
	TokenSourceEnv     TokenSource = "env"
)

type TokenStatus

type TokenStatus struct {
	HasUserToken    bool
	HasInstallToken bool
	ActiveSource    TokenSource
}

func HuggingFaceTokenStatus

func HuggingFaceTokenStatus(envResolver func() string) (TokenStatus, error)

func NamedSecretStatus added in v0.14.8

func NamedSecretStatus(name string, envResolver func() string) (TokenStatus, error)

func ResolveHuggingFaceToken

func ResolveHuggingFaceToken(envResolver func() string) (string, TokenStatus, error)

func ResolveNamedSecret added in v0.14.8

func ResolveNamedSecret(name string, envResolver func() string) (string, TokenStatus, error)

Jump to

Keyboard shortcuts

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