groupldap

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package groupldap implements MCP tool handlers for GitLab group LDAP link operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteForProvider

func DeleteForProvider(ctx context.Context, client *gitlabclient.Client, input DeleteForProviderInput) error

DeleteForProvider deletes a group LDAP link for a specific provider.

func DeleteWithCNOrFilter

func DeleteWithCNOrFilter(ctx context.Context, client *gitlabclient.Client, input DeleteWithCNOrFilterInput) error

DeleteWithCNOrFilter deletes a group LDAP link by CN or filter.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown renders a list of group LDAP links as Markdown.

func FormatOutputMarkdown

func FormatOutputMarkdown(out Output) string

FormatOutputMarkdown renders a single group LDAP link as Markdown.

func RegisterTools

func RegisterTools(server *mcp.Server, client *gitlabclient.Client)

RegisterTools registers group LDAP link tools on the MCP server.

Types

type AddInput

type AddInput struct {
	GroupID      string `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	CN           string `json:"cn,omitempty" jsonschema:"LDAP Common Name (CN)"`
	Filter       string `json:"filter,omitempty" jsonschema:"LDAP filter"`
	GroupAccess  int    `json:"group_access" jsonschema:"Access level (10=Guest 20=Reporter 30=Developer 40=Maintainer 50=Owner),required"`
	Provider     string `json:"provider" jsonschema:"LDAP provider name,required"`
	MemberRoleID *int64 `json:"member_role_id,omitempty" jsonschema:"Custom member role ID"`
}

AddInput holds parameters for adding a group LDAP link.

type DeleteForProviderInput

type DeleteForProviderInput struct {
	GroupID  string `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	Provider string `json:"provider" jsonschema:"LDAP provider name,required"`
	CN       string `json:"cn" jsonschema:"LDAP Common Name,required"`
}

DeleteForProviderInput holds parameters for deleting a group LDAP link for a specific provider.

type DeleteOutput

type DeleteOutput = toolutil.DeleteOutput

DeleteOutput confirms the deletion of an LDAP link.

type DeleteWithCNOrFilterInput

type DeleteWithCNOrFilterInput struct {
	GroupID  string `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	CN       string `json:"cn,omitempty" jsonschema:"LDAP Common Name to delete"`
	Filter   string `json:"filter,omitempty" jsonschema:"LDAP filter to delete"`
	Provider string `json:"provider,omitempty" jsonschema:"LDAP provider name"`
}

DeleteWithCNOrFilterInput holds parameters for deleting a group LDAP link by CN or filter.

type ListInput

type ListInput struct {
	GroupID string `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
}

ListInput holds parameters for listing group LDAP links.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Links []Output `json:"links"`
}

ListOutput holds a list of group LDAP links.

func List

func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)

List retrieves all LDAP links for a group.

type Output

type Output struct {
	toolutil.HintableOutput
	CN           string `json:"cn"`
	Filter       string `json:"filter,omitempty"`
	GroupAccess  int    `json:"group_access"`
	Provider     string `json:"provider"`
	MemberRoleID int64  `json:"member_role_id,omitempty"`
}

Output represents a single group LDAP link.

func Add

func Add(ctx context.Context, client *gitlabclient.Client, input AddInput) (Output, error)

Add creates a new group LDAP link.

Jump to

Keyboard shortcuts

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