Documentation
¶
Index ¶
- func DefaultTimeout() time.Duration
- func Is404(err error) bool
- func IsIPv4(str string) bool
- func IsIPv6(str string) bool
- func NewNameOrIdList(nameOrIDs types.Set) ([]oxide.NameOrId, diag.Diagnostics)
- func ReplaceBackticks(s string) string
- func RequiresReplaceUnlessEmptyStringOrNull() stringplanmodifier.RequiresReplaceIfFunc
- func SliceDiff[S []E, E any](a, b S) S
- func SliceDiffByID[S []E, E any](a, b S, idFn func(E) any) S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultTimeout ¶
func IsIPv4 ¶
IsIPv4 checks if the string is an IP version 4. Original function from https://pkg.go.dev/github.com/asaskevich/govalidator#IsIPv4 Shamelessly copied here to avoid importing the entire package
func IsIPv6 ¶
IsIPv6 checks if the string is an IP version 6. Original function from https://pkg.go.dev/github.com/asaskevich/govalidator#IsIPv6 Shamelessly copied here to avoid importing the entire package
func NewNameOrIdList ¶
NewNameOrIdList takes a terraform set and converts is into a slice NameOrIds.
func ReplaceBackticks ¶
ReplaceBackticks replaces ” with `. It can be used to defined codeblocks in markdown raw strings.
var mdString = ReplaceBackticks(`this is a ''code'' block`)
func RequiresReplaceUnlessEmptyStringOrNull ¶
func RequiresReplaceUnlessEmptyStringOrNull() stringplanmodifier.RequiresReplaceIfFunc
RequiresReplaceUnlessEmptyStringOrNull returns a resource.RequiresReplaceIfFunc that returns true unless the change is from an empty string or null.
This is particularly helpful for creating new nested objects that cannot be modified themselves, but it is possible to add or remove them.
func SliceDiff ¶
func SliceDiff[S []E, E any](a, b S) S
SliceDiff returns a slice of the elements in `a` that aren't in `b`. This function is a bit expensive, but given the fact that the expected number of elements is relatively slow it's not a big deal.
func SliceDiffByID ¶
SliceDiffByID is similar to SliceDiff but takes idFn, which should return a value used to identity slice elements.
Types ¶
This section is empty.