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

appstatistics

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package appstatistics implements MCP tools for GitLab instance application statistics.

The package wraps the GitLab Application statistics API:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatGetMarkdown

func FormatGetMarkdown(out GetOutput) string

FormatGetMarkdown renders the instance statistics as the card of one object: one row per metric, in the order a reader reads them, then the note about what GitLab counts.

Types

type GetInput

type GetInput struct{}

GetInput is the input (no params).

type GetOutput

type GetOutput struct {
	toolutil.HintableOutput
	Forks         int64 `json:"forks"`
	Issues        int64 `json:"issues"`
	MergeRequests int64 `json:"merge_requests"`
	Notes         int64 `json:"notes"`
	Snippets      int64 `json:"snippets"`
	SSHKeys       int64 `json:"ssh_keys"`
	Milestones    int64 `json:"milestones"`
	Users         int64 `json:"users"`
	Groups        int64 `json:"groups"`
	Projects      int64 `json:"projects"`
	ActiveUsers   int64 `json:"active_users"`
}

GetOutput is the output for application statistics.

func Get

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

Get retrieves current application statistics (admin).

It builds its own request rather than calling client-go's GetApplicationStatistics, whose ApplicationStatistics declares int64 fields and so cannot decode the strings GitLab sends for every count (see [delimitedCount]). Reported as gitlab-org/api/client-go!3063 and tracked in docs/development/upstream-bugs.md, entry 7; once a release carries that change, this handler calls the SDK method directly.

Jump to

Keyboard shortcuts

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