postgres

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger implements audit.Logger against PostgreSQL.

func NewLogger

func NewLogger(pool *pgxpool.Pool) *Logger

NewLogger creates an audit Logger backed by the given pool.

func (*Logger) Log

func (l *Logger) Log(ctx context.Context, entry audit.Entry) error

Log inserts an audit entry into the audit_log table.

func (*Logger) Query

func (l *Logger) Query(ctx context.Context, filter audit.Filter) ([]audit.Entry, error)

Query returns audit entries matching the filter, newest first.

Jump to

Keyboard shortcuts

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