Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/cockroachdb/redact
/ functions
Functions
332 in github.com/cockroachdb/redact
⨍
Functions
332
◇
Types & classes
70
↓ 2 callers
Method
escapeToEnd
escapeToEnd escapes occurrences of redaction markers in b.buf[b.validUntil:] and advances b.validUntil until the end.
internal/buffer/buffer.go:248
↓ 2 callers
Method
fmtBool
(v bool, verb rune)
internal/rfmt/print.go:359
↓ 2 callers
Method
fmtBx
fmtBx formats a byte slice as a hexadecimal encoding of its bytes.
internal/rfmt/format.go:436
↓ 2 callers
Method
fmtBytes
(v []byte, verb rune, typeString string)
internal/rfmt/print.go:486
↓ 2 callers
Method
fmtPointer
(value reflect.Value, verb rune)
internal/rfmt/print.go:533
↓ 2 callers
Method
fmtSbx
fmtSbx formats a string or byte slice as a hexadecimal encoding of its bytes.
internal/rfmt/format.go:364
↓ 2 callers
Method
fmtSx
fmtSx formats a string as a hexadecimal encoding of its bytes.
internal/rfmt/format.go:431
↓ 2 callers
Method
handleSpecialValues
( value reflect.Value, t reflect.Type, verb rune, depth int, )
internal/rfmt/helpers.go:115
↓ 2 callers
Function
intFromArg
intFromArg gets the argNumth element of a. On return, isInt reports whether the argument has integer type.
internal/rfmt/print.go:1011
↓ 2 callers
Function
isNaN
(a float64)
internal/rfmt/fmtsort/sort.go:220
↓ 2 callers
Function
newRedactProcessor
(_ context.Context, config *Config)
otelprocessor/processor.go:15
↓ 2 callers
Function
nilCompare
nilCompare checks whether either value is nil. If not, the boolean is false. If either value is nil, the boolean is true and the integer is the compar
internal/rfmt/fmtsort/sort.go:192
↓ 2 callers
Function
redactBytes
redactBytes is the shared implementation for both RedactableString.Redact and RedactableBytes.Redact.
internal/markers/markers.go:95
↓ 2 callers
Method
startUnsafeOverride
()
internal/rfmt/helpers.go:63
↓ 2 callers
Function
tooLarge
tooLarge reports whether the magnitude of the integer is too large to be used as a formatting width or precision.
internal/rfmt/print.go:308
↓ 2 callers
Method
truncateString
truncateString truncates the string s to the specified precision, if present.
internal/rfmt/format.go:319
↓ 1 callers
Method
Cap
Cap returns the capacity of the buffer's underlying byte slice, that is, the total space allocated for the buffer's data.
internal/buffer/buffer.go:124
↓ 1 callers
Function
EndMarker
EndMarker returns the end delimiter for an unsafe string.
api.go:135
↓ 1 callers
Function
EscapeBytes
EscapeBytes escapes markers inside the given byte slice and encloses the entire byte slice between redaction markers. EscapeBytes escapes markers insi
api.go:148
↓ 1 callers
Function
EscapeMarkers
EscapeMarkers escapes the special delimiters from the provided byte slice.
api.go:142
↓ 1 callers
Method
Format
CUSTOM: refer to the original type, not the one defined here.
internal/rfmt/print.go:66
↓ 1 callers
Function
Fprint
Fprint is like Sprint but outputs the redactable string to the provided Writer.
markers_print.go:79
↓ 1 callers
Function
Fprintln
These routines end in 'ln', do not take a format string, always add spaces between operands, and add a newline after the last operand. Fprintln format
internal/rfmt/print.go:270
↓ 1 callers
Method
GoString
()
internal/rfmt/print.go:83
↓ 1 callers
Method
Grow
Grow grows the buffer's capacity, if necessary, to guarantee space for another n bytes. After Grow(n), at least n bytes can be written to the buffer w
internal/buffer/buffer.go:329
↓ 1 callers
Function
HelperForErrorf
HelperForErrorf is a helper to implement a redaction-aware fmt.Errorf-compatible function in a different package. It formats the string according to t
internal/rfmt/helpers.go:162
↓ 1 callers
Function
IsHashingEnabled
IsHashingEnabled returns true if hash-based redaction is enabled.
internal/markers/hash.go:106
↓ 1 callers
Function
Join
Join creates a redactable string from the given slice of redactable strings, adjoined with the provided delimiter.
util.go:45
↓ 1 callers
Method
Precision
Precision returns the value of the precision option and whether it has been set.
internal/rfmt/print.go:55
↓ 1 callers
Function
RedactedMarker
RedactedMarker returns the special string used by Redact.
api.go:138
↓ 1 callers
Function
RegisterSafeType
RegisterSafeType registers a data type to always be considered safe during the production of redactable strings.
internal/rfmt/registry.go:25
↓ 1 callers
Method
SafeBytes
(s i.SafeBytes)
builder/builder.go:138
↓ 1 callers
Method
SafeFloat
SafeFloat emits a safe floating-point value.
interfaces/interfaces.go:63
↓ 1 callers
Method
SafeFloat
SafeFloat is part of the SafeWriter interface.
builder/builder.go:122
↓ 1 callers
Method
SafeFormat
SafeFormat is like the Format method of fmt.Formatter, except that it operates using a SafePrinter instead of a fmt.State for output. The verb argume
interfaces/interfaces.go:31
↓ 1 callers
Method
SafeInt
SafeInt emits a safe integer.
interfaces/interfaces.go:57
↓ 1 callers
Method
SafeInt
SafeInt is part of the SafeWriter interface.
builder/builder.go:110
↓ 1 callers
Method
SafeMessage
SafeMessage implements SafeMessager.
internal/redact/wrappers.go:82
↓ 1 callers
Method
SafeUint
SafeUint emits a safe unsigned integer.
interfaces/interfaces.go:60
↓ 1 callers
Method
SafeUint
SafeUint is part of the SafeWriter interface.
builder/builder.go:116
↓ 1 callers
Function
Sort
Sort accepts a map and returns a SortedMap that has the same keys and values but in a stable sorted order according to the keys, modulo issues raised
internal/rfmt/fmtsort/sort.go:54
↓ 1 callers
Function
SortStrings
SortStrings sorts the provided slice of redactable strings.
util.go:52
↓ 1 callers
Function
Sprintf
Sprintf formats according to a format specifier and returns the resulting string.
internal/rfmt/print.go:225
↓ 1 callers
Function
Sprintfn
Sprintfn produces a RedactableString using the provided SafeFormat-alike function.
markers_print.go:59
↓ 1 callers
Function
Sprintfn
Sprintfn produces a RedactableString using the provided SafeFormat-alike function.
internal/rfmt/helpers.go:145
↓ 1 callers
Function
StartMarker
StartMarker returns the start delimiter for an unsafe string.
api.go:132
↓ 1 callers
Method
ToString
ToString converts the byte slice to a string.
internal/markers/markers.go:134
↓ 1 callers
Method
UnsafeBytes
UnsafeBytes writes an unsafe byte slice.
interfaces/interfaces.go:92
↓ 1 callers
Method
UnsafeBytes
UnsafeBytes is part of the SafeWriter interface.
builder/builder.go:162
↓ 1 callers
Method
UnsafeRune
UnsafeRune is part of the SafeWriter interface.
builder/builder.go:150
↓ 1 callers
Method
Width
Width returns the value of the width option and whether it has been set.
internal/rfmt/print.go:53
↓ 1 callers
Method
badArgNum
(verb rune)
internal/rfmt/print.go:1086
↓ 1 callers
Function
checkBalanced
(t *testing.T, s string)
internal/buffer/buffer_test.go:36
↓ 1 callers
Method
clone
clone is used in tests.
internal/buffer/buffer.go:338
↓ 1 callers
Function
compare
compare compares two values of the same type. It returns -1, 0, 1 according to whether a > b (1), a == b (0), or a < b (-1). If the types differ, it r
internal/rfmt/fmtsort/sort.go:81
↓ 1 callers
Method
fmtBoolean
fmtBoolean formats a boolean.
internal/rfmt/format.go:121
↓ 1 callers
Method
fmtBs
fmtBs formats the byte slice b as if it was formatted as string with fmtS.
internal/rfmt/format.go:358
↓ 1 callers
Method
fmtC
fmtC formats an integer as a Unicode character. If the character is not valid Unicode, it will print '\ufffd'.
internal/rfmt/format.go:459
↓ 1 callers
Method
fmtQc
fmtQc formats an integer as a single-quoted, escaped Go character constant. If the character is not valid Unicode, it will print '\ufffd'.
internal/rfmt/format.go:471
↓ 1 callers
Method
fmtUnicode
fmtUnicode formats a uint64 as "U+0078" or with f.sharp set as "U+0078 'x'".
internal/rfmt/format.go:130
↓ 1 callers
Function
getField
getField gets the i'th field of the struct value. If the field is itself is an interface, return a value for the thing inside the interface, not the i
internal/rfmt/print.go:298
↓ 1 callers
Function
getFormat
(testFmt string)
internal/fmtforward/make_format_test.go:51
↓ 1 callers
Method
init
(buf *buffer)
internal/rfmt/format.go:61
↓ 1 callers
Function
makeMixedRedactableBytes
()
markers_test.go:733
↓ 1 callers
Function
makeMixedRedactableString
()
markers_test.go:723
↓ 1 callers
Function
makeMixedSafe
()
markers_test.go:705
↓ 1 callers
Function
makeMixedSafeStringer
()
markers_test.go:714
↓ 1 callers
Function
makeSlice
makeSlice allocates a slice of size n. If the allocation fails, it panics with ErrTooLarge.
internal/buffer/buffer.go:346
↓ 1 callers
Method
missingArg
(verb rune)
internal/rfmt/print.go:1092
↓ 1 callers
Function
parseArgNumber
parseArgNumber returns the value of the bracketed number, minus 1 (explicit argument numbers are one-indexed but we want zero-indexed). The opening br
internal/rfmt/print.go:1049
↓ 1 callers
Method
processLogBody
(body pcommon.Value)
otelprocessor/processor.go:42
↓ 1 callers
Method
processLogs
(_ context.Context, logs plog.Logs)
otelprocessor/processor.go:23
↓ 1 callers
Method
processResourceLog
(rl plog.ResourceLogs)
otelprocessor/processor.go:32
↓ 1 callers
Method
startRedactable
startRedactable adds the opening redaction marker.
internal/buffer/buffer.go:222
↓ 1 callers
Method
truncate
truncate truncates the byte slice b as a string of the specified precision, if present.
internal/rfmt/format.go:333
↓ 1 callers
Method
unknownType
(v reflect.Value)
internal/rfmt/print.go:328
Function
BenchmarkEscapeMarkers
(b *testing.B)
internal/markers/strip_test.go:353
Function
BenchmarkRedact
(b *testing.B)
bench_test.go:19
Function
BenchmarkRedactCall_HashEnabled
BenchmarkRedactCall_HashMarkers calls .Redact() on a string with ‹†...› hash markers and hashing enabled. This exercises the SHA-256 path.
bench_test.go:40
Function
BenchmarkRedactCall_HashWithSalt
BenchmarkRedactCall_SingleHashWithSalt — 1 ‹†alice› marker, HMAC-SHA256.
bench_test.go:51
Function
BenchmarkRedactCall_RegularRedaction
BenchmarkRedactCall_PlainMarkers calls .Redact() on a string with only regular ‹...› markers (no hash markers). This is the baseline.
bench_test.go:30
Function
BenchmarkStripMarkers_Bytes
(b *testing.B)
internal/markers/strip_test.go:329
Function
BenchmarkStripMarkers_NoMarkers
(b *testing.B)
internal/markers/strip_test.go:337
Function
BenchmarkStripMarkers_NonMarkerUnicode
(b *testing.B)
internal/markers/strip_test.go:345
Function
BenchmarkStripMarkers_String
(b *testing.B)
internal/markers/strip_test.go:321
Function
EndMarker
EndMarker returns the end delimiter for an unsafe string.
internal/markers/markers.go:149
Function
EscapeBytes
EscapeBytes escapes markers inside the given byte slice and encloses the entire byte slice between redaction markers. EscapeBytes escapes markers insi
internal/rfmt/helpers.go:176
Function
Example_format
()
markers_test.go:368
Function
Example_mixed_writes
()
internal/buffer/buffer_test.go:500
Function
Example_newlines
()
internal/buffer/buffer_test.go:490
Method
Flag
(b int)
internal/rfmt/print.go:174
Method
Format
(w fmt.State, _ rune)
markers_test.go:568
Method
Format
(w fmt.State, _ rune)
markers_test.go:576
Method
Format
(fmt.State, rune)
markers_test.go:588
Method
Format
(fmt.State, rune)
markers_test.go:604
Method
Format
Format implements the fmt.Formatter interface.
markers_test.go:642
Method
Format
(s fmt.State, verb rune)
internal/fmtforward/make_format_test.go:47
Method
Format
(s origFmt.State, verb rune)
internal/redact/wrappers.go:42
Method
Format
Format implements the fmt.Formatter interface.
internal/redact/wrappers.go:77
Method
GetValue
()
internal/redact/wrappers.go:71
← previous
next →
101–200 of 332, ranked by callers