gitignoretemplates

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package gitignoretemplates implements MCP tools for GitLab Gitignore Templates API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

func RegisterTools

func RegisterTools(server *mcp.Server, client *gitlabclient.Client)

RegisterTools registers all gitignore template MCP tools.

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 {
	Page    int64 `json:"page,omitempty" jsonschema:"Page number for pagination"`
	PerPage int64 `json:"per_page,omitempty" jsonschema:"Items per page"`
}

ListInput is the input for listing gitignore templates.

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 struct {
	Key  string `json:"key"`
	Name string `json:"name"`
}

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