Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedactionFunc ¶
RedactionFunc defines the signature for redaction functions.
type RedactionHandler ¶
type RedactionHandler struct {
// contains filtered or unexported fields
}
RedactionHandler is a custom slog.Handler that applies a redaction pipeline.
func NewRedactionHandler ¶
func NewRedactionHandler(handler slog.Handler, pipeline *RedactionPipeline) *RedactionHandler
NewRedactionHandler initializes a new RedactionHandler.
func (*RedactionHandler) Enabled ¶
Enabled reports whether the handler is enabled for the given level. Necessary to implement the slog.Handler interface.
func (*RedactionHandler) Handle ¶
Handle processes the log record through the redaction pipeline before handling it
type RedactionPipeline ¶
type RedactionPipeline struct {
// contains filtered or unexported fields
}
RedactionPipeline manages a list of redaction stages.
func NewRedactionPipeline ¶
func NewRedactionPipeline() *RedactionPipeline
NewRedactionPipeline initializes a new redaction pipeline.
func (*RedactionPipeline) AddRedactField ¶
func (p *RedactionPipeline) AddRedactField(fieldName string)
AddRedactField adds a redaction stage for a specific field.
Click to show internal directories.
Click to hide internal directories.