Documentation
¶
Overview ¶
Package useremails implements GitLab email address management operations for users.
Index ¶
- func FormatDeleteMarkdownString(o DeleteOutput) string
- func FormatListMarkdownString(out ListOutput) string
- func FormatMarkdownString(out Output) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type AddForUserInput
- type AddInput
- type DeleteForUserInput
- type DeleteInput
- type DeleteOutput
- type GetInput
- type ListForUserInput
- type ListOutput
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDeleteMarkdownString ¶
func FormatDeleteMarkdownString(o DeleteOutput) string
FormatDeleteMarkdownString renders a deletion confirmation.
func FormatListMarkdownString ¶
func FormatListMarkdownString(out ListOutput) string
FormatListMarkdownString formats a list of emails as Markdown.
func FormatMarkdownString ¶
FormatMarkdownString formats a single email as Markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers email management tools.
Types ¶
type AddForUserInput ¶
type AddForUserInput struct {
UserID int64 `json:"user_id" jsonschema:"GitLab user ID,required"`
Email string `json:"email" jsonschema:"Email address to add,required"`
SkipConfirmation bool `json:"skip_confirmation,omitempty" jsonschema:"Skip confirmation email (admin only)"`
}
AddForUserInput holds parameters for adding an email to a specific user.
type AddInput ¶
type AddInput struct {
Email string `json:"email" jsonschema:"Email address to add,required"`
SkipConfirmation bool `json:"skip_confirmation,omitempty" jsonschema:"Skip confirmation email (admin only)"`
}
AddInput holds parameters for adding an email to the current user.
type DeleteForUserInput ¶
type DeleteForUserInput struct {
UserID int64 `json:"user_id" jsonschema:"GitLab user ID,required"`
EmailID int64 `json:"email_id" jsonschema:"Email ID to delete,required"`
}
DeleteForUserInput identifies a user's email to delete.
type DeleteInput ¶
type DeleteInput struct {
EmailID int64 `json:"email_id" jsonschema:"Email ID to delete,required"`
}
DeleteInput identifies an email to delete for the current user.
type DeleteOutput ¶
DeleteOutput confirms an email deletion.
func Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) (DeleteOutput, error)
Delete deletes an email address from the current user.
func DeleteForUser ¶
func DeleteForUser(ctx context.Context, client *gitlabclient.Client, input DeleteForUserInput) (DeleteOutput, error)
DeleteForUser deletes an email address from a specific user (admin only).
type GetInput ¶
type GetInput struct {
EmailID int64 `json:"email_id" jsonschema:"Email ID to retrieve"`
}
GetInput identifies an email by ID.
type ListForUserInput ¶
type ListForUserInput struct {
UserID int64 `json:"user_id" jsonschema:"GitLab user ID"`
Page int `json:"page,omitempty" jsonschema:"Page number for pagination"`
PerPage int `json:"per_page,omitempty" jsonschema:"Items per page (max 100)"`
}
ListForUserInput identifies a user for listing emails.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Emails []Output `json:"emails"`
}
ListOutput holds a list of emails.
func ListForUser ¶
func ListForUser(ctx context.Context, client *gitlabclient.Client, input ListForUserInput) (ListOutput, error)
ListForUser lists email addresses for a specific user.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Email string `json:"email"`
ConfirmedAt string `json:"confirmed_at,omitempty"`
}
Output represents an email address.
func AddForUser ¶
func AddForUser(ctx context.Context, client *gitlabclient.Client, input AddForUserInput) (Output, error)
AddForUser adds an email address to a specific user (admin only).