source

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnauthorized          = errors.Error("unauthorized")
	ErrForbidden             = errors.Error("forbidden")
	ErrNotFound              = errors.Error("not found")
	ErrTokenNotFound         = errors.Error("token not found")
	ErrTokenCreationFailed   = errors.Error("token could not be created")
	ErrTokenRotationFailed   = errors.Error("token could not be rotated")
	ErrTokenRevocationFailed = errors.Error("token could not be revoked")
	ErrLicenseRequired       = errors.Error("enterprise license is required")
)
View Source
const (
	TypePersonal = "personal"
	TypeProject  = "project"
	TypeGroup    = "group"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitLab

type GitLab struct {
	// contains filtered or unexported fields
}

GitLab implements the application TokenSource for GitLab tokens.

func NewGitLabSource

func NewGitLabSource(ctx context.Context, url, token string, obsvr *observe.Observer, opts ...GitLabOption) (*GitLab, error)

func (*GitLab) CreateToken

func (g *GitLab) CreateToken(config *token.Config) (*token.Token, error)

func (*GitLab) DeleteToken

func (g *GitLab) DeleteToken(source *token.Source) error

func (*GitLab) GetToken

func (g *GitLab) GetToken(source *token.Source) (*token.Token, error)

func (*GitLab) RotateToken

func (g *GitLab) RotateToken(config *token.Config) (*token.Token, error)

type GitLabOption

type GitLabOption func(*GitLab)

func WithDryRun

func WithDryRun(dryRun bool) GitLabOption

Jump to

Keyboard shortcuts

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