resources

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(config Config, satellitesClient satellites.Client, storeClient store.Client) chi.Router

Types

type Config added in v0.10.0

type Config struct {
	Integrations Integrations `json:"integrations"`
}

Config is the configuration for the resources API. At the moment it allows users to configure integration, which can be used to set a list of default dashboards which should be added to a resource. This is the same as the "kobs.io/dashboards" annotation, but allows to set a list of dashboards for all resources of a certain type which are matching the specified labels.

type Dashboard added in v0.10.0

type Dashboard struct {
	Resource  string                `json:"resource"`
	Labels    map[string]string     `json:"labels"`
	Dashboard dashboardv1.Reference `json:"dashboard"`
}

type Integrations added in v0.10.0

type Integrations struct {
	Dashboards []Dashboard `json:"dashboards"`
}

type ResourceList

type ResourceList struct {
	Satellite string         `json:"satellite"`
	Cluster   string         `json:"cluster"`
	List      map[string]any `json:"list"`
}

type ResourceResponse

type ResourceResponse struct {
	Resource      shared.Resource `json:"resource"`
	ResourceLists []ResourceList  `json:"resourceLists"`
	Errors        []string        `json:"errors"`
	Integrations  Integrations    `json:"integrations"`
}

type Router

type Router struct {
	*chi.Mux
	// contains filtered or unexported fields
}

Router implements the resources API. It implement a chi.Mux and contains the satellites and store client and the configured integration to serve our needs.

Jump to

Keyboard shortcuts

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