glclient

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 9 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("no authentication token available. Run `gitlab-mcp auth` to generate a token")
	// ErrInvalidScheme is returned when GitLab URL doesn't use HTTPS.
	ErrInvalidScheme = errors.New("GITLAB_URL must use https scheme")
)

Functions

func New

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

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

Types

type Config

type Config struct {
	AccessToken    string
	OAuthTokenFile string
	BaseURL        string // Optional
}

func NewConfig

func NewConfig(fs *pflag.FlagSet) (*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