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

groupwikis

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: 6 Imported by: 0

Documentation

Overview

Package groupwikis implements MCP tools for GitLab group wiki operations, a GitLab Premium feature.

The package wraps client-go's REST group wikis service. It named the GraphQL reference until 2026-09, which described neither the endpoints it calls nor the service it calls them through:

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 wiki actions.

func Delete

func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error

Delete removes a wiki page from a GitLab group.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown renders a page of group wiki pages as a Markdown table.

func FormatOutputMarkdown

func FormatOutputMarkdown(out Output) string

FormatOutputMarkdown renders one group wiki page as a card: the page's own fields, then its body under a label of its own.

Types

type CreateInput

type CreateInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	Title   string               `json:"title"            jsonschema:"Title of the wiki page,required"`
	Content string               `json:"content"          jsonschema:"Content of the wiki page,required"`
	Format  string               `json:"format,omitempty" jsonschema:"Content format: markdown (default), rdoc, asciidoc, or org"`
}

CreateInput defines parameters for the Create action which creates a new group wiki page.

type DeleteInput

type DeleteInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	Slug    string               `json:"slug"     jsonschema:"Slug of the wiki page to delete as group.wiki_list returns it (e.g. 'dir/page'),required"`
}

DeleteInput defines parameters for the Delete action which removes a group wiki page by slug.

type EditInput

type EditInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	Slug    string               `json:"slug"              jsonschema:"Slug of the wiki page to edit as group.wiki_list returns it (e.g. 'dir/page'),required"`
	Title   string               `json:"title,omitempty"   jsonschema:"New title"`
	Content string               `json:"content,omitempty" jsonschema:"New content"`
	Format  string               `json:"format,omitempty"  jsonschema:"Content format: markdown, rdoc, asciidoc, or org"`
}

EditInput defines parameters for the Edit action which updates an existing group wiki page.

type GetInput

type GetInput struct {
	GroupID    toolutil.StringOrInt `json:"group_id"             jsonschema:"Group ID or URL-encoded path,required"`
	Slug       string               `` /* 146-byte string literal not displayed */
	RenderHTML bool                 `json:"render_html,omitempty" jsonschema:"Return HTML-rendered content"`
	Version    string               `json:"version,omitempty"     jsonschema:"Wiki page version SHA"`
}

GetInput defines parameters for the Get action which retrieves a single group wiki page by slug.

type ListInput

type ListInput struct {
	GroupID     toolutil.StringOrInt `json:"group_id"              jsonschema:"Group ID or URL-encoded path,required"`
	WithContent bool                 `json:"with_content,omitempty" jsonschema:"Include page content in the response"`
}

ListInput defines parameters for the List action which retrieves all group wiki pages.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	WikiPages []Output `json:"wiki_pages"`
}

ListOutput is the result of the List action containing all wiki pages for a group.

func List

func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)

List retrieves all wiki pages for a GitLab group.

type Output

type Output struct {
	toolutil.HintableOutput
	Title    string `json:"title"`
	Slug     string `json:"slug"`
	Format   string `json:"format"`
	Content  string `json:"content,omitempty"`
	Encoding string `json:"encoding,omitempty"`
	// WikiPageMetaID identifies the page's metadata record, and FrontMatter is
	// the YAML front matter parsed out of the page.
	WikiPageMetaID int64          `json:"wiki_page_meta_id,omitempty"`
	FrontMatter    map[string]any `json:"front_matter,omitempty"`
}

Output represents a single GitLab group wiki page returned by Get, Create, or Edit.

func Create

func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)

Create creates a new wiki page in a GitLab group.

func Edit

func Edit(ctx context.Context, client *gitlabclient.Client, input EditInput) (Output, error)

Edit updates an existing wiki page in a GitLab group.

func Get

func Get(ctx context.Context, client *gitlabclient.Client, input GetInput) (Output, error)

Get retrieves a single wiki page from a GitLab group.

Jump to

Keyboard shortcuts

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