searchindex

package
v2.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Package searchindex contains internal representation of the Atlas SearchIndex resource

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchIndex

type SearchIndex struct {
	akov2.SearchIndex
	akov2.AtlasSearchIndexConfigSpec
	ID     *string
	Status *string
}

SearchIndex is the internal representation of the Atlas SearchIndex resource for the AKO usage SearchIndexes represented differently in AKO as CRDs and in Atlas as atlas internal structures. Having a separate representation allows for simpler testing of the internal logic, not tied to AKO and Atlas structures

func NewSearchIndexFromAKO

func NewSearchIndexFromAKO(index *akov2.SearchIndex, config *akov2.AtlasSearchIndexConfigSpec) *SearchIndex

NewSearchIndexFromAKO requires both parts of search index: data-related part from a Deployment, and index configuration represented in a separate CRD. Partial construction is disabled as it won't work for comparing indexes between each other.

func NewSearchIndexFromAtlas

func NewSearchIndexFromAtlas(index admin.ClusterSearchIndex) (*SearchIndex, error)

NewSearchIndexFromAtlas returns internal representation of the SearchIndex converted from Atlas internals. It can return an error in case some fields are not valid JSON.

func (*SearchIndex) EqualTo

func (s *SearchIndex) EqualTo(value *SearchIndex) (bool, error)

EqualTo compares two SearchIndexes using SemanticEqual method

func (*SearchIndex) GetID

func (s *SearchIndex) GetID() string

func (*SearchIndex) GetStatus

func (s *SearchIndex) GetStatus() string

func (*SearchIndex) Normalize

func (s *SearchIndex) Normalize() (*SearchIndex, error)

func (*SearchIndex) ToAtlas

func (s *SearchIndex) ToAtlas() (*admin.ClusterSearchIndex, error)

ToAtlas converts internal SearchIndex representation to the Atlas structure used for API calls

Jump to

Keyboard shortcuts

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