gitlab

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: GPL-3.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = config.GetConfig()
View Source
var Tracer = otel.Tracer("pkg/providers/gitlab")

Functions

func StringPtr

func StringPtr(s string) *string

Types

type GitlabProvider

type GitlabProvider struct {
	Client     *clientgo.Client
	Parameters GitlabProviderParameters
	Name       string `json:"name"`
}

GitlabProvider handles GitLab access management Credentials and configurations are specified in the ProviderConfig parameters

func NewGitlabProvider

func NewGitlabProvider(ctx context.Context, config models.ProviderConfig) (*GitlabProvider, error)

NewGitlabProvider initializes a new GitlabProvider with credentials from ProviderConfig

func (*GitlabProvider) GrantAccess

func (a *GitlabProvider) GrantAccess(ctx context.Context, request *models.AccessRequest) error

GrantAccess adds a user to a specified group based on the provider parameters

func (*GitlabProvider) IsAccessExpired

func (a *GitlabProvider) IsAccessExpired(ctx context.Context, request *models.AccessRequest) (bool, error)

IsAccessExpired checks whether the access for the given request has expired

func (*GitlabProvider) ListUsersWithAccess

func (a *GitlabProvider) ListUsersWithAccess(ctx context.Context, roleRef models.AccessRoleRef) ([]string, error)

ListUsersWithAccess lists users with access to the specified role

func (*GitlabProvider) RevokeAccess

func (a *GitlabProvider) RevokeAccess(ctx context.Context, request *models.AccessRequest) error

RevokeAccess removes a user from a specified group based on the provider parameters

type GitlabProviderParameters

type GitlabProviderParameters struct {
	Group    string                    `json:"group"`
	Username string                    `json:"username"`
	Token    string                    `json:"token"`
	Level    clientgo.AccessLevelValue `json:"string"`
}

parameters encapsulates extracted provider details

Jump to

Keyboard shortcuts

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