elasticsearchdashboard

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SavedObjectsReqBodyES = `` /* 350-byte string literal not displayed */

	SavedObjectsReqBodyOS = `` /* 182-byte string literal not displayed */

	SavedObjectsExportURL = "/api/saved_objects/_export"
	SavedObjectsImportURL = "/api/saved_objects/_import"
	SpacesURL             = "/api/spaces/space"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	EDClient
}

type ClientOptions

type ClientOptions struct {
	KClient   client.Client
	Dashboard *esapi.ElasticsearchDashboard
	ESVersion *catalog.ElasticsearchVersion
	DB        *api.Elasticsearch
	Ctx       context.Context
	Secret    *core.Secret
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

type DbVersionInfo

type DbVersionInfo struct {
	Name       string
	Version    string
	AuthPlugin catalog.ElasticsearchAuthPlugin
}

type EDClient

type EDClient interface {
	GetHealthStatus() (*Health, error)
	GetStateFromHealthResponse(health *Health) (esapi.DashboardServerState, error)
	ExportSavedObjects(spaceName string) (*Response, error)
	ImportSavedObjects(spaceName, filepath string) (*Response, error)
	ListSpaces() ([]Space, error)
	CreateSpace(space Space) error
}

type EDClientV7

type EDClientV7 struct {
	Client *resty.Client
	Config *Config
}

func (*EDClientV7) CreateSpace added in v0.0.15

func (h *EDClientV7) CreateSpace(space Space) error

func (*EDClientV7) ExportSavedObjects

func (h *EDClientV7) ExportSavedObjects(spaceName string) (*Response, error)

func (*EDClientV7) GetHealthStatus

func (h *EDClientV7) GetHealthStatus() (*Health, error)

func (*EDClientV7) GetStateFromHealthResponse

func (h *EDClientV7) GetStateFromHealthResponse(health *Health) (esapi.DashboardServerState, error)

GetStateFromHealthResponse parse health response in json from server and return overall status of the server

func (*EDClientV7) ImportSavedObjects

func (h *EDClientV7) ImportSavedObjects(spaceName, filepath string) (*Response, error)

func (*EDClientV7) ListSpaces added in v0.0.11

func (h *EDClientV7) ListSpaces() ([]Space, error)

type EDClientV8

type EDClientV8 struct {
	Client *resty.Client
	Config *Config
}

func (*EDClientV8) CreateSpace added in v0.0.15

func (h *EDClientV8) CreateSpace(space Space) error

func (*EDClientV8) ExportSavedObjects

func (h *EDClientV8) ExportSavedObjects(spaceName string) (*Response, error)

func (*EDClientV8) GetHealthStatus

func (h *EDClientV8) GetHealthStatus() (*Health, error)

func (*EDClientV8) GetStateFromHealthResponse

func (h *EDClientV8) GetStateFromHealthResponse(health *Health) (esapi.DashboardServerState, error)

GetStateFromHealthResponse parse health response in json from server and return overall status of the server

func (*EDClientV8) ImportSavedObjects

func (h *EDClientV8) ImportSavedObjects(spaceName, filepath string) (*Response, error)

func (*EDClientV8) ListSpaces added in v0.0.11

func (h *EDClientV8) ListSpaces() ([]Space, error)

type Health

type Health struct {
	ConnectionResponse Response
	OverallState       string
	StateFailedReason  map[string]string
}

type KubeDBClientBuilder

type KubeDBClientBuilder struct {
	// contains filtered or unexported fields
}

func (*KubeDBClientBuilder) GetElasticsearchDashboardClient

func (o *KubeDBClientBuilder) GetElasticsearchDashboardClient() (*Client, error)

func (*KubeDBClientBuilder) WithAuthSecret

func (o *KubeDBClientBuilder) WithAuthSecret(secret *core.Secret) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithContext

func (*KubeDBClientBuilder) WithDatabaseRef

func (*KubeDBClientBuilder) WithDbVersion

func (*KubeDBClientBuilder) WithDbVersionInfo

func (o *KubeDBClientBuilder) WithDbVersionInfo(versionInfo *DbVersionInfo) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithPod

func (o *KubeDBClientBuilder) WithPod(podName string) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithURL

type OSClient

type OSClient struct {
	Client *resty.Client
	Config *Config
}

func (*OSClient) CreateSpace added in v0.0.15

func (h *OSClient) CreateSpace(_ Space) error

func (*OSClient) ExportSavedObjects

func (h *OSClient) ExportSavedObjects(_ string) (*Response, error)

func (*OSClient) GetHealthStatus

func (h *OSClient) GetHealthStatus() (*Health, error)

func (*OSClient) GetStateFromHealthResponse

func (h *OSClient) GetStateFromHealthResponse(health *Health) (esapi.DashboardServerState, error)

GetStateFromHealthResponse parse health response in json from server and return overall status of the server

func (*OSClient) ImportSavedObjects

func (h *OSClient) ImportSavedObjects(_, filepath string) (*Response, error)

func (*OSClient) ListSpaces added in v0.0.11

func (h *OSClient) ListSpaces() ([]Space, error)

type Response

type Response struct {
	Code int

	Body io.ReadCloser
	// contains filtered or unexported fields
}

type ResponseBody

type ResponseBody struct {
	Name    string                 `json:"name"`
	UUID    string                 `json:"uuid"`
	Version map[string]interface{} `json:"version"`
	Status  map[string]interface{} `json:"status"`
	Metrics map[string]interface{} `json:"metrics"`
}

type Space added in v0.0.15

type Space struct {
	Id               string   `json:"id"`
	Name             string   `json:"name"`
	Description      string   `json:"description,omitempty"`
	Color            string   `json:"color,omitempty"`
	Initials         string   `json:"initials,omitempty"`
	DisabledFeatures []string `json:"disabledFeatures,omitempty"`
	ImageUrl         string   `json:"imageUrl,omitempty"`
}

Jump to

Keyboard shortcuts

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