Documentation
¶
Index ¶
- Variables
- func StringPtr(s string) *string
- type GitlabProvider
- func (a *GitlabProvider) GrantAccess(ctx context.Context, request *models.AccessRequest) error
- func (a *GitlabProvider) IsAccessExpired(ctx context.Context, request *models.AccessRequest) (bool, error)
- func (a *GitlabProvider) ListUsersWithAccess(ctx context.Context, roleRef models.AccessRoleRef) ([]string, error)
- func (a *GitlabProvider) RevokeAccess(ctx context.Context, request *models.AccessRequest) error
- type GitlabProviderParameters
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = config.GetConfig()
View Source
var Tracer = otel.Tracer("pkg/providers/gitlab")
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.