Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCustomColumnsFormatter ¶ added in v0.5.3
NewCustomColumnsFormatter creates a custom columns formatter from a comma separated list of <header>:<jsonpath-field-spec> pairs. e.g. NAME:metadata.name,API_VERSION:apiVersion creates a formatter that formats the input to:
{"fields":{"API_VERSION":"v1","NAME":"foo"},"titles":["NAME","API_VERSION"]}
func SearchForResource ¶
func SearchForResource(searchMgr *search.SearchManager, aiMgr *ai.AIManager, 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 SearchManager 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 search @Produce json @Param query query string true "The query to use for search. Required" @Param pattern query string true "The search pattern. Can be either sql, dsl or nl. Required" @Param pageSize query string false "The size of the page. Default to 10" @Param page query string false "The current page to fetch. Default to 1" @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 /rest-api/v1/search [get]
Types ¶
type CustomColumnsOutput ¶ added in v0.5.3
type Formatter ¶ added in v0.5.3
func ParseObjectFormatter ¶ added in v0.5.3
ParseObjectFormatter parses a format string and returns a Formatter.
type NopFormatter ¶ added in v0.5.3
type NopFormatter struct{}