regions

package
v0.20.8 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package regions is the dependency-free public view of the cloud regions disco's scanners support, per provider. The per-provider lists are the source of truth and live next to each provider's scanner (internal/providers/<p>/<p>regions); each of those SDK-free leaf packages self-registers its list here via init(), so this package links no cloud SDK and names no provider — external callers (e.g. the SaaS control plane) can validate scan regions without either.

Registration is triggered by importing the leaf packages: the disco binary gets it for free (each provider package imports its own <p>regions leaf, and cmd pulls the providers in via internal/providers/all). A standalone consumer that does not import the providers should blank-import github.com/icearp/ disco-cli/regions/all, the build-tag-gated aggregator that wires the leaf packages in (and honours the same `slim` tags as internal/providers/all).

Provider keys are the lower-case wire values "aws", "azure", and "gcp".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func For

func For(provider string) []string

For returns the supported regions for provider in sorted order, or nil for an unknown provider. The returned slice is a copy the caller may retain or mutate.

func Register

func Register(provider string, list []string)

Register records a provider's supported region list. Leaf packages call this from their init(). Later calls for the same provider overwrite earlier ones.

func Valid

func Valid(provider, region string) bool

Valid reports whether region is a supported region for provider. It is an exact, case-sensitive membership test.

Types

This section is empty.

Directories

Path Synopsis
Package all is the single wiring point that registers every provider's supported-region list into the github.com/icearp/disco-cli/regions registry for standalone consumers (e.g.
Package all is the single wiring point that registers every provider's supported-region list into the github.com/icearp/disco-cli/regions registry for standalone consumers (e.g.

Jump to

Keyboard shortcuts

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