infrastructure

package
v0.511.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

Infrastructure Module

Infrastructure adapters for parser, config loading, metadata loading, and output rendering.

Files

File Responsibility
doc.go Declares the infrastructure package placeholder
config/viper/loader.go Loads YAML policy overrides through Viper
logger/logger.go Constructs *slog.Logger instances for server and MCP surfaces
metadata/ Holds optional metadata-provider adapters
output/ Holds result rendering adapters
parser/ Holds parser adapter modules
runtimeconfig/ Loads non-policy process settings (logging, metadata timeout) from YAML

Exports

  • logger.NewLogger — creates *slog.Logger for server/MCP surfaces (default: stderr, JSON, info)
  • logger.NewStdLogger — bridges *slog.Logger to *log.Logger for legacy middleware
  • logger.Config — level, format, output, file path, and optional rotation configuration
  • logger.RotateConfig — rotation settings: enabled, max size, max backups, max age, compress (defaults: 100MB, 3, 30 days, true)
  • runtimeconfig.Load — reads runtime config YAML, returns Config (empty path returns zero config)
  • runtimeconfig.ParseConnectTimeout — parses duration string for metadata connect timeout (empty/zero = unset)
  • runtimeconfig.Config — holds logging and metadata runtime settings
  • runtimeconfig.LoggingConfig — level, format, output, file, and rotation for runtime logging
  • runtimeconfig.RotateConfig — rotation settings (pointer fields distinguish unset from explicit zero)
  • runtimeconfig.MetadataConfig — metadata connection settings (connect_timeout duration string)

Dependencies

  • Upstream: internal/application
  • Downstream: internal/infrastructure/config/viper, internal/infrastructure/metadata, internal/infrastructure/output, internal/infrastructure/parser, external libraries and runtimes

Update Rule

  • If members/interfaces/dependencies change, update this file in same change.

Documentation

Overview

Package infrastructure contains external adapters used by the application. input: domain/application integration needs and external libraries output: parser, config, and rendering adapter implementations pos: infrastructure boundary around external integrations note: if this file changes, update this header and module README.md.

Directories

Path Synopsis
config
viper
Package viperconfig loads YAML policy files through Viper.
Package viperconfig loads YAML policy files through Viper.
Package logger provides a unified structured logging foundation for DeltaScope surfaces.
Package logger provides a unified structured logging foundation for DeltaScope surfaces.
metadata
mysql
Package mysqlmeta implements metadata-aware audit adapters over the MySQL protocol.
Package mysqlmeta implements metadata-aware audit adapters over the MySQL protocol.
postgresql
Package postgresqlmeta implements metadata-aware audit adapters over PostgreSQL.
Package postgresqlmeta implements metadata-aware audit adapters over PostgreSQL.
Package output provides shared output formatting utilities.
Package output provides shared output formatting utilities.
githubactions
Package githubactions renders audit results as GitHub Actions workflow commands.
Package githubactions renders audit results as GitHub Actions workflow commands.
githubsummary
Package githubsummary renders concise GitHub Actions job summaries.
Package githubsummary renders concise GitHub Actions job summaries.
gitlabcodequality
Package gitlabcodequality renders audit results as GitLab Code Quality JSON.
Package gitlabcodequality renders audit results as GitLab Code Quality JSON.
json
Package jsonrender renders audit results as machine-oriented JSON.
Package jsonrender renders audit results as machine-oriented JSON.
markdown
Package markdown renders audit results as human-readable Markdown.
Package markdown renders audit results as human-readable Markdown.
sarif
Package sarif renders audit results as SARIF 2.1.0 JSON.
Package sarif renders audit results as SARIF 2.1.0 JSON.
parser
postgresql
Package postgresql provides the PostgreSQL query access stub when built without the postgresql tag.
Package postgresql provides the PostgreSQL query access stub when built without the postgresql tag.
tidb
Package tidbparser extracts parser-neutral statements from TiDB AST nodes.
Package tidbparser extracts parser-neutral statements from TiDB AST nodes.
Package runtimeconfig loads non-policy process settings for server and MCP operations.
Package runtimeconfig loads non-policy process settings for server and MCP operations.

Jump to

Keyboard shortcuts

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