Help us shape the future of Go! Take the 2026 Go Developer Survey

groupsshcerts

package
v3.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package groupsshcerts implements MCP tools for GitLab group SSH certificate operations.

The package wraps GitLab GraphQL group SSH certificate fields:

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 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

func FormatOutputMarkdown(o Output) string

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"`
	// Fingerprint is the SHA256 fingerprint of the certificate authority's
	// public key, prefixed SHA256:, which GitLab sends on every certificate
	// from 19.5. client-go's GroupSSHCertificate does not model it, so it is
	// read off the captured response (ADR-0021), and an older instance leaves
	// it out.
	Fingerprint string `json:"fingerprint,omitempty"`
	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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL