core

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: 6 Imported by: 0

Documentation

Overview

Package core is the default toolset: navigating the caller's workspaces (workspaces, APIBindings, APIExports, WorkspaceTypes, workspace lifecycle) plus generic read access to any resource by GVR. Everything is read-only; mutations live in the opt-in write toolset.

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 core toolset to server, bound to scope.

Types

type APIBindingInfo

type APIBindingInfo struct {
	Name       string `json:"name"`
	ExportName string `json:"exportName,omitempty"`
	ExportPath string `json:"exportPath,omitempty"`
	Phase      string `json:"phase,omitempty"`
}

APIBindingInfo represents an APIBinding in list output.

type APIExportEndpointSliceInfo

type APIExportEndpointSliceInfo struct {
	Name     string `json:"name"`
	Export   string `json:"export,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
}

APIExportEndpointSliceInfo represents an APIExportEndpointSlice in list output.

type APIExportInfo

type APIExportInfo struct {
	Name      string   `json:"name"`
	Resources []string `json:"resources,omitempty"`
}

APIExportInfo represents an APIExport in list output.

type GetAPIBindingInput

type GetAPIBindingInput struct {
	Workspace string `json:"workspace"`
	Name      string `json:"name"`
}

GetAPIBindingInput is the input for get_kcp_apibinding.

type GetAPIBindingOutput

type GetAPIBindingOutput struct {
	Object map[string]any `json:"object"`
}

GetAPIBindingOutput is the output for get_kcp_apibinding.

type GetAPIExportInput

type GetAPIExportInput struct {
	Workspace string `json:"workspace"`
	Name      string `json:"name"`
}

GetAPIExportInput is the input for get_kcp_apiexport.

type GetAPIExportOutput

type GetAPIExportOutput struct {
	Object map[string]any `json:"object"`
}

GetAPIExportOutput is the output for get_kcp_apiexport.

type GetResourceInput

type GetResourceInput 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"`
}

GetResourceInput is the input for get_resource. The resource type is an explicit group+version+resource; group is empty for the core API group.

type GetResourceOutput

type GetResourceOutput struct {
	Object map[string]any `json:"object"`
}

GetResourceOutput is the output for get_resource.

type GetWorkspaceTypeInput

type GetWorkspaceTypeInput struct {
	Workspace string `json:"workspace"`
	Name      string `json:"name"`
}

GetWorkspaceTypeInput is the input for get_kcp_workspacetype.

type GetWorkspaceTypeOutput

type GetWorkspaceTypeOutput struct {
	Object map[string]any `json:"object"`
}

GetWorkspaceTypeOutput is the output for get_kcp_workspacetype.

type ListAPIBindingsInput

type ListAPIBindingsInput struct {
	Workspace string `json:"workspace"`
}

ListAPIBindingsInput is the input for list_kcp_apibindings.

type ListAPIBindingsOutput

type ListAPIBindingsOutput struct {
	APIBindings []APIBindingInfo `json:"apiBindings"`
	Count       int              `json:"count"`
}

ListAPIBindingsOutput is the output for list_kcp_apibindings.

type ListAPIExportEndpointSlicesInput

type ListAPIExportEndpointSlicesInput struct {
	Workspace string `json:"workspace"`
}

ListAPIExportEndpointSlicesInput is the input for list_kcp_apiexportendpointslices.

type ListAPIExportEndpointSlicesOutput

type ListAPIExportEndpointSlicesOutput struct {
	Slices []APIExportEndpointSliceInfo `json:"slices"`
	Count  int                          `json:"count"`
}

ListAPIExportEndpointSlicesOutput is the output for list_kcp_apiexportendpointslices.

type ListAPIExportsInput

type ListAPIExportsInput struct {
	Workspace string `json:"workspace"`
}

ListAPIExportsInput is the input for list_kcp_apiexports.

type ListAPIExportsOutput

type ListAPIExportsOutput struct {
	APIExports []APIExportInfo `json:"apiExports"`
	Count      int             `json:"count"`
}

ListAPIExportsOutput is the output for list_kcp_apiexports.

type ListInitializingWorkspacesInput

type ListInitializingWorkspacesInput struct {
	Workspace string `json:"workspace"`
}

ListInitializingWorkspacesInput is the input for list_kcp_initializingworkspaces.

type ListInitializingWorkspacesOutput

type ListInitializingWorkspacesOutput struct {
	Workspaces []WorkspaceStatusInfo `json:"workspaces"`
	Count      int                   `json:"count"`
}

ListInitializingWorkspacesOutput is the output for list_kcp_initializingworkspaces.

type ListResourcesInput

type ListResourcesInput struct {
	Workspace string `json:"workspace"`

	Group    string `json:"group,omitempty"`
	Version  string `json:"version"`
	Resource string `json:"resource"`

	Namespace     string `json:"namespace,omitempty"`
	LabelSelector string `json:"labelSelector,omitempty"`
	FieldSelector string `json:"fieldSelector,omitempty"`
}

ListResourcesInput is the input for list_resources. The resource type is an explicit group+version+resource; group is empty for the core API group.

type ListResourcesOutput

type ListResourcesOutput struct {
	Items []map[string]any `json:"items"`
	Count int              `json:"count"`
}

ListResourcesOutput is the output for list_resources.

type ListTerminatingWorkspacesInput

type ListTerminatingWorkspacesInput struct {
	Workspace string `json:"workspace"`
}

ListTerminatingWorkspacesInput is the input for list_kcp_terminatingworkspaces.

type ListTerminatingWorkspacesOutput

type ListTerminatingWorkspacesOutput struct {
	Workspaces []WorkspaceStatusInfo `json:"workspaces"`
	Count      int                   `json:"count"`
}

ListTerminatingWorkspacesOutput is the output for list_kcp_terminatingworkspaces.

type ListWorkspaceTypesInput

type ListWorkspaceTypesInput struct {
	Workspace string `json:"workspace"`
}

ListWorkspaceTypesInput is the input for list_kcp_workspacetypes.

type ListWorkspaceTypesOutput

type ListWorkspaceTypesOutput struct {
	WorkspaceTypes []WorkspaceTypeInfo `json:"workspaceTypes"`
	Count          int                 `json:"count"`
}

ListWorkspaceTypesOutput is the output for list_kcp_workspacetypes.

type ListWorkspacesInput

type ListWorkspacesInput struct{}

ListWorkspacesInput is the input schema for list_kcp_workspaces (empty).

type ListWorkspacesOutput

type ListWorkspacesOutput struct {
	Workspaces []WorkspaceInfo `json:"workspaces"`
}

ListWorkspacesOutput is the output schema for list_kcp_workspaces.

type WorkspaceInfo

type WorkspaceInfo struct {
	ID       string `json:"id"`
	Endpoint string `json:"endpoint"`
}

WorkspaceInfo represents a single workspace in the list_kcp_workspaces output.

type WorkspaceStatusInfo

type WorkspaceStatusInfo struct {
	Name   string `json:"name"`
	Phase  string `json:"phase,omitempty"`
	Type   string `json:"type,omitempty"`
	URL    string `json:"url,omitempty"`
	Reason string `json:"reason,omitempty"`
}

WorkspaceStatusInfo represents workspace status in list output.

type WorkspaceTypeInfo

type WorkspaceTypeInfo struct {
	Name           string   `json:"name"`
	Description    string   `json:"description,omitempty"`
	Initializers   []string `json:"initializers,omitempty"`
	DefaultAPIPath string   `json:"defaultAPIPath,omitempty"`
}

WorkspaceTypeInfo represents a WorkspaceType in list output.

Jump to

Keyboard shortcuts

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