resource

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildResourceFromParam

func BuildResourceFromParam(r *http.Request) *resource.Resource

func Get

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 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

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.

Jump to

Keyboard shortcuts

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