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

projectstatistics

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

Documentation

Overview

Package projectstatistics implements MCP tools for GitLab project statistics.

The package wraps the GitLab Project statistics 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 project statistics actions.

func FormatMarkdown

func FormatMarkdown(out GetOutput) string

FormatMarkdown renders a project's fetch statistics as a card: the total is the object's one field, and the per-day counts are the nested collection under it.

Types

type DayStat

type DayStat struct {
	Date  string `json:"date"`
	Count int64  `json:"count"`
}

DayStat represents a single day's fetch count.

type GetInput

type GetInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}

GetInput contains parameters for getting project statistics.

type GetOutput

type GetOutput struct {
	toolutil.HintableOutput
	TotalFetches int64     `json:"total_fetches"`
	Days         []DayStat `json:"days"`
}

GetOutput contains project statistics (last 30 days fetch data).

func Get

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

Get retrieves the last 30 days of project statistics.

Jump to

Keyboard shortcuts

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