Documentation
¶
Overview ¶
Package gitlab lists and mirrors repositories from a self-hosted GitLab instance over its REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client lists and mirrors repositories from a self-hosted GitLab instance.
func (*Client) ListRepos ¶
ListRepos implements backup.Lister by paging through /api/v4/projects. simple=true isn't used here even though it would shrink the payload: it also drops the archived and empty_repo fields from the response, which are exactly the ones this method needs. StateAll makes two passes -- archived=true and archived=false -- since the endpoint has no "give me both" value the way Forgejo's does.
func (*Client) Remote ¶
Remote implements backup.Remoter by deriving the clone URL from the configured base URL rather than the API's own http_url_to_repo, which can report a host or port the caller can't actually reach. The oauth2 user with the token as password is GitLab's documented form for authenticating git-http operations with a personal access token.