Documentation
¶
Overview ¶
Package repo says which repository an address names.
`git@gitlab.com:Acme/Web.git` and `https://gitlab.com/acme/web` are the same repository, so the identity is the host and the path, lowercased. The path is the owner and the name, with whatever groups sit between them on a host that nests them (GitLab's subgroups: `gitlab.com/acme/tools/web`). An address that does not name a host, an owner and a name is not a repository, which is also where `file://`, `ext::` and a pasted web page stop.
SSH or HTTPS is transport, not identity: it follows from the credential the repository is read with. Ports and users are the host's, not the repository's, so `https://git.example.com:3000/acme/web` and `ssh://git@git.example.com:2222/acme/web.git` are both the repository `https://git.example.com/acme/web`; Hosts says how each host is reached when not on the usual ports.
Index ¶
Constants ¶
const MaxDepth = 21
MaxDepth is how many segments a repository's path may have: GitLab nests up to twenty groups, and nothing deeper is a repository.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Host ¶
type Host struct {
HTTPSPort int `toml:"https_port"`
SSHPort int `toml:"ssh_port"`
SSHUser string `toml:"ssh_user"`
}
Host is how a host is reached when not over HTTPS on 443 and SSH as `git` on 22, as a Gitea or Forgejo on `:3000` and `:2222` is. A port of 0 is the usual one.
type Hosts ¶
Hosts are the hosts reached otherwise, by host name as repositories name them (lowercased). A host that is not here is reached the usual way.
type Repo ¶
Repo is one repository, however its address was written. Path is `owner/name`, or `owner/group/…/name` on a host with nested groups.