Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/cockroachdb/redact
/ types & classes
Types & classes
70 in github.com/cockroachdb/redact
⨍
Functions
332
◇
Types & classes
70
↓ 53 callers
TypeAlias
RedactableString
RedactableString is a string that contains a mix of safe and unsafe bits of data, but where it is known that unsafe bits are enclosed by redaction mar
internal/markers/markers.go:32
↓ 27 callers
TypeAlias
HashString
HashString represents a string that should be hashed when redacted.
interfaces/interfaces.go:175
↓ 18 callers
TypeAlias
RedactableBytes
RedactableBytes is like RedactableString but is a byte slice. Instances of RedactableBytes should not be constructed directly; instead use the facili
internal/markers/markers.go:76
↓ 18 callers
TypeAlias
safe
markers_test.go:278
↓ 9 callers
TypeAlias
SafeString
SafeString represents a string that is not a sensitive value.
interfaces/interfaces.go:99
↓ 4 callers
TypeAlias
HashInt
HashInt represents an integer that should be hashed when redacted.
interfaces/interfaces.go:181
↓ 3 callers
TypeAlias
HashFloat
HashFloat represents a floating-point value that should be hashed when redacted.
interfaces/interfaces.go:193
↓ 2 callers
TypeAlias
SafeFloat
SafeFloat represents a floating-point value that is not a sensitive value.
interfaces/interfaces.go:117
↓ 2 callers
TypeAlias
SafeInt
SafeInt represents an integer that is not a sensitive value.
interfaces/interfaces.go:105
↓ 2 callers
TypeAlias
SafeRune
SafeRune aliases rune. See the explanation for SafeString.
interfaces/interfaces.go:123
↓ 2 callers
TypeAlias
SafeUint
SafeUint represents an integer that is not a sensitive value.
interfaces/interfaces.go:111
↓ 1 callers
TypeAlias
HashByte
HashByte represents a byte that should be hashed when redacted.
interfaces/interfaces.go:205
↓ 1 callers
TypeAlias
HashBytes
HashBytes represents a byte slice that should be hashed when redacted.
interfaces/interfaces.go:211
↓ 1 callers
TypeAlias
HashRune
HashRune represents a rune that should be hashed when redacted.
interfaces/interfaces.go:199
↓ 1 callers
TypeAlias
HashUint
HashUint represents an unsigned integer that should be hashed when redacted.
interfaces/interfaces.go:187
↓ 1 callers
TypeAlias
safeint
markers_test.go:282
↓ 1 callers
TypeAlias
sortableSlice
sortableSlice attaches the methods of sort.Interface to []RedactableString, sorting in increasing order.
util.go:58
Struct
Buffer
Buffer is a variable-sized buffer of bytes with a Write method. Writes are escaped in different ways depending on the output mode.
internal/buffer/buffer.go:30
Struct
Config
otelprocessor/config.go:5
Interface
Formatter
Formatter is implemented by any value that has a Format method. The implementation controls how State and rune are interpreted, and may call Sprint(f)
internal/rfmt/print.go:64
Interface
GoStringer
GoStringer is implemented by any value that has a GoString method, which defines the Go syntax for that value. The GoString method is used to print va
internal/rfmt/print.go:82
Interface
HashValue
HashValue is a marker interface to be implemented by types whose values should be hashed when redacted, instead of being replaced with the redaction m
interfaces/interfaces.go:170
TypeAlias
OutputMode
OutputMode determines how writes are processed in the Buffer.
internal/buffer/buffer.go:38
TypeAlias
SafeByte
SafeByte represents a byte that is not a sensitive value.
interfaces/interfaces.go:129
TypeAlias
SafeBytes
SafeBytes represents a byte slice that is not a sensitive value.
interfaces/interfaces.go:135
Interface
SafeFormatter
SafeFormatter is implemented by object types that want to separate safe and non-safe information when printed out by a Printf-like formatter.
interfaces/interfaces.go:22
Interface
SafePrinter
SafePrinter is a stateful helper that abstracts an output stream in the context of printf-like formatting, but with the ability to separate safe and u
interfaces/interfaces.go:41
Interface
SafeValue
SafeValue is a marker interface to be implemented by types that alias base Go types and whose natural representation via Printf is always safe for rep
interfaces/interfaces.go:157
Interface
SafeWriter
SafeWriter provides helper functions for use in implementations of SafeFormatter, to format mixes of safe and unsafe strings.
interfaces/interfaces.go:52
Struct
SortedMap
Note: Throughout this package we avoid calling reflect.Value.Interface as it is not always legal to do so and it's easier to avoid the issue than to f
internal/rfmt/fmtsort/sort.go:23
Interface
State
State represents the printer state passed to custom formatters. It provides access to the io.Writer interface plus information about the flags and opt
internal/rfmt/print.go:49
Struct
StringBuilder
StringBuilder accumulates strings with optional redaction markers. It implements io.Writer but marks direct writes as redactable. To distinguish safe
builder/builder.go:31
Interface
Stringer
Stringer is implemented by any value that has a String method, which defines the `native` format for that value. The String method is used to print va
internal/rfmt/print.go:74
Struct
TestConfig
otelprocessor/processor_test.go:13
Struct
User
hash_redact_test.go:223
Struct
buffer
CUSTOM: smarter buffer.
internal/rfmt/print.go:87
Struct
complexObj
markers_test.go:546
Struct
compose
markers_test.go:270
Struct
fmt
A fmt is the raw formatter used by Printf etc. It prints into a buffer that must be set up separately.
internal/rfmt/format.go:44
Struct
fmtFlags
flags placed in a separate struct for easy clearing.
internal/rfmt/format.go:26
Struct
fmter
markers_test.go:639
Struct
fmtformatter
markers_test.go:564
Struct
formatTester
internal/fmtforward/make_format_test.go:43
FuncType
formatterFn
func(format string, args ...interface{}) string
markers_test.go:387
Struct
hashRestorer
internal/rfmt/helpers.go:84
Struct
hasherState
hasherState holds a reusable hash.Hash and a pre-allocated Sum buffer. sumBuf must live in the pool because Sum() is an interface method — the compile
internal/markers/hash.go:59
Struct
mixedInts
markers_test.go:656
Struct
mixedRedactableBytes
markers_test.go:688
Struct
mixedRedactableString
markers_test.go:680
Struct
mixedSafe
markers_test.go:664
Struct
mixedSafeStringer
markers_test.go:672
TypeAlias
overrideMode
internal/rfmt/helpers.go:27
Struct
panicObj1
markers_test.go:578
Struct
panicObj2
markers_test.go:584
Struct
panicObj3
markers_test.go:606
Struct
panicObj4
markers_test.go:616
Struct
pp
pp is used to store a printer's state and is reused with sync.Pool to avoid allocations.
internal/rfmt/print.go:108
Struct
redactProcessor
otelprocessor/processor.go:11
Struct
restorer
internal/rfmt/helpers.go:73
Struct
s
Also a struct containing the safe type.
internal/rfmt/registry_test.go:29
TypeAlias
safeInt
markers_test.go:523
Struct
safeNil
markers_test.go:648
Struct
safeWrapper
internal/redact/wrappers.go:63
Struct
safefmtformatter
markers_test.go:570
Struct
safemsg
markers_test.go:612
Struct
safepanicObj1
markers_test.go:590
Struct
safepanicObj2
markers_test.go:598
Struct
safestringer
markers_test.go:556
Struct
stringer
markers_test.go:550
Struct
unsafeWrap
internal/redact/wrappers.go:36