Documentation
¶
Overview ¶
Package cloud holds the per-cloud endpoint bases PLAN.md's `cloud` setting selects (global, usgov, china). Everything else that needs a URL takes it from here, so a sovereign cloud is a config value and never a code path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrGraphBaseUndocumented = errors.New("the docs mirror does not document this cloud's Graph service root; set graph_base_url in the profile")
ErrGraphBaseUndocumented is returned when a cloud's Graph service root is not in the docs mirror and the profile did not supply one.
Functions ¶
Types ¶
type Endpoints ¶
type Endpoints struct {
// Name is the config value: global, usgov or china.
Name string
// Graph is the Microsoft Graph base URL, without a trailing slash. An empty
// value means the docs mirror does not state it for this cloud, so the
// profile must supply graph_base_url rather than us guessing a host.
Graph string
// AuthorityHost is the Entra authority base, without a tenant segment.
AuthorityHost string
// KeyVaultSuffix is appended to a vault name to form its DNS name.
KeyVaultSuffix string
// Documented is the refs/ path that states these values, or "" when the
// mirror does not state them (then the value is marked unverified below).
Documented string
}
Endpoints is one Microsoft cloud.
func MustLookup ¶
MustLookup panics on an unknown cloud; used for the compiled-in default.
func (Endpoints) Authority ¶
Authority returns the MSAL authority for a tenant. The tenant path segment is mandatory: MSAL rejects an authority without one (refs/msal-go/apps/internal/oauth/ops/authority/authority.go:533-536).
func (Endpoints) DocumentedGraphBase ¶
DocumentedGraphBase reports whether the mirror states the Graph base URL.
func (Endpoints) KeyVaultURL ¶
KeyVaultURL returns the vault URL for a vault name in this cloud.