Documentation
¶
Overview ¶
Package write provides generic mutation tools — create, update, patch, delete and scale by GVR. It is opt-in: mutations through free-form manifests are for operators who accept that risk, not the default surface.
Index ¶
- func Register(server *mcp.Server, scope tools.Scope)
- type CreateResourceInput
- type CreateResourceOutput
- type DeleteResourceInput
- type DeleteResourceOutput
- type PatchResourceInput
- type PatchResourceOutput
- type ScaleResourceInput
- type ScaleResourceOutput
- type UpdateResourceInput
- type UpdateResourceOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateResourceInput ¶
type CreateResourceInput struct {
Workspace string `json:"workspace"`
Resource string `json:"resource"`
}
CreateResourceInput is the input for create_resource.
type CreateResourceOutput ¶
type CreateResourceOutput struct {
Created map[string]any `json:"created"`
Message string `json:"message"`
}
CreateResourceOutput is the output for create_resource.
type DeleteResourceInput ¶
type DeleteResourceInput struct {
Workspace string `json:"workspace"`
Group string `json:"group,omitempty"`
Version string `json:"version"`
Resource string `json:"resource"`
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`
}
DeleteResourceInput is the input for delete_resource.
type DeleteResourceOutput ¶
type DeleteResourceOutput struct {
Message string `json:"message"`
}
DeleteResourceOutput is the output for delete_resource.
type PatchResourceInput ¶
type PatchResourceInput struct {
Workspace string `json:"workspace"`
Group string `json:"group,omitempty"`
Version string `json:"version"`
Resource string `json:"resource"`
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
Patch string `json:"patch"`
}
PatchResourceInput is the input for patch_resource.
type PatchResourceOutput ¶
type PatchResourceOutput struct {
Patched map[string]any `json:"patched"`
Message string `json:"message"`
}
PatchResourceOutput is the output for patch_resource.
type ScaleResourceInput ¶
type ScaleResourceInput struct {
Workspace string `json:"workspace"`
Group string `json:"group,omitempty"`
Version string `json:"version"`
Resource string `json:"resource"`
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
Replicas *int32 `json:"replicas,omitempty"`
}
ScaleResourceInput is the input for scale_resource.
type ScaleResourceOutput ¶
type ScaleResourceOutput struct {
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
CurrentReplicas int32 `json:"currentReplicas"`
DesiredReplicas int32 `json:"desiredReplicas"`
Message string `json:"message"`
}
ScaleResourceOutput is the output for scale_resource.
type UpdateResourceInput ¶
type UpdateResourceInput struct {
Workspace string `json:"workspace"`
Resource string `json:"resource"`
}
UpdateResourceInput is the input for update_resource.
type UpdateResourceOutput ¶
type UpdateResourceOutput struct {
Updated map[string]any `json:"updated"`
Message string `json:"message"`
}
UpdateResourceOutput is the output for update_resource.