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