Help us shape the future of Go! Take the 2026 Go Developer Survey

credentials

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package credentials resolves the credentials of an action from their sources, the strategies of a CNAB credential set (cnab-spec 802-credential-sets.md), as Porter writes them:

credentials:
  - name: token
    source: { path: /tmp/token }   # env, path, command or value

Only the source of a credential is ever kept: its value is read when the action runs, handed to the runtime, and never written anywhere. A value source is recorded without its value: the action that needs it is given it again.

Index

Constants

View Source
const Redacted = "*******"

Redacted stands for a secret nemo does not record: the value of a value source, of a sensitive parameter or of a write-only output.

Variables

This section is empty.

Functions

func Absolute

func Absolute(strategy valuesource.Strategy, directory string) valuesource.Strategy

Absolute returns the strategy with its path made absolute from directory, so that it reads the same file from anywhere. A path from a variable, $HOME/certs, is left to be expanded where it is read.

func IsUnrecorded added in v0.6.0

func IsUnrecorded(source valuesource.Source) bool

IsUnrecorded reports whether the source is a value source as nemo records it, without its value.

func Merge

func Merge(bundle cnab.ExtendedBundle, base, given []valuesource.Strategy) []valuesource.Strategy

Merge returns the strategies of base the bundle still declares, replaced by the ones given with the same name.

func Parse

func Parse(name, text string) (valuesource.Strategy, error)

Parse reads the command-line form of a credential's source, KEY:VALUE, where KEY is a source of the specification: env, path, command or value.

func Recorded added in v0.6.0

func Recorded(strategies []valuesource.Strategy) []valuesource.Strategy

Recorded returns the strategies as nemo records them, their value sources without their value.

func RecordedSource added in v0.6.0

func RecordedSource(source *valuesource.Source) *valuesource.Source

RecordedSource returns the source as nemo records it.

func Resolve

func Resolve(strategies []valuesource.Strategy, bundle cnab.ExtendedBundle, action string) (valuesource.Set, error)

Resolve reads the credentials that apply to the action, from the host: its files, variables and commands. A credential the bundle does not declare is an error, as is a required one without a source.

Types

This section is empty.

Jump to

Keyboard shortcuts

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