glinstance

package
v1.71.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHostname = "gitlab.com"
	DefaultProtocol = "https"
	DefaultClientID = "41d48f9422ebd655dd9cf2947d6979681dfaddc6d0c56f7628f6ada59559af1e"
)

Variables

This section is empty.

Functions

func APIEndpoint

func APIEndpoint(hostname, protocol string, apiHost string) string

APIEndpoint returns the REST API endpoint prefix for a GitLab instance :)

func GraphQLEndpoint

func GraphQLEndpoint(hostname, protocol string) string

GraphQLEndpoint returns the GraphQL API endpoint prefix for a GitLab instance :)

func HostnameValidator

func HostnameValidator(v any) error

func IsSelfHosted

func IsSelfHosted(h string) bool

IsSelfHosted reports whether a non-normalized host name looks like a GitLab Self-Managed instance staging.gitlab.com is considered self-managed

func NormalizeHostname

func NormalizeHostname(h string) string

NormalizeHostname returns the canonical host name of a GitLab instance Note: GitLab does not allow subdomains on gitlab.com https://gitlab.com/gitlab-org/gitlab/-/issues/26703

func StripHostProtocol

func StripHostProtocol(h string) (string, string)

StripHostProtocol strips the url protocol and returns the hostname and the protocol

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL