projectaliases

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

Documentation

Overview

markdown.go provides human-readable Markdown formatters for project aliases.

Package projectaliases implements MCP tools for GitLab project alias management. Project aliases allow accessing projects via alternative names (admin-only feature).

register.go wires project alias MCP tools to the MCP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

Delete removes a project alias by name.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown formats a list of project aliases as a Markdown table.

func FormatOutputMarkdown

func FormatOutputMarkdown(out Output) string

FormatOutputMarkdown formats a single project alias as Markdown.

func RegisterTools

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

RegisterTools registers MCP tools for GitLab project alias operations.

Types

type CreateInput

type CreateInput struct {
	Name      string `json:"name" jsonschema:"The alias name to create,required"`
	ProjectID int64  `json:"project_id" jsonschema:"The numeric project ID to alias,required"`
}

CreateInput holds parameters for creating a new project alias.

type DeleteInput

type DeleteInput struct {
	Name string `json:"name" jsonschema:"The alias name to delete,required"`
}

DeleteInput holds parameters for deleting a project alias.

type GetInput

type GetInput struct {
	Name string `json:"name" jsonschema:"The alias name to look up,required"`
}

GetInput holds parameters for retrieving a specific project alias.

type ListInput

type ListInput struct{}

ListInput holds parameters for listing project aliases (no params needed).

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Aliases []Output `json:"aliases"`
}

ListOutput represents a list of project aliases.

func List

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

List retrieves all project aliases (admin-only).

type Output

type Output struct {
	toolutil.HintableOutput
	ID        int64  `json:"id"`
	ProjectID int64  `json:"project_id"`
	Name      string `json:"name"`
}

Output represents a single project alias.

func Create

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

Create creates a new project alias.

func Get

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

Get retrieves a specific project alias by name.

Jump to

Keyboard shortcuts

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