Documentation
¶
Overview ¶
Package enterpriseusers implements GitLab enterprise user operations for groups including list, get, disable 2FA, and delete.
Index ¶
- func Delete(ctx context.Context, client *gitlabclient.Client, in DeleteInput) error
- func Disable2FA(ctx context.Context, client *gitlabclient.Client, in Disable2FAInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(o Output) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type DeleteInput
- type Disable2FAInput
- type GetInput
- type ListInput
- type ListOutput
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, in DeleteInput) error
Delete removes an enterprise user.
func Disable2FA ¶
func Disable2FA(ctx context.Context, client *gitlabclient.Client, in Disable2FAInput) error
Disable2FA disables two-factor authentication for an enterprise user.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown renders enterprise users as a Markdown table.
func FormatOutputMarkdown ¶
FormatOutputMarkdown renders a single enterprise user as Markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers MCP tools for GitLab enterprise user operations.
Types ¶
type DeleteInput ¶
type DeleteInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID,required"`
HardDelete *bool `json:"hard_delete,omitempty" jsonschema:"Permanently delete user instead of soft delete"`
}
DeleteInput holds parameters for deleting an enterprise user.
type Disable2FAInput ¶
type Disable2FAInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID,required"`
}
Disable2FAInput holds parameters for disabling 2FA for an enterprise user.
type GetInput ¶
type GetInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID,required"`
}
GetInput holds parameters for getting a single enterprise user.
type ListInput ¶
type ListInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
Username string `json:"username,omitempty" jsonschema:"Filter by exact username"`
Search string `json:"search,omitempty" jsonschema:"Search by name or username or email"`
Active *bool `json:"active,omitempty" jsonschema:"Filter for active users only"`
Blocked *bool `json:"blocked,omitempty" jsonschema:"Filter for blocked users only"`
CreatedAfter string `json:"created_after,omitempty" jsonschema:"Filter users created after this date (ISO 8601)"`
CreatedBefore string `json:"created_before,omitempty" jsonschema:"Filter users created before this date (ISO 8601)"`
TwoFactor string `json:"two_factor,omitempty" jsonschema:"Filter by 2FA status: enabled or disabled"`
toolutil.PaginationInput
}
ListInput holds parameters for listing enterprise users.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Users []Output `json:"users"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput holds the list response.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, in ListInput) (ListOutput, error)
List returns all enterprise users for a group.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Username string `json:"username"`
Name string `json:"name"`
Email string `json:"email"`
State string `json:"state"`
WebURL string `json:"web_url"`
IsAdmin bool `json:"is_admin"`
Bot bool `json:"bot"`
TwoFactorEnabled bool `json:"two_factor_enabled"`
External bool `json:"external"`
Locked bool `json:"locked"`
CreatedAt string `json:"created_at,omitempty"`
}
Output represents an enterprise user.