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

groupimportexport

package
v3.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package groupimportexport implements MCP tools for GitLab group import and export operations.

The package wraps the GitLab Group import/export 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 group import and export actions.

The three routes mirror the client-go GroupImportExportService one-to-one: ScheduleExport (POST groups/{id}/export), ExportDownload (GET groups/{id}/export/download), and ImportFile (POST groups/import). Each carries non-generic discovery metadata (Usage, Aliases, RelatedActions, and a "Returns: … See also: …" individual-tool description) so neither the dynamic, meta, nor individual surface inherits placeholder text (1:1 audit R-META).

func FormatExportDownloadMarkdown

func FormatExportDownloadMarkdown(out ExportDownloadOutput) *mcp.CallToolResult

FormatExportDownloadMarkdown formats the download result.

func FormatImportFileMarkdown

func FormatImportFileMarkdown(out ImportFileOutput) *mcp.CallToolResult

FormatImportFileMarkdown formats the import result.

func FormatScheduleExportMarkdown

func FormatScheduleExportMarkdown(out ScheduleExportOutput) *mcp.CallToolResult

FormatScheduleExportMarkdown formats the schedule export result.

func ValidActions

func ValidActions() string

ValidActions returns description of available meta-tool actions.

Types

type ExportDownloadInput

type ExportDownloadInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
}

ExportDownloadInput is the input for downloading a group export.

type ExportDownloadOutput

type ExportDownloadOutput struct {
	toolutil.HintableOutput
	ContentBase64 string `json:"content_base64"`
	SizeBytes     int    `json:"size_bytes"`
}

ExportDownloadOutput is the output for downloading a group export.

func ExportDownload

func ExportDownload(ctx context.Context, client *gitlabclient.Client, input ExportDownloadInput) (ExportDownloadOutput, error)

ExportDownload downloads the finished export archive of a group as base64.

client-go buffers the body before it hands it back, so the shared ceiling is also set as a response limit on this one request, which stops the read of an archive over it where it happens.

type ImportFileInput

type ImportFileInput struct {
	Name     string `json:"name" jsonschema:"Name for the imported group,required"`
	Path     string `json:"path" jsonschema:"URL path for the imported group,required"`
	File     string `` /* 222-byte string literal not displayed */
	ParentID *int64 `json:"parent_id,omitempty" jsonschema:"ID of the parent group to import into"`
}

ImportFileInput is the input for importing a group from an archive file.

type ImportFileOutput

type ImportFileOutput struct {
	toolutil.HintableOutput
	Message string `json:"message"`
}

ImportFileOutput is the output for importing a group.

func ImportFile

func ImportFile(ctx context.Context, client *gitlabclient.Client, input ImportFileInput) (ImportFileOutput, error)

ImportFile imports a group from an export archive.

type ScheduleExportInput

type ScheduleExportInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
}

ScheduleExportInput is the input for scheduling a group export.

type ScheduleExportOutput

type ScheduleExportOutput struct {
	toolutil.HintableOutput
	Message string `json:"message"`
}

ScheduleExportOutput is the output for scheduling a group export.

func ScheduleExport

func ScheduleExport(ctx context.Context, client *gitlabclient.Client, input ScheduleExportInput) (ScheduleExportOutput, error)

ScheduleExport schedules an asynchronous group export.

Jump to

Keyboard shortcuts

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