groupmarkdownuploads

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package groupmarkdownuploads implements MCP tools for GitLab group Markdown upload operations.

The package wraps the GitLab Group Markdown uploads 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 markdown upload actions.

func DeleteByID

func DeleteByID(ctx context.Context, client *gitlabclient.Client, input DeleteByIDInput) error

DeleteByID deletes a group markdown upload by its ID.

func DeleteBySecretAndFilename

func DeleteBySecretAndFilename(ctx context.Context, client *gitlabclient.Client, input DeleteBySecretAndFilenameInput) error

DeleteBySecretAndFilename deletes a group markdown upload by secret and filename.

func FormatList

func FormatList(out *ListOutput) string

FormatList formats the list of group markdown uploads as markdown.

func FormatListMarkdownString

func FormatListMarkdownString(o ListOutput) string

FormatListMarkdownString renders a list of group markdown uploads.

Types

type DeleteByIDInput

type DeleteByIDInput struct {
	GroupID  toolutil.StringOrInt `json:"group_id" jsonschema:"The ID or URL-encoded path of the group,required"`
	UploadID int64                `json:"upload_id" jsonschema:"The ID of the upload to delete,required"`
}

DeleteByIDInput represents input for deleting a group markdown upload by ID.

type DeleteBySecretAndFilenameInput

type DeleteBySecretAndFilenameInput struct {
	GroupID  toolutil.StringOrInt `json:"group_id" jsonschema:"The ID or URL-encoded path of the group,required"`
	Secret   string               `json:"secret" jsonschema:"The secret of the upload,required"`
	Filename string               `json:"filename" jsonschema:"The filename of the upload,required"`
}

DeleteBySecretAndFilenameInput represents input for deleting a group markdown upload by secret and filename.

type ListInput

type ListInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"The ID or URL-encoded path of the group,required"`
	OrderBy string               `json:"order_by,omitempty" jsonschema:"For keyset pagination, the column to order results by"`
	Sort    string               `json:"sort,omitempty"     jsonschema:"Sort order for keyset pagination: 'asc' or 'desc'"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListInput represents input for listing group markdown uploads. It mirrors gl.ListMarkdownUploadsOptions (the embedded gl.ListOptions) including offset and keyset pagination via order_by/sort/page_token.

type ListOutput

type ListOutput struct {
	Uploads    []UploadItem              `json:"uploads"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListOutput represents the output of listing group markdown uploads.

func List

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

List retrieves group markdown uploads.

type UploadItem

type UploadItem struct {
	ID         int64             `json:"id"`
	Size       int64             `json:"size"`
	Filename   string            `json:"filename"`
	CreatedAt  string            `json:"created_at,omitempty"`
	UploadedBy *UploadedByOutput `json:"uploaded_by,omitempty"`
}

UploadItem represents a single markdown upload entry. It mirrors the canonical keys of gl.MarkdownUpload (id, size, filename, created_at, uploaded_by).

type UploadedByOutput added in v2.3.0

type UploadedByOutput struct {
	ID       int64  `json:"id"`       // Documented reference subset per doc/api/group_markdown_uploads.md
	Username string `json:"username"` // Documented reference subset per doc/api/group_markdown_uploads.md
	Name     string `json:"name"`     // Documented reference subset per doc/api/group_markdown_uploads.md
}

UploadedByOutput mirrors the short-user representation in a markdown upload's uploaded_by field (gl.MarkdownUpload.UploadedBy, a *gl.User).

Documented reference subset per doc/api/group_markdown_uploads.md: the "List all uploads for a group" response documents only id, name, and username inside uploaded_by. The SDK *gl.User embed additionally carries state, avatar_url, and web_url; those are trimmed here to keep the nested reference at documented depth.

Jump to

Keyboard shortcuts

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