Documentation
¶
Index ¶
- func AddConnectionSchema(providedSchema map[string]*schema.Schema)
- func CheckError(res *esapi.Response, errMsg string) sdkdiag.Diagnostics
- func CheckHttpError(res *http.Response, errMsg string) sdkdiag.Diagnostics
- func CheckHttpErrorFromFW(res *http.Response, errMsg string) fwdiag.Diagnostics
- func ConvertSDKDiagnosticsToFramework(sdkDiags sdkdiag.Diagnostics) fwdiag.Diagnostics
- func ConvertSettingsKeyToTFFieldKey(settingKey string) string
- func ConvertToAttrDiags(diags fwdiag.Diagnostics, path path.Path) fwdiag.Diagnostics
- func DiffIndexSettingSuppress(k, old, new string, d *schema.ResourceData) bool
- func DiffJsonSuppress(k, old, new string, d *schema.ResourceData) bool
- func DiffNullMapEntriesSuppress(key, old, new string, d *schema.ResourceData) bool
- func ExpandIndividuallyDefinedSettings(ctx context.Context, d *schema.ResourceData, ...) map[string]interface{}
- func ExpandStringSet(set *schema.Set) []string
- func FlattenMap(m map[string]interface{}) map[string]interface{}
- func FlipMap[K comparable, V comparable](m map[K]V) map[V]K
- func FormatStrictDateTime(t time.Time) string
- func FrameworkDiagsFromSDK(sdkDiags sdkdiag.Diagnostics) fwdiag.Diagnostics
- func IsEmpty(v interface{}) bool
- func IsKnown(value attr.Value) bool
- func JSONBytesEqual(a, b []byte) (bool, error)
- func MapsEqual(m1, m2 interface{}) bool
- func MergeSchemaMaps(maps ...map[string]*schema.Schema) map[string]*schema.Schema
- func NewDebugTransport(name string, transport http.RoundTripper) *debugRoundTripper
- func NormalizeIndexSettings(m map[string]interface{}) map[string]interface{}
- func Pointer[T any](value T) *T
- func PrettyPrintJSONLines(b []byte) string
- func SdkDiagsAsError(diags sdkdiag.Diagnostics) error
- func SliceToListType[T1 any, T2 any](ctx context.Context, value []T1, elemType attr.Type, path path.Path, ...) types.List
- func StringIsDuration(i interface{}, k string) (warnings []string, errors []error)
- func StringIsElasticDuration(i interface{}, k string) (warnings []string, errors []error)
- func StringIsHours(i interface{}, k string) (warnings []string, errors []error)
- func StringToHash(s string) (*string, error)
- func TestCheckResourceListAttr(name, key string, values []string) resource.TestCheckFunc
- func TransformSlice[T1 any, T2 any](value []T1, iteratee func(item T1) T2) []T2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConnectionSchema ¶
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) sdkdiag.Diagnostics
func CheckHttpError ¶ added in v0.6.0
func CheckHttpError(res *http.Response, errMsg string) sdkdiag.Diagnostics
func CheckHttpErrorFromFW ¶ added in v0.11.0
func CheckHttpErrorFromFW(res *http.Response, errMsg string) fwdiag.Diagnostics
func ConvertSDKDiagnosticsToFramework ¶ added in v0.11.7
func ConvertSDKDiagnosticsToFramework(sdkDiags sdkdiag.Diagnostics) fwdiag.Diagnostics
func ConvertSettingsKeyToTFFieldKey ¶ added in v0.5.0
func ConvertToAttrDiags ¶ added in v0.11.7
func ConvertToAttrDiags(diags fwdiag.Diagnostics, path path.Path) fwdiag.Diagnostics
ConvertToAttrDiags wraps an existing collection of diagnostics with an attribute path.
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 DiffNullMapEntriesSuppress ¶ added in v0.6.0
func DiffNullMapEntriesSuppress(key, old, new string, d *schema.ResourceData) bool
func ExpandIndividuallyDefinedSettings ¶ added in v0.5.0
func ExpandStringSet ¶ added in v0.4.0
func FlattenMap ¶
Flattens the multilevel map, and concatenates keys together with dot "." # Examples map of form:
map := map[string]interface{}{ "index": map[string]interface{}{ "key": 1 } }
becomes:
map := map[string]interface{}{ "index.key": 1 }
func FlipMap ¶ added in v0.7.0
func FlipMap[K comparable, V comparable](m map[K]V) map[V]K
func FormatStrictDateTime ¶ added in v0.5.0
func FrameworkDiagsFromSDK ¶ added in v0.11.7
func FrameworkDiagsFromSDK(sdkDiags sdkdiag.Diagnostics) fwdiag.Diagnostics
func JSONBytesEqual ¶
Compares the JSON in two byte slices
func MergeSchemaMaps ¶
func NewDebugTransport ¶ added in v0.6.2
func NewDebugTransport(name string, transport http.RoundTripper) *debugRoundTripper
func NormalizeIndexSettings ¶ added in v0.2.0
func PrettyPrintJSONLines ¶ added in v0.6.0
PrettyPrintJSONLines iterates through a []byte line-by-line, transforming any lines that are complete json into pretty-printed json.
func SdkDiagsAsError ¶ added in v0.11.7
func SdkDiagsAsError(diags sdkdiag.Diagnostics) error
func SliceToListType ¶ added in v0.11.7
func SliceToListType[T1 any, T2 any](ctx context.Context, value []T1, elemType attr.Type, path path.Path, diags diag.Diagnostics, iteratee func(item T1) T2) types.List
SliceToListType converts a tfsdk naive []T1 into an types.List of []T2. This handles both structs and simple types to attr.Values.
func StringIsDuration ¶ added in v0.6.0
StringIsDuration is a SchemaValidateFunc which tests to make sure the supplied string is valid duration.
func StringIsElasticDuration ¶ added in v0.6.0
StringIsElasticDuration is a SchemaValidateFunc which tests to make sure the supplied string is valid duration using Elastic time units: d, h, m, s, ms, micros, nanos. (see https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#time-units)
func StringIsHours ¶ added in v0.11.7
StringIsHours is a SchemaValidateFunc which tests to make sure the supplied string is in the required format of HH:mm
func StringToHash ¶ added in v0.3.0
func TestCheckResourceListAttr ¶ added in v0.4.0
func TestCheckResourceListAttr(name, key string, values []string) resource.TestCheckFunc
func TransformSlice ¶ added in v0.11.7
TransformSlice converts []T1 to []T2 via the iteratee.
Types ¶
This section is empty.