MCPcopy Create free account
hub / github.com/calfonso/rusternetes / buildApiPath

Function buildApiPath

console/src/engine/query.ts:135–149  ·  view source on GitHub ↗
(
  group: string,
  version: string,
  plural: string,
  namespace?: string,
  name?: string,
)

Source from the content-addressed store, hash-verified

133
134/** Build the API path for a resource type. */
135export function buildApiPath(
136 group: string,
137 version: string,
138 plural: string,
139 namespace?: string,
140 name?: string,
141): string {
142 const base =
143 group === "" || group === "core"
144 ? `/api/${version}`
145 : `/apis/${group}/${version}`;
146 const ns = namespace ? `/namespaces/${namespace}` : "";
147 const n = name ? `/${name}` : "";
148 return `${base}${ns}/${plural}${n}`;
149}

Callers 14

handleScaleFunction · 0.90
handleRestartFunction · 0.90
handleDeleteFunction · 0.90
handleDeleteFunction · 0.90
handleQuickDeployFunction · 0.90
handleYamlCreateFunction · 0.90
handleDeleteFunction · 0.90
handleCreateFunction · 0.90
handleDeleteFunction · 0.90
handleDeleteFunction · 0.90
handleCordonFunction · 0.90
ResourceDetailViewFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected