Documentation
¶
Overview ¶
Package keys implements MCP tools for GitLab SSH key operations.
The package wraps the GitLab Keys API:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionSpecs ¶
func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
ActionSpecs returns canonical specs for SSH key lookup actions exposed through gitlab_user.
func FormatMarkdown ¶
func FormatMarkdown(out Output) *mcp.CallToolResult
FormatMarkdown formats a key as Markdown.
func FormatMarkdownString ¶
FormatMarkdownString renders a key as Markdown.
Types ¶
type GetByFingerprintInput ¶
type GetByFingerprintInput struct {
Fingerprint string `json:"fingerprint" jsonschema:"SSH key fingerprint (e.g. SHA256:abc123 or MD5:aa:bb:cc),required"`
}
GetByFingerprintInput is the input for getting a key by fingerprint.
type GetByIDInput ¶
type GetByIDInput struct {
KeyID int64 `json:"key_id" jsonschema:"SSH key ID,required"`
}
GetByIDInput is the input for getting a key by its ID.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Title string `json:"title"`
Key string `json:"key"`
CreatedAt string `json:"created_at,omitempty"`
User UserOutput `json:"user"`
}
Output represents an SSH key with its associated user.
func GetKeyByFingerprint ¶
func GetKeyByFingerprint(ctx context.Context, client *gitlabclient.Client, input GetByFingerprintInput) (Output, error)
GetKeyByFingerprint retrieves an SSH key by its fingerprint.
func GetKeyWithUser ¶
func GetKeyWithUser(ctx context.Context, client *gitlabclient.Client, input GetByIDInput) (Output, error)
GetKeyWithUser retrieves an SSH key and the user it belongs to.
type UserOutput ¶
type UserOutput struct {
ID int64 `json:"id"`
Username string `json:"username"`
Name string `json:"name"`
}
UserOutput represents the user associated with a key.
Click to show internal directories.
Click to hide internal directories.