Documentation
¶
Overview ¶
Package utils provides utility functions for the AWX package.
Index ¶
- func AtoiDefault(s string, defaultValue *int) *int
- func DiagCreate(method string, err error) diag.Diagnostics
- func DiagDelete(method string, id interface{}, err error) diag.Diagnostics
- func DiagFetch(method string, id interface{}, err error) diag.Diagnostics
- func DiagNotFound(method string, id interface{}, err error) diag.Diagnostics
- func DiagUpdate(method string, id interface{}, err error) diag.Diagnostics
- func Diagf(diagSummary, diagDetails string, detailsVars ...interface{}) diag.Diagnostics
- func MarshalYAML(v interface{}) string
- func Normalize(s interface{}) string
- func NormalizeJSONOk(s interface{}) (string, bool)
- func NormalizeYamlOk(s interface{}) (string, bool)
- func StateIDToInt(tfElement string, d *schema.ResourceData) (int, diag.Diagnostics)
- func UnmarshalYAML(str string) map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtoiDefault ¶
AtoiDefault takes a string and a defaultValue. If the string cannot be converted, defaultValue is returned.
func DiagCreate ¶ added in v1.0.5
func DiagCreate(method string, err error) diag.Diagnostics
DiagCreate : Return the message for the create method
func DiagDelete ¶ added in v1.0.5
func DiagDelete(method string, id interface{}, err error) diag.Diagnostics
DiagDelete : Return the message for the delete method
func DiagFetch ¶ added in v1.0.5
func DiagFetch(method string, id interface{}, err error) diag.Diagnostics
DiagFetch : Return the message for the fetch method
func DiagNotFound ¶ added in v1.0.5
func DiagNotFound(method string, id interface{}, err error) diag.Diagnostics
DiagNotFound : Return the message for the not found method
func DiagUpdate ¶ added in v1.0.5
func DiagUpdate(method string, id interface{}, err error) diag.Diagnostics
DiagUpdate : Return the message for the update method
func Diagf ¶ added in v1.0.5
func Diagf(diagSummary, diagDetails string, detailsVars ...interface{}) diag.Diagnostics
Diagf : Return the message for the diag method
func MarshalYAML ¶ added in v1.0.5
func MarshalYAML(v interface{}) string
MarshalYAML : Marshal the interface{} to YAML string
func Normalize ¶ added in v1.0.5
func Normalize(s interface{}) string
Normalize : normalize the input data of type interface{} to string of either JSON or YAML
func NormalizeJSONOk ¶ added in v1.0.5
NormalizeJSONOk : normalize the input data of type interface{} to string of JSON
func NormalizeYamlOk ¶ added in v1.0.5
NormalizeYamlOk : normalize the input data of type interface{} to string of YAML
func StateIDToInt ¶ added in v1.0.5
func StateIDToInt(tfElement string, d *schema.ResourceData) (int, diag.Diagnostics)
StateIDToInt : Convert the ID from the state to an integer
func UnmarshalYAML ¶ added in v1.0.5
UnmarshalYAML : Unmarshal the YAML string to map[string]interface{}
Types ¶
This section is empty.