Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
Secret wraps sensitive string values like passwords to prevent accidental exposure in logs, debug output, or error messages. The underlying value is kept private and masked when formatted or printed.
func (Secret) GoString ¶
GoString returns a masked representation for Go's %#v format. This prevents exposure when using fmt.Printf with the %#v verb.
func (Secret) MarshalJSON ¶
MarshalJSON serializes the secret as a plain JSON string. The actual value is preserved during serialization for API communication.
func (Secret) String ¶
String returns a masked representation of the secret. This prevents accidental exposure in logs and debug output.
func (*Secret) UnmarshalJSON ¶
UnmarshalJSON deserializes a JSON string into the secret.