glclient

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingToken is returned when GITLAB_TOKEN environment variable is not set.
	ErrMissingToken = errors.New("GITLAB_TOKEN environment variable is not set")
	// ErrInvalidScheme is returned when GitLab URL doesn't use HTTPS.
	ErrInvalidScheme = errors.New("GITLAB_URL must use https scheme")
)

Functions

func New

func New(cfg *Config) (*gitlab.Client, error)

New creates a GitLab client with proper validation and security checks.

Types

type Config

type Config struct {
	GitLabToken string
	GitLabURL   string // Optional
	UserAgent   string
}

func NewConfig

func NewConfig() (*Config, error)

NewConfig creates a new configuration by reading environment variables.

Jump to

Keyboard shortcuts

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