secutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package secutil provides security utility helpers shared across GoCell adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateTLSEndpoint

func ValidateTLSEndpoint(raw string) error

ValidateTLSEndpoint validates that a remote endpoint addr enforces TLS, with a loopback-IP-literal exception for dev/CI testcontainers. Accepts:

  • URL form (scheme://host[:port][/path]): scheme must be one of {https, rediss, tls, wss, vault+https}; or unix:// with an empty host (local socket path only).
  • Bare host:port form: host must be a loopback IP literal (127.x.x.x, ::1, or IPv4-mapped IPv6), OR fail-closed. The string "localhost" is not accepted for non-TLS endpoints.

Returns errcode.ErrAdapterEndpointNotTLS-tagged error otherwise.

ref: docs/plans/202604270020-1-2-ci-3-claude-ship-reactive-bachman.md PR-MODE-1

Types

This section is empty.

Jump to

Keyboard shortcuts

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