heldcredentials

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 5 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 heldcredentials keeps every credential this process has held, so that no log line or status output carries one, whatever a provider sends back. Code that reads or receives a credential remembers it; the proxy log, the command line's output and the menu snapshot remove every remembered credential on the way out. Code that writes a log line or an error needs to do nothing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Remember

func Remember(credentials ...string)

Remember adds credentials to those removed from output. Values shorter than minimumLength are not credentials and are ignored.

func Remove

func Remove(text string) string

Remove replaces every remembered credential in text, and the start of one cut short, with "[credential removed]". Where credentials share a start, such as two JWTs from one issuer, the longest match is removed.

func RemoveFromMessage

func RemoveFromMessage(message proto.Message)

RemoveFromMessage removes every remembered credential from each string in message, however deeply nested.

Types

type RemovingWriter

type RemovingWriter struct{ Output io.Writer }

RemovingWriter writes to Output with every remembered credential removed. Each write must hold whole lines, as the standard logger's do, so that no credential is split across two writes.

func (RemovingWriter) Write

func (writer RemovingWriter) Write(text []byte) (int, error)

Jump to

Keyboard shortcuts

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