Documentation
¶
Overview ¶
Package groupsshcerts implements MCP tools for GitLab group SSH certificate operations.
The package wraps GitLab GraphQL group SSH certificate fields:
Index ¶
- func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
- func Delete(ctx context.Context, client *gitlabclient.Client, in DeleteInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(o Output) string
- type CreateInput
- type DeleteInput
- type ListInput
- type ListOutput
- type Output
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 group SSH certificate actions.
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 one page of a group's SSH CA certificates as a Markdown table, with the pagination GitLab sent so a reader can tell the page from the whole.
func FormatOutputMarkdown ¶
FormatOutputMarkdown renders one SSH CA certificate as a card. A certificate GitLab sent nothing for renders as nothing.
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"`
toolutil.PaginationInput
toolutil.KeysetPaginationInput
}
ListInput holds parameters for listing SSH certificates. It mirrors the offset and keyset pagination supported by the GitLab group SSH certificates list endpoint (page/per_page plus pagination/page_token for keyset traversal).
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Certificates []Output `json:"certificates"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput holds the list response: one page of a group's certificates and the pagination GitLab sent with it.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, in ListInput) (ListOutput, error)
List returns one page of a group's SSH certificates.
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.