Documentation
¶
Overview ¶
Package license implements MCP tools for GitLab License API.
Index ¶
- 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
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- 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 Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
Delete removes a license by ID.
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.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all license tools on the MCP server.
Types ¶
type AddInput ¶
type AddInput struct {
License string `json:"license" jsonschema:"The license string (Base64-encoded),required"`
}
AddInput represents the input for adding a license.
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 represents the input for deleting a license.
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.
Click to show internal directories.
Click to hide internal directories.