Documentation
¶
Overview ¶
Package planlimits implements MCP tools for GitLab plan limit operations.
The package wraps the GitLab Plan limits API:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatChangeMarkdown ¶
func FormatChangeMarkdown(out ChangeOutput) string
FormatChangeMarkdown renders the limits a change returned as the same card.
func FormatGetMarkdown ¶
FormatGetMarkdown renders one plan's limits as a card.
Types ¶
type ChangeInput ¶
type ChangeInput struct {
PlanName string `json:"plan_name" jsonschema:"Plan name to update (e.g. default, free, bronze, silver, gold, premium, ultimate),required"`
ConanMaxFileSize *int64 `json:"conan_max_file_size,omitempty" jsonschema:"Maximum Conan package file size in bytes"`
GenericPackagesMaxFileSize *int64 `json:"generic_packages_max_file_size,omitempty" jsonschema:"Maximum generic package file size in bytes"`
HelmMaxFileSize *int64 `json:"helm_max_file_size,omitempty" jsonschema:"Maximum Helm chart file size in bytes"`
MavenMaxFileSize *int64 `json:"maven_max_file_size,omitempty" jsonschema:"Maximum Maven package file size in bytes"`
NPMMaxFileSize *int64 `json:"npm_max_file_size,omitempty" jsonschema:"Maximum NPM package file size in bytes"`
NugetMaxFileSize *int64 `json:"nuget_max_file_size,omitempty" jsonschema:"Maximum NuGet package file size in bytes"`
PyPiMaxFileSize *int64 `json:"pypi_max_file_size,omitempty" jsonschema:"Maximum PyPI package file size in bytes"`
TerraformModuleMaxFileSize *int64 `json:"terraform_module_max_file_size,omitempty" jsonschema:"Maximum Terraform module file size in bytes"`
}
ChangeInput is the input for changing plan limits.
type ChangeOutput ¶
type ChangeOutput struct {
toolutil.HintableOutput
PlanLimitItem
}
ChangeOutput is the output for changing plan limits.
func Change ¶
func Change(ctx context.Context, client *gitlabclient.Client, input ChangeInput) (ChangeOutput, error)
Change modifies plan limits.
type GetInput ¶
type GetInput struct {
PlanName string `json:"plan_name,omitempty" jsonschema:"Plan name to filter (e.g. default, free, bronze, silver, gold, premium, ultimate)"`
}
GetInput is the input for getting current plan limits.
type GetOutput ¶
type GetOutput struct {
toolutil.HintableOutput
PlanLimitItem
}
GetOutput is the output for getting current plan limits.
type LimitChange ¶ added in v3.1.0
type LimitChange struct {
UserID int64 `json:"user_id"`
Username string `json:"username"`
Timestamp int64 `json:"timestamp"`
Value int64 `json:"value"`
}
LimitChange is one entry of a limit's change history: who set it to which value, and when, as a Unix timestamp in seconds. GitLab keeps it for the three namespace storage limits and the date the storage dashboard limit was enabled, keyed by the limit's name.
type PlanLimitItem ¶
type PlanLimitItem struct {
ConanMaxFileSize int64 `json:"conan_max_file_size"`
GenericPackagesMaxFileSize int64 `json:"generic_packages_max_file_size"`
HelmMaxFileSize int64 `json:"helm_max_file_size"`
MavenMaxFileSize int64 `json:"maven_max_file_size"`
NPMMaxFileSize int64 `json:"npm_max_file_size"`
NugetMaxFileSize int64 `json:"nuget_max_file_size"`
PyPiMaxFileSize int64 `json:"pypi_max_file_size"`
TerraformModuleMaxFileSize int64 `json:"terraform_module_max_file_size"`
CargoMaxFileSize *int64 `json:"cargo_max_file_size,omitempty"`
CIInstanceLevelVariables *int64 `json:"ci_instance_level_variables,omitempty"`
CIPipelineSize *int64 `json:"ci_pipeline_size,omitempty"`
CIActiveJobs *int64 `json:"ci_active_jobs,omitempty"`
CIProjectSubscriptions *int64 `json:"ci_project_subscriptions,omitempty"`
CIPipelineSchedules *int64 `json:"ci_pipeline_schedules,omitempty"`
CINeedsSizeLimit *int64 `json:"ci_needs_size_limit,omitempty"`
CIRegisteredGroupRunners *int64 `json:"ci_registered_group_runners,omitempty"`
CIRegisteredProjectRunners *int64 `json:"ci_registered_project_runners,omitempty"`
DotenvVariables *int64 `json:"dotenv_variables,omitempty"`
DotenvSize *int64 `json:"dotenv_size,omitempty"`
EnforcementLimit *int64 `json:"enforcement_limit,omitempty"`
NotificationLimit *int64 `json:"notification_limit,omitempty"`
StorageSizeLimit *int64 `json:"storage_size_limit,omitempty"`
PipelineHierarchySize *int64 `json:"pipeline_hierarchy_size,omitempty"`
MaxPipelinesPerMergeTrain *int64 `json:"max_pipelines_per_merge_train,omitempty"`
ServiceDeskOutboundEmailsPerHour *int64 `json:"service_desk_outbound_emails_per_hour,omitempty"`
ServiceDeskOutboundEmailsPerDay *int64 `json:"service_desk_outbound_emails_per_day,omitempty"`
WebHookCalls *int64 `json:"web_hook_calls,omitempty"`
WebHookCallsLow *int64 `json:"web_hook_calls_low,omitempty"`
WebHookCallsMid *int64 `json:"web_hook_calls_mid,omitempty"`
LimitsHistory map[string][]LimitChange `json:"limits_history,omitempty"`
}
PlanLimitItem represents GitLab plan limits.
The eight package file sizes at the top are what client-go's PlanLimit models. The block after them is what lib/api/entities/plan_limit.rb sends beside those and client-go declares on no field, read from the captured response beside the SDK's decode (ADR-0021) and described on [limitExtra]. The entity exposes every one of them with no condition, so both plan limit routes answer with all of them, and each stays nil when the instance sent no key for it.