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

appearance

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package appearance implements MCP tools for GitLab instance appearance settings.

The package wraps the GitLab Appearance API:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatGetMarkdown

func FormatGetMarkdown(out GetOutput) *mcp.CallToolResult

FormatGetMarkdown renders the instance appearance as the card of one object.

func FormatUpdateMarkdown

func FormatUpdateMarkdown(out UpdateOutput) *mcp.CallToolResult

FormatUpdateMarkdown renders the appearance GitLab answered the update with.

It used to call the read formatter, so the card said "Application Appearance" and a reader could not tell a read from a write; the heading now names what happened.

Types

type GetInput

type GetInput struct{}

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

type GetOutput

type GetOutput struct {
	toolutil.HintableOutput
	Appearance Item `json:"appearance"`
}

GetOutput contains the application appearance.

func Get

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

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

type Item

type Item struct {
	SiteName                    string `json:"site_name,omitempty"`
	Title                       string `json:"title"`
	Description                 string `json:"description,omitempty"`
	PWAName                     string `json:"pwa_name,omitempty"`
	PWAShortName                string `json:"pwa_short_name,omitempty"`
	PWADescription              string `json:"pwa_description,omitempty"`
	PWAIcon                     string `json:"pwa_icon,omitempty"`
	Favicon                     string `json:"favicon,omitempty"`
	MemberGuidelines            string `json:"member_guidelines,omitempty"`
	NewProjectGuidelines        string `json:"new_project_guidelines,omitempty"`
	ProfileImageGuidelines      string `json:"profile_image_guidelines,omitempty"`
	HeaderMessage               string `json:"header_message,omitempty"`
	FooterMessage               string `json:"footer_message,omitempty"`
	MessageBackgroundColor      string `json:"message_background_color,omitempty"`
	MessageFontColor            string `json:"message_font_color,omitempty"`
	EmailHeaderAndFooterEnabled bool   `json:"email_header_and_footer_enabled"`
}

Item represents the application appearance in output.

type UpdateInput

type UpdateInput struct {
	SiteName                    string `json:"site_name,omitempty" jsonschema:"Site name GitLab appends after the page title in the browser tab"`
	Title                       string `json:"title,omitempty" jsonschema:"Application title displayed in the header"`
	Description                 string `json:"description,omitempty" jsonschema:"Instance description on sign-in page"`
	PWAName                     string `json:"pwa_name,omitempty" jsonschema:"Progressive Web App name"`
	PWAShortName                string `json:"pwa_short_name,omitempty" jsonschema:"PWA short name"`
	PWADescription              string `json:"pwa_description,omitempty" jsonschema:"PWA description"`
	PWAIcon                     string `json:"pwa_icon,omitempty" jsonschema:"Path to the PWA icon image asset"`
	Favicon                     string `json:"favicon,omitempty" jsonschema:"Path to the favicon image asset"`
	URL                         string `json:"url,omitempty" jsonschema:"Redirect URL for the system header/footer logo image"`
	HeaderMessage               string `json:"header_message,omitempty" jsonschema:"Message in header bar"`
	FooterMessage               string `json:"footer_message,omitempty" jsonschema:"Message in footer bar"`
	MessageBackgroundColor      string `json:"message_background_color,omitempty" jsonschema:"Background color for header/footer messages (hex)"`
	MessageFontColor            string `json:"message_font_color,omitempty" jsonschema:"Font color for header/footer messages (hex)"`
	EmailHeaderAndFooterEnabled *bool  `json:"email_header_and_footer_enabled,omitempty" jsonschema:"Enable header and footer in emails"`
	MemberGuidelines            string `json:"member_guidelines,omitempty" jsonschema:"Markdown guidelines for adding members"`
	NewProjectGuidelines        string `json:"new_project_guidelines,omitempty" jsonschema:"Markdown guidelines for new projects"`
	ProfileImageGuidelines      string `json:"profile_image_guidelines,omitempty" jsonschema:"Markdown guidelines for profile images"`
}

UpdateInput is the input for changing appearance.

type UpdateOutput

type UpdateOutput struct {
	toolutil.HintableOutput
	Appearance Item `json:"appearance"`
}

UpdateOutput contains the updated appearance.

func Update

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

Update changes the application appearance (admin-only).

Jump to

Keyboard shortcuts

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