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 ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.