configuration

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Type ChangeType
	Path []string
	From interface{}
	To   interface{}
}

func (Change) FullPath

func (c Change) FullPath() string

func (Change) IsIndexMetadata

func (c Change) IsIndexMetadata() (bool, error)

func (Change) ShouldBeReported

func (c Change) ShouldBeReported() bool

func (Change) String

func (c Change) String() string

type ChangeCollection

type ChangeCollection []Change

type ChangeType

type ChangeType int
const (
	ChangeTypeCreate ChangeType = iota
	ChangeTypeUpdate
	ChangeTypeDelete
)

func NewChangeTypeFromDiffType

func NewChangeTypeFromDiffType(diffType string) ChangeType

func (ChangeType) String

func (d ChangeType) String() string

type Index

type Index struct {
	Mappings Mappings `json:"mappings,omitempty" yaml:"mappings"`
	Settings Settings `json:"settings,omitempty" yaml:"settings"`
}

func New

func New(mappings Mappings, settings Settings) Index

func (Index) Diff

func (i Index) Diff(mapping Index) (ChangeCollection, error)

func (*Index) GetMappings

func (i *Index) GetMappings() Mappings

func (*Index) GetSettings

func (i *Index) GetSettings() Settings

func (*Index) UnmarshalJSON

func (i *Index) UnmarshalJSON(data []byte) error

func (*Index) UnmarshalYAML

func (i *Index) UnmarshalYAML(value *yaml.Node) error

type IndexCollection

type IndexCollection map[string]Index

func NewIndexCollection

func NewIndexCollection() IndexCollection

func (IndexCollection) Exist

func (mc IndexCollection) Exist(indexName string) bool

func (IndexCollection) Get

func (mc IndexCollection) Get(indexName string) (Index, error)

func (IndexCollection) Load

func (mc IndexCollection) Load(indexName string, index Index)

type Mappings

type Mappings map[string]interface{}

func (Mappings) Diff

func (m Mappings) Diff(mappings Mappings) (ChangeCollection, error)

func (Mappings) Merge

func (m Mappings) Merge(mappings Mappings) error

type Settings

type Settings map[string]interface{}

func (Settings) CleanUp

func (s Settings) CleanUp()

func (Settings) Diff

func (s Settings) Diff(settings Settings) (ChangeCollection, error)

func (Settings) GetIndexSettings

func (s Settings) GetIndexSettings() map[string]interface{}

func (Settings) Merge

func (s Settings) Merge(settings Settings) error

func (*Settings) UnmarshalYAML

func (s *Settings) UnmarshalYAML(value *yaml.Node) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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