Documentation ¶
Index ¶
- func APIEndpoint(hostname, protocol string) string
- func Default() string
- func DefaultClientID() string
- func DefaultProtocol() string
- func GraphQLEndpoint(hostname, protocol string) string
- func HostnameValidator(v interface{}) error
- func IsSelfHosted(h string) bool
- func NormalizeHostname(h string) string
- func OverridableDefault() string
- func OverridableDefaultProtocol() string
- func OverrideDefault(newhost string)
- func OverrideDefaultProtocol(newProtocol string)
- func StripHostProtocol(h string) (hostname, protocol string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIEndpoint ¶
APIEndpoint returns the REST API endpoint prefix for a GitLab instance :)
func DefaultClientID ¶ added in v1.40.0
func DefaultClientID() string
func DefaultProtocol ¶
func DefaultProtocol() string
DefaultProtocol returns the protocol of the default GitLab instance
func GraphQLEndpoint ¶
GraphQLEndpoint returns the GraphQL API endpoint prefix for a GitLab instance :)
func HostnameValidator ¶
func HostnameValidator(v interface{}) error
func IsSelfHosted ¶
IsSelfHosted reports whether a non-normalized host name looks like a Self-hosted GitLab instance
func NormalizeHostname ¶
NormalizeHostname returns the canonical host name of a GitLab instance Taking cover in case GitLab allows subdomains on gitlab.com https://gitlab.com/gitlab-org/gitlab/-/issues/26703
func OverridableDefault ¶
func OverridableDefault() string
OverridableDefault is like Default, except it is overridable by the GITLAB_HOST environment variable
func OverridableDefaultProtocol ¶
func OverridableDefaultProtocol() string
OverridableDefaultProtocol is like DefaultProtocol, except it is overridable by the protocol found in the value of the GITLAB_HOST environment variable if a fully qualified URL is given as value
func OverrideDefault ¶
func OverrideDefault(newhost string)
OverrideDefault overrides the value returned from OverridableDefault. This should only ever be called from the main runtime path, not tests.
func OverrideDefaultProtocol ¶
func OverrideDefaultProtocol(newProtocol string)
OverrideDefaultProtocol overrides the value returned from OverridableDefaultProtocol. This should only ever be called from the main runtime path, not tests.
func StripHostProtocol ¶
StripHostProtocol strips the url protocol and returns the hostname and the protocol
Types ¶
This section is empty.