Skip to main content
Glama
comm.go621 B
package dynamic import ( "fmt" ) type yamlRequest struct { Yaml string `json:"yaml" binding:"required"` } // 返回资源类型对应的路径 func getResourcePaths(kind string) ([]string, error) { switch kind { case "CloneSet": return []string{"spec", "template", "spec"}, nil case "Deployment", "DaemonSet", "StatefulSet", "ReplicaSet", "Job": return []string{"spec", "template", "spec"}, nil case "CronJob": return []string{"spec", "jobTemplate", "spec", "template", "spec"}, nil case "Pod": return []string{"spec"}, nil default: return nil, fmt.Errorf("unsupported resource kind: %s", kind) } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/weibaohui/k8m'

If you have feedback or need assistance with the MCP directory API, please join our Discord server