Documentation
¶
Overview ¶
Package license implements MCP tools for GitLab instance license operations.
The package wraps the GitLab License API:
Index ¶
- func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
- func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
- func FormatAddMarkdown(output AddOutput) *mcp.CallToolResult
- func FormatGetMarkdown(output GetOutput) *mcp.CallToolResult
- func FormatLicenseMarkdown(item Item) *mcp.CallToolResult
- type AddInput
- type AddOnsItem
- type AddOutput
- type DeleteInput
- type GetInput
- type GetOutput
- type Item
- type LicenseeItem
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 license actions exposed as MCP tools. The get, add, and delete routes are projected into the dynamic, meta, individual, and audit surfaces by the action catalog (ADR-0004).
func Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
Delete removes a GitLab license by ID via the GitLab License API (DELETE /license/:id). Requires administrator access.
func FormatAddMarkdown ¶
func FormatAddMarkdown(output AddOutput) *mcp.CallToolResult
FormatAddMarkdown formats an AddOutput.
func FormatGetMarkdown ¶
func FormatGetMarkdown(output GetOutput) *mcp.CallToolResult
FormatGetMarkdown formats a GetOutput.
func FormatLicenseMarkdown ¶
func FormatLicenseMarkdown(item Item) *mcp.CallToolResult
FormatLicenseMarkdown formats a license as markdown.
Types ¶
type AddInput ¶
type AddInput struct {
License string `json:"license" jsonschema:"The license string (Base64-encoded),required"`
}
AddInput carries the Base64-encoded GitLab license payload to install.
type AddOnsItem ¶
type AddOnsItem struct {
GitLabAuditorUser int64 `json:"gitlab_auditor_user"`
GitLabDeployBoard int64 `json:"gitlab_deploy_board"`
GitLabFileLocks int64 `json:"gitlab_file_locks"`
GitLabGeo int64 `json:"gitlab_geo"`
GitLabServiceDesk int64 `json:"gitlab_service_desk"`
}
AddOnsItem represents the add-ons of a GitLab license.
type AddOutput ¶
type AddOutput struct {
toolutil.HintableOutput
License Item `json:"license"`
}
AddOutput wraps the added license.
type DeleteInput ¶
type DeleteInput struct {
ID int64 `json:"id" jsonschema:"License ID to delete,required"`
}
DeleteInput identifies the installed GitLab license to remove.
type GetOutput ¶
type GetOutput struct {
toolutil.HintableOutput
License Item `json:"license"`
}
GetOutput wraps the license.
type Item ¶
type Item struct {
ID int64 `json:"id"`
Plan string `json:"plan"`
CreatedAt string `json:"created_at,omitempty"`
StartsAt string `json:"starts_at,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
HistoricalMax int64 `json:"historical_max"`
MaximumUserCount int64 `json:"maximum_user_count"`
Expired bool `json:"expired"`
Overage int64 `json:"overage"`
UserLimit int64 `json:"user_limit"`
ActiveUsers int64 `json:"active_users"`
Licensee LicenseeItem `json:"licensee"`
AddOns AddOnsItem `json:"add_ons"`
}
Item represents a GitLab license.
type LicenseeItem ¶
type LicenseeItem struct {
Name string `json:"name"`
Company string `json:"company"`
Email string `json:"email"`
}
LicenseeItem represents the licensee of a GitLab license.