setup

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestConnection

func TestConnection(ctx context.Context, instance string, token ...string) error

TestConnection performs a quick connectivity test to the GitLab instance. Accepts an optional token parameter for authentication on private instances.

Types

type InstanceInfo

type InstanceInfo struct {
	Version      string `json:"version"`
	InstanceName string `json:"instance_name,omitempty"`
	URL          string `json:"url"`
}

InstanceInfo contains information about a GitLab instance

func DetectInstanceType

func DetectInstanceType(instance string) (*InstanceInfo, error)

DetectInstanceType attempts to detect the GitLab instance type

type TokenValidationResult

type TokenValidationResult struct {
	Valid    bool   `json:"valid"`
	Username string `json:"username"`
	Error    string `json:"error,omitempty"`
}

TokenValidationResult contains the result of token validation

func ValidateToken

func ValidateToken(instance, token string) (*TokenValidationResult, error)

ValidateToken validates a GitLab personal access token against an instance

Jump to

Keyboard shortcuts

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