cli

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteRulesTable

func WriteRulesTable(w io.Writer, rules []hba.Rule)

WriteRulesTable prints rules in a formatted table to w.

func WriteRulesTableGroupedByUser added in v0.1.4

func WriteRulesTableGroupedByUser(w io.Writer, rwl []hba.RuleWithLine)

WriteRulesTableGroupedByUser prints rules in a table with "=== user: X ===" separators and index column. Rules should be sorted by user so that consecutive rules with the same user form a group.

func WriteRulesTableGroupedByUserNoIndex added in v0.2.2

func WriteRulesTableGroupedByUserNoIndex(w io.Writer, rwl []hba.RuleWithLine)

WriteRulesTableGroupedByUserNoIndex prints rules grouped by user without the index column (copy-paste friendly). Group separators and table headers are prefixed with "# " so they are pg_hba.conf comments when pasted.

func WriteRulesTableNoIndex added in v0.2.2

func WriteRulesTableNoIndex(w io.Writer, rwl []hba.RuleWithLine)

WriteRulesTableNoIndex prints rules in a table without the index column, for copy-paste friendly output. Header and separator lines are prefixed with "# " so they become pg_hba.conf comments when pasted. No tab after "# " so TYPE aligns with the first data column.

func WriteRulesTableWithIndex added in v0.1.8

func WriteRulesTableWithIndex(w io.Writer, rwl []hba.RuleWithLine)

WriteRulesTableWithIndex prints rules with a 1-based index column (#). Use for list when remove is available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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