Documentation ¶
Overview ¶
Package tools is where some legacy provider functions were dropped
Index ¶
- Constants
- Variables
- func AddPrefix(str, pre string) string
- func BoolPtr(b bool) *bool
- func ContainsString(s []string, searchTerm string) bool
- func ConvertToString(data interface{}) (res string)
- func DiagWarningf(format string, a ...interface{}) diag.Diagnostics
- func DiagsWithErrors(d diag.Diagnostics, errs ...error) diag.Diagnostics
- func Float64Ptr(f float64) *float64
- func GetFirstNotEmpty(values ...string) string
- func GetIntID(str, prefix string) (int, error)
- func GetMd5Sum(key interface{}) (string, error)
- func GetSHAString(rdata string) string
- func Int64Ptr(i int64) *int64
- func IntPtr(i int) *int
- func ParseDate(layout, value string) (time.Time, error)
- func StringPtr(s string) *string
Constants ¶
const DateTimeFormat = "2006-01-02T15:04:05Z"
DateTimeFormat is the layout used across the provider.
Variables ¶
var ErrDateFormat = errors.New("unable to parse date")
ErrDateFormat is returned when there is an error parsing a string date
Functions ¶
func ContainsString ¶
ContainsString determines if the searched string appears in the array
func ConvertToString ¶
func ConvertToString(data interface{}) (res string)
ConvertToString will convert different types to strings.
func DiagWarningf ¶
func DiagWarningf(format string, a ...interface{}) diag.Diagnostics
DiagWarningf creates a diag.Diagnostics with a single Warning level diag.Diagnostic entry
func DiagsWithErrors ¶
func DiagsWithErrors(d diag.Diagnostics, errs ...error) diag.Diagnostics
DiagsWithErrors appends several errors to a diag.Diagnostics
func Float64Ptr ¶
Float64Ptr returns a pointer to a float64 passed as an argument
func GetFirstNotEmpty ¶
GetFirstNotEmpty returns first not empty string
func GetMd5Sum ¶
GetMd5Sum calculates md5Sum for any given interface{}. Passing a nil pointer to GetMd5Sum will panic, as they cannot be transmitted by gob.
func GetSHAString ¶
GetSHAString returns a sha1 from the string
Types ¶
This section is empty.