httpapi

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

README

HTTP Interface Module

Thin HTTP adapter for exposing the offline DeltaScope audit engine as a JSON service.

Files

File Responsibility
handler.go Binds HTTP requests to the public audit API and renders JSON responses
handler_test.go Verifies HTTP request binding, error mapping, and JSON response shape
server.go Assembles the HTTP mux and long-running server wiring

Exports

  • NewHandler(configPath, version) (http.Handler, error)
  • NewServer(addr, configPath, version)

Notes

  • The HTTP layer is adapter-only: it reuses the same offline audit engine as the CLI and library.
  • Config hot-reload is achieved by re-reading the configured policy path on each audit request, so file updates take effect without restarting the server.
  • The service intentionally stays JSON-only in this milestone.

Dependencies

  • Upstream: cmd/deltascope-server
  • Downstream: pkg/deltascope, internal/application/policy

Update Rule

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

Documentation

Overview

Package httpapi exposes the HTTP adapter for DeltaScope. input: HTTP requests carrying SQL audit payloads plus service-level config/version wiring output: JSON audit, health, version, and structured error responses pos: interface adapter between net/http and the public DeltaScope audit API note: if this file changes, update this header and module README.md.

Package httpapi exposes the HTTP adapter for DeltaScope. input: listen addresses plus service-level config/version wiring output: ready-to-run HTTP server instances for the JSON audit service pos: long-running net/http server assembly for the HTTP interface milestone note: if this file changes, update this header and module README.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(configPath, version string) (http.Handler, error)

NewHandler returns the JSON HTTP adapter for DeltaScope.

func NewServer

func NewServer(addr, configPath, version string) (*http.Server, error)

NewServer builds the DeltaScope HTTP service.

Types

This section is empty.

Jump to

Keyboard shortcuts

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