Skip to main content

Module host

Module host 

Source
Expand description

GitLab instance host validation and resolution.

Two related concerns live here (spec FR-005a/FR-011a, plan §4.1/§4.5):

  • GitlabHost — a validated, policy-gated host newtype, produced once per unique host string encountered in a manifest (a component: prefix) or read from configuration.
  • GitlabInstanceHost — the live-updatable registries.gitlab_instance_host setting, which is both the host project: includes resolve against when set, and the only host GITLAB_TOKEN may ever be attached to (replacing, not extending, gitlab.com).

Structs§

GitlabHost
A validated GitLab instance host.
GitlabInstanceHost
Live-updatable, Arc-shareable handle to the registries.gitlab_instance_host setting (spec FR-011a).

Constants§

GITLAB_COM
The default GitLab.com host — the token host when registries.gitlab_instance_host is unset (FR-005a).
GITLAB_COM_ORIGIN
GITLAB_COM’s normalized, ASCII-serialized origin — the value every token-host comparison runs against for the default (unconfigured) case.

Functions§

is_valid_gitlab_coordinate
Whether s is safe to splice into a GitLab API request path and/or is a syntactically well-formed project/component coordinate.
token_host_origin
The one host PRIVATE-TOKEN may be attached to (FR-005a): the configured registries.gitlab_instance_host’s origin when set, replacing — not joined with — GITLAB_COM_ORIGIN otherwise.