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 (acomponent:prefix) or read from configuration.GitlabInstanceHost— the live-updatableregistries.gitlab_instance_hostsetting, which is both the hostproject:includes resolve against when set, and the only hostGITLAB_TOKENmay ever be attached to (replacing, not extending,gitlab.com).
Structs§
- Gitlab
Host - A validated GitLab instance host.
- Gitlab
Instance Host - Live-updatable,
Arc-shareable handle to theregistries.gitlab_instance_hostsetting (spec FR-011a).
Constants§
- GITLAB_
COM - The default GitLab.com host — the token host when
registries.gitlab_instance_hostis 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
sis 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-TOKENmay be attached to (FR-005a): the configuredregistries.gitlab_instance_host’s origin when set, replacing — not joined with —GITLAB_COM_ORIGINotherwise.