credentials

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package credentials resolves operator-configured secret references. It never stores secrets in project files or returns backend output in errors.

Index

Constants

View Source
const MaxSecretBytes = 64 << 10
View Source
const Service = "skill-cli"

Variables

This section is empty.

Functions

func Normalize

func Normalize(value string) (string, error)

Normalize permits a trailing line ending from stdin or a secret manager, but rejects controls before any value reaches HTTP headers or child environments.

func ValidEnv

func ValidEnv(name string) bool

func ValidName

func ValidName(name string) bool

func Validate

func Validate(name string, d Definition) error

Types

type Definition

type Definition struct {
	Source  string   `json:"source"`
	Env     string   `json:"env,omitempty"`
	Command []string `json:"command,omitempty"`
}

type Error

type Error struct{ Code, Message, Hint string }

func (*Error) Error

func (e *Error) Error() string

type OSStore

type OSStore struct{}

func (OSStore) Delete

func (OSStore) Delete(name string) error

func (OSStore) Get

func (OSStore) Get(name string) (string, error)

func (OSStore) Set

func (OSStore) Set(name, value string) error

type Resolver

type Resolver struct {
	Definitions map[string]Definition
	// contains filtered or unexported fields
}

func New

func New(defs map[string]Definition, store Store) *Resolver

func (*Resolver) Delete

func (r *Resolver) Delete(name string) error

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, name string) (string, error)

func (*Resolver) Set

func (r *Resolver) Set(name, value string, replace bool) error

func (*Resolver) Status

func (r *Resolver) Status(ctx context.Context, name string, checkCommand bool) Status

func (*Resolver) StoreBackend

func (r *Resolver) StoreBackend() Store

StoreBackend shares the trusted host's configured OS store with the separate OAuth session manager. It never exports credentials through CLI or gateway.

type Status

type Status struct {
	Name   string `json:"name"`
	Source string `json:"source"`
	State  string `json:"state"`
	Code   string `json:"code,omitempty"`
}

type Store

type Store interface {
	Get(string) (string, error)
	Set(string, string) error
	Delete(string) error
}

Store is scoped to this application's namespace. No bulk deletion or secret enumeration is exposed by the CLI.

Jump to

Keyboard shortcuts

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