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

settings

package
v2.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package settings implements MCP tools for GitLab instance application settings.

The package wraps the GitLab Application settings 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 application settings tools.

func FormatGetMarkdown

func FormatGetMarkdown(out GetOutput) *mcp.CallToolResult

FormatGetMarkdown formats application settings into a concise markdown summary.

func FormatUpdateMarkdown

func FormatUpdateMarkdown(out UpdateOutput) *mcp.CallToolResult

FormatUpdateMarkdown formats the updated settings response.

Types

type GetInput

type GetInput struct{}

GetInput is the input for getting application settings (no parameters needed).

type GetOutput

type GetOutput struct {
	toolutil.HintableOutput
	Settings map[string]any `json:"settings"`
}

GetOutput contains the full application settings as a JSON map.

func Get

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

Get retrieves the current application settings (admin-only).

type UpdateInput

type UpdateInput struct {
	Settings map[string]any `` /* 189-byte string literal not displayed */
}

UpdateInput is the input for updating application settings. Settings is a map of setting keys to their new values, matching the JSON field names from the GitLab API (snake_case).

type UpdateOutput

type UpdateOutput struct {
	toolutil.HintableOutput
	Settings map[string]any `json:"settings"`
}

UpdateOutput contains the updated application settings.

func Update

func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (output UpdateOutput, err error)

Update modifies application settings (admin-only). It accepts a map of setting keys and values, JSON-round-trips them into UpdateSettingsOptions, and sends to the GitLab API.

Jump to

Keyboard shortcuts

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