write

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(server *mcp.Server, scope tools.Scope)

Register adds the write toolset to server, bound to scope.

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.

Jump to

Keyboard shortcuts

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