Documentation
¶
Index ¶
- func BuildResourceFromParam(r *http.Request) *resource.Resource
- func Get(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
- func GetSummary(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
- func GetTopology(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
- func GetYAML(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
- func SearchForResource(resourceMgr *resource.ResourceManager, searchStorage storage.SearchStorage) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
Get returns an HTTP handler function that returns a Kubernetes resource. It utilizes a ResourceManager to execute the logic.
@Summary Get returns a Kubernetes resource by name, namespace, cluster, apiVersion and kind.
@Description This endpoint returns a Kubernetes resource by name, namespace, cluster, apiVersion and kind.
@Tags resource
@Produce json
@Success 200 {object} unstructured.Unstructured "Unstructured object"
@Failure 400 {string} string "Bad Request"
@Failure 401 {string} string "Unauthorized"
@Failure 404 {string} string "Not Found"
@Failure 405 {string} string "Method Not Allowed"
@Failure 429 {string} string "Too Many Requests"
@Failure 500 {string} string "Internal Server Error"
@Router /api/v1/resource/cluster/{clusterName}/{apiVersion}/namespace/{namespaceName}/{kind}/name/{resourceName}/ [get]
func GetSummary ¶ added in v0.2.12
func GetSummary(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
GetSummary returns an HTTP handler function that returns a Kubernetes resource summary. It utilizes a ResourceManager to execute the logic.
@Summary Get returns a Kubernetes resource summary by name, namespace, cluster, apiVersion and kind.
@Description This endpoint returns a Kubernetes resource summary by name, namespace, cluster, apiVersion and kind.
@Tags resource
@Produce json
@Success 200 {object} resource.ResourceSummary "Resource Summary"
@Failure 400 {string} string "Bad Request"
@Failure 401 {string} string "Unauthorized"
@Failure 404 {string} string "Not Found"
@Failure 405 {string} string "Method Not Allowed"
@Failure 429 {string} string "Too Many Requests"
@Failure 500 {string} string "Internal Server Error"
@Router /api/v1/resource/cluster/{clusterName}/{apiVersion}/namespace/{namespaceName}/{kind}/name/{resourceName}/summary [get]
func GetTopology ¶
func GetTopology(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
GetTopology returns an HTTP handler function that returns a topology map for a Kubernetes resource. It utilizes a ResourceManager to execute the logic.
@Summary GetTopology returns a topology map for a Kubernetes resource by name, namespace, cluster, apiVersion and kind.
@Description This endpoint returns a topology map for a Kubernetes resource by name, namespace, cluster, apiVersion and kind.
@Tags resource
@Produce json
@Success 200 {object} map[string]resource.ResourceTopology "map from string to resource.ResourceTopology"
@Failure 400 {string} string "Bad Request"
@Failure 401 {string} string "Unauthorized"
@Failure 404 {string} string "Not Found"
@Failure 405 {string} string "Method Not Allowed"
@Failure 429 {string} string "Too Many Requests"
@Failure 500 {string} string "Internal Server Error"
@Router /api/v1/resource/cluster/{clusterName}/{apiVersion}/namespace/{namespaceName}/{kind}/name/{resourceName}/topology [get]
func GetYAML ¶
func GetYAML(resourceMgr *resource.ResourceManager, c *server.CompletedConfig) http.HandlerFunc
GetYAML returns an HTTP handler function that returns a Kubernetes resource YAML. It utilizes a ResourceManager to execute the logic.
@Summary GetYAML returns a Kubernetes resource YAML by name, namespace, cluster, apiVersion and kind.
@Description This endpoint returns a Kubernetes resource YAML by name, namespace, cluster, apiVersion and kind.
@Tags resource
@Produce json
@Success 200 {array} byte "Byte array"
@Failure 400 {string} string "Bad Request"
@Failure 401 {string} string "Unauthorized"
@Failure 404 {string} string "Not Found"
@Failure 405 {string} string "Method Not Allowed"
@Failure 429 {string} string "Too Many Requests"
@Failure 500 {string} string "Internal Server Error"
@Router /api/v1/resource/cluster/{clusterName}/{apiVersion}/namespace/{namespaceName}/{kind}/name/{resourceName}/yaml [get]
func SearchForResource ¶
func SearchForResource(resourceMgr *resource.ResourceManager, searchStorage storage.SearchStorage) http.HandlerFunc
SearchForResource returns an HTTP handler function that returns an array of Kubernetes runtime Object matched using the query from context. It utilizes a ResourceManager to execute the logic.
@Summary SearchForResource returns an array of Kubernetes runtime Object matched using the query from context.
@Description This endpoint returns an array of Kubernetes runtime Object matched using the query from context.
@Tags resource
@Produce json
@Success 200 {array} runtime.Object "Array of runtime.Object"
@Failure 400 {string} string "Bad Request"
@Failure 401 {string} string "Unauthorized"
@Failure 404 {string} string "Not Found"
@Failure 405 {string} string "Method Not Allowed"
@Failure 429 {string} string "Too Many Requests"
@Failure 500 {string} string "Internal Server Error"
@Router /api/v1/resource/search [get]
Types ¶
This section is empty.