dburl

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package dburl recognises and redacts database connection URLs. It is the one implementation behind config.Database.Redacted (logs, the admin config API) and the store's own logging, so a password is masked the same way everywhere whatever characters it holds.

Index

Constants

View Source
const Mask = "xxxxx"

Mask replaces a removed password.

Variables

This section is empty.

Functions

func IsPostgres

func IsPostgres(v string) bool

IsPostgres reports whether v is a postgres:// or postgresql:// URL.

func Redact

func Redact(raw string) string

Redact hides the password (and any *password query parameter) in a database URL so it can be logged or shown. Non-URL text that looks like a key=value DSN has its password values masked.

Types

This section is empty.

Jump to

Keyboard shortcuts

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