gitignoretemplates

package
v2.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package gitignoretemplates implements MCP tools for GitLab gitignore template operations.

The package wraps the GitLab Templates 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 gitignore template actions.

func FormatGetMarkdown

func FormatGetMarkdown(out GetOutput) string

FormatGetMarkdown formats the get output as markdown.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown formats the list output as markdown.

Types

type GetInput

type GetInput struct {
	Key string `json:"key" jsonschema:"Template key (e.g. Go, Python, Node),required"`
}

GetInput is the input for getting a gitignore template.

type GetOutput

type GetOutput struct {
	toolutil.HintableOutput
	Name    string `json:"name"`
	Content string `json:"content"`
}

GetOutput is the output for getting a gitignore template.

func Get

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

Get gets a single gitignore template by key.

type ListInput

type ListInput struct {
	OrderBy string `` /* 127-byte string literal not displayed */
	Sort    string `json:"sort,omitempty"     jsonschema:"Sort direction (asc, desc)"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListInput is the input for listing gitignore templates. OrderBy, Sort, and the embedded keyset parameters map onto the gl.ListTemplatesOptions embedded gl.ListOptions, mirroring the full client-go pagination surface.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Templates  []TemplateListItem        `json:"templates"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListOutput is the output for listing gitignore templates.

func List

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

List lists all available gitignore templates.

type TemplateListItem

type TemplateListItem = toolutil.TemplateMarkdown

TemplateListItem represents a gitignore template in a list.

Jump to

Keyboard shortcuts

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