secret

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package secret makes accidental formatting/serialization of credentials safe. It does not promise memory erasure or protect values explicitly revealed by application code for use with an external client.

Index

Constants

View Source
const Redacted = "[REDACTED]"

Variables

This section is empty.

Functions

This section is empty.

Types

type String

type String struct {
	// contains filtered or unexported fields
}

String holds a sensitive string. Only Reveal returns the original value.

func New

func New(value string) String

func (String) GoString

func (s String) GoString() string

func (String) IsZero

func (s String) IsZero() bool

func (String) LogValue

func (s String) LogValue() slog.Value

func (String) MarshalJSON

func (s String) MarshalJSON() ([]byte, error)

func (String) MarshalText

func (s String) MarshalText() ([]byte, error)

func (String) Reveal

func (s String) Reveal() string

func (String) String

func (s String) String() string

func (*String) UnmarshalText

func (s *String) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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