gitlabpat

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 9 Imported by: 0

Documentation

Overview

Package gitlabpat contains a Veles Secret type and a Detector for Gitlab Personal Access Tokens (prefix `glpat-`).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDetector

func NewDetector() veles.Detector

NewDetector returns a new Detector that matches Gitlab Personal Access Tokens.

func NewValidator

func NewValidator() *simplevalidate.Validator[GitlabPAT]

NewValidator creates a new Validator for Gitlab PATs via the Gitlab API endpoint.

It performs a GET request to the gitlab.com access token endpoint using the PAT in the PRIVATE-TOKEN header. If the request returns HTTP 200, the key is considered valid. If 401 Unauthorized, the key is invalid. Other errors return ValidationFailed.

Types

type GitlabPAT

type GitlabPAT struct {
	Pat string
}

GitlabPAT is a Veles Secret that holds relevant information for a Gitlab Personal Access Tokens (prefix `glpat-`). GitlabPAT represents PAT and used to authenticate requests

Jump to

Keyboard shortcuts

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