credential

package
v0.0.0-...-f56615f Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package credential resolves model API credentials without coupling command execution or environment precedence to the CLI bootstrap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	LookupEnv      func(string) (string, bool)
	CommandTimeout time.Duration
	StdoutLimit    int
	StderrLimit    int
}

Resolver applies environment > command > static-token precedence.

func (Resolver) Resolve

func (r Resolver) Resolve(ctx context.Context, source Source) (string, error)

type Source

type Source struct {
	Token   string
	Command []string
}

Source describes the user-configurable credential sources. Environment lookup remains a Resolver dependency so tests and embedded clients do not mutate process-global state.

Jump to

Keyboard shortcuts

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