utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConnectionSchema

func AddConnectionSchema(providedSchema map[string]*schema.Schema)

Returns the common connection schema for all the Elasticsearch resources, which defines the fields which can be used to configure the API access

func CheckError

func CheckError(res *esapi.Response, errMsg string) diag.Diagnostics

func DiffIndexSettingSuppress added in v0.2.0

func DiffIndexSettingSuppress(k, old, new string, d *schema.ResourceData) bool

func DiffJsonSuppress

func DiffJsonSuppress(k, old, new string, d *schema.ResourceData) bool

func FlattenMap

func FlattenMap(m map[string]interface{}) map[string]interface{}

Flattens the multilevel map, and concatenates keys together with dot "." # Exmaples map of form:

map := map[string]interface{}{
        "index": map[string]interface{}{
                "key": 1
        }
}

becomes:

map := map[string]interface{}{
        "index.key": 1
}

func IsEmpty

func IsEmpty(v interface{}) bool

func JSONBytesEqual

func JSONBytesEqual(a, b []byte) (bool, error)

Compares the JSON in two byte slices

func MapsEqual

func MapsEqual(m1, m2 interface{}) bool

func MergeSchemaMaps

func MergeSchemaMaps(maps ...map[string]*schema.Schema) map[string]*schema.Schema

func NormalizeIndexSettings added in v0.2.0

func NormalizeIndexSettings(m map[string]interface{}) map[string]interface{}

func StringToHash added in v0.3.0

func StringToHash(s string) (*string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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