elasticsearch

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceFeaturesResp

type DeviceFeaturesResp struct {
	Aggregations struct {
		MyBuckets struct {
			Meta struct {
			} `json:"meta"`
			AfterKey struct {
				DataRegion             string `json:"data.region"`
				DataDeviceDefinitionID string `json:"data.deviceDefinitionId"`
			} `json:"after_key"`
			Buckets []struct {
				Key struct {
					DataRegion             string `json:"data.region"`
					DataDeviceDefinitionID string `json:"data.deviceDefinitionId"`
				} `json:"key"`
				DocCount     int `json:"doc_count"`
				Integrations struct {
					DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
					SumOtherDocCount        int `json:"sum_other_doc_count"`
					Buckets                 []struct {
						Key               string `json:"key"`
						DocCount          int    `json:"doc_count"`
						DeviceDefinitions struct {
							DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
							SumOtherDocCount        int `json:"sum_other_doc_count"`
							Buckets                 []struct {
								Key         []string `json:"key"`
								KeyAsString string   `json:"key_as_string"`
								DocCount    int      `json:"doc_count"`
								Regions     struct {
									DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
									SumOtherDocCount        int `json:"sum_other_doc_count"`
									Buckets                 []struct {
										Key      string `json:"key"`
										DocCount int    `json:"doc_count"`
										Features struct {
											Buckets map[string]ElasticFilterResult `json:"buckets"`
										} `json:"features"`
									} `json:"buckets"`
								} `json:"regions"`
							} `json:"buckets"`
						} `json:"deviceDefinitions"`
					} `json:"buckets"`
				} `json:"integrations,omitempty"`
			} `json:"buckets"`
		} `json:"my_buckets"`
	} `json:"aggregations"`
}

type ElasticFilterResult

type ElasticFilterResult struct {
	DocCount int `json:"doc_count"`
}

type ElasticSearch

type ElasticSearch struct {
	BaseURL string
	// contains filtered or unexported fields
}

func NewElasticSearch

func NewElasticSearch(settings *config.Settings, logger zerolog.Logger) (*ElasticSearch, error)

func (*ElasticSearch) GetDeviceFeatures

func (d *ElasticSearch) GetDeviceFeatures(envName string, filterList map[string]any) (DeviceFeaturesResp, error)

GetDeviceFeatures queries elastic for the presence of the given filterList (integration_features), returns all of them regardless if seen or not

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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