Documentation
¶
Overview ¶
Package memberroles implements GitLab member role operations at instance and group level including list, create, and delete.
Index ¶
- func DeleteGroup(ctx context.Context, client *gitlabclient.Client, in DeleteGroupInput) error
- func DeleteInstance(ctx context.Context, client *gitlabclient.Client, in DeleteInstanceInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(o Output) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type CreateGroupInput
- type CreateInstanceInput
- type DeleteGroupInput
- type DeleteInstanceInput
- type ListGroupInput
- type ListInstanceInput
- type ListOutput
- type Output
- type Permissions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteGroup ¶
func DeleteGroup(ctx context.Context, client *gitlabclient.Client, in DeleteGroupInput) error
DeleteGroup deletes a group-level member role.
func DeleteInstance ¶
func DeleteInstance(ctx context.Context, client *gitlabclient.Client, in DeleteInstanceInput) error
DeleteInstance deletes an instance-level member role.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown renders a list of member roles as Markdown.
func FormatOutputMarkdown ¶
FormatOutputMarkdown renders a single member role as Markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers MCP tools for GitLab member role operations.
Types ¶
type CreateGroupInput ¶
type CreateGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
Name string `json:"name" jsonschema:"Name of the custom role,required"`
BaseAccessLevel int `json:"base_access_level" jsonschema:"Base access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer),required"`
Description string `json:"description,omitempty" jsonschema:"Description of the custom role"`
Permissions
}
CreateGroupInput holds parameters for creating a group member role.
type CreateInstanceInput ¶
type CreateInstanceInput struct {
Name string `json:"name" jsonschema:"Name of the custom role,required"`
BaseAccessLevel int `json:"base_access_level" jsonschema:"Base access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer),required"`
Description string `json:"description,omitempty" jsonschema:"Description of the custom role"`
Permissions
}
CreateInstanceInput holds parameters for creating an instance member role.
type DeleteGroupInput ¶
type DeleteGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
MemberRoleID int64 `json:"member_role_id" jsonschema:"Member role ID to delete,required"`
}
DeleteGroupInput holds parameters for deleting a group member role.
type DeleteInstanceInput ¶
type DeleteInstanceInput struct {
MemberRoleID int64 `json:"member_role_id" jsonschema:"Member role ID to delete,required"`
}
DeleteInstanceInput holds parameters for deleting an instance member role.
type ListGroupInput ¶
type ListGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
}
ListGroupInput holds parameters for listing group member roles.
type ListInstanceInput ¶
type ListInstanceInput struct{}
ListInstanceInput holds parameters for listing instance member roles.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Roles []Output `json:"roles"`
}
ListOutput holds the list response.
func ListGroup ¶
func ListGroup(ctx context.Context, client *gitlabclient.Client, in ListGroupInput) (ListOutput, error)
ListGroup returns all member roles for a group.
func ListInstance ¶
func ListInstance(ctx context.Context, client *gitlabclient.Client, _ ListInstanceInput) (ListOutput, error)
ListInstance returns all instance-level member roles.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
GroupID int64 `json:"group_id,omitempty"`
BaseAccessLevel int `json:"base_access_level"`
Permissions
}
Output represents a member role.
func CreateGroup ¶
func CreateGroup(ctx context.Context, client *gitlabclient.Client, in CreateGroupInput) (Output, error)
CreateGroup creates a new group-level member role.
func CreateInstance ¶
func CreateInstance(ctx context.Context, client *gitlabclient.Client, in CreateInstanceInput) (Output, error)
CreateInstance creates a new instance-level member role.
type Permissions ¶
type Permissions struct {
AdminCICDVariables *bool `json:"admin_cicd_variables,omitempty" jsonschema:"Allow admin CI/CD variables"`
AdminComplianceFramework *bool `json:"admin_compliance_framework,omitempty" jsonschema:"Allow admin compliance framework"`
AdminGroupMembers *bool `json:"admin_group_member,omitempty" jsonschema:"Allow admin group members"`
AdminMergeRequests *bool `json:"admin_merge_request,omitempty" jsonschema:"Allow admin merge requests"`
AdminPushRules *bool `json:"admin_push_rules,omitempty" jsonschema:"Allow admin push rules"`
AdminTerraformState *bool `json:"admin_terraform_state,omitempty" jsonschema:"Allow admin Terraform state"`
AdminVulnerability *bool `json:"admin_vulnerability,omitempty" jsonschema:"Allow admin vulnerability"`
AdminWebHook *bool `json:"admin_web_hook,omitempty" jsonschema:"Allow admin webhooks"`
ArchiveProject *bool `json:"archive_project,omitempty" jsonschema:"Allow archive project"`
ManageDeployTokens *bool `json:"manage_deploy_tokens,omitempty" jsonschema:"Allow manage deploy tokens"`
ManageGroupAccessTokens *bool `json:"manage_group_access_tokens,omitempty" jsonschema:"Allow manage group access tokens"`
ManageMergeRequestSettings *bool `json:"manage_merge_request_settings,omitempty" jsonschema:"Allow manage MR settings"`
ManageProjectAccessTokens *bool `json:"manage_project_access_tokens,omitempty" jsonschema:"Allow manage project access tokens"`
ManageSecurityPolicyLink *bool `json:"manage_security_policy_link,omitempty" jsonschema:"Allow manage security policy link"`
ReadCode *bool `json:"read_code,omitempty" jsonschema:"Allow read code"`
ReadRunners *bool `json:"read_runners,omitempty" jsonschema:"Allow read runners"`
ReadDependency *bool `json:"read_dependency,omitempty" jsonschema:"Allow read dependency"`
ReadVulnerability *bool `json:"read_vulnerability,omitempty" jsonschema:"Allow read vulnerability"`
RemoveGroup *bool `json:"remove_group,omitempty" jsonschema:"Allow remove group"`
RemoveProject *bool `json:"remove_project,omitempty" jsonschema:"Allow remove project"`
}
Permissions represents the optional permission flags for a custom member role.