Documentation
¶
Overview ¶
Package groupsshcerts implements GitLab SSH certificate operations for groups including list, create, and delete.
Index ¶
- func Delete(ctx context.Context, client *gitlabclient.Client, in DeleteInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(o Output) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type CreateInput
- type DeleteInput
- 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 SSH certificate from a group.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown renders a list of SSH certificates as Markdown.
func FormatOutputMarkdown ¶
FormatOutputMarkdown renders a single SSH certificate as Markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers MCP tools for GitLab group SSH certificate operations.
Types ¶
type CreateInput ¶
type CreateInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
Key string `json:"key" jsonschema:"SSH public key content,required"`
Title string `json:"title" jsonschema:"Title for the SSH certificate,required"`
}
CreateInput holds parameters for creating an SSH certificate.
type DeleteInput ¶
type DeleteInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
CertificateID int64 `json:"certificate_id" jsonschema:"SSH certificate ID,required"`
}
DeleteInput holds parameters for deleting an SSH certificate.
type ListInput ¶
type ListInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
}
ListInput holds parameters for listing SSH certificates.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Certificates []Output `json:"certificates"`
}
ListOutput holds the list response.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, in ListInput) (ListOutput, error)
List returns all SSH certificates for a group.
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"`
}
Output represents an SSH certificate.
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, in CreateInput) (Output, error)
Create adds a new SSH certificate to a group.