Documentation ¶
Index ¶
- func DecodeStateID(stateID string) map[string]string
- func EncodeStateID(values map[string]string) string
- func ExpandStringList(list []any) (res []string)
- func ExpandStringListFromSetSchema(set *schema.Set) []string
- func ExpandTagsFromSetSchema(d *schema.ResourceData) *[]admin.ResourceTag
- func FlattenLinks(links []admin.Link) []map[string]string
- func FlattenTags(tags []admin.ResourceTag) []map[string]string
- func GetEncodedID(stateID, keyPosition string) string
- func Int64PtrToIntPtr(i64 *int64) *int
- func IntPtr(v int) *int
- func IntPtrToInt64Ptr(i *int) *int64
- func IsStringPresent(strPtr *string) bool
- func MongoDBRegionToAWSRegion(region string) string
- func Pointer[T any](x T) *T
- func SafeString(s *string) string
- func StringNullIfEmpty(v string) types.String
- func StringPtr(v string) *string
- func StringPtrNullIfEmpty(p *string) types.String
- func StringToTime(str string) (time.Time, bool)
- func TimePtrToStringPtr(t *time.Time) *string
- func TimeToString(t time.Time) string
- func TypesListToString(ctx context.Context, list types.List) []string
- func TypesSetToString(ctx context.Context, set types.Set) []string
- func ValRegion(reg any, opt ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeStateID ¶
func EncodeStateID ¶
func ExpandStringList ¶
func ExpandStringListFromSetSchema ¶ added in v1.15.0
func ExpandTagsFromSetSchema ¶ added in v1.15.2
func ExpandTagsFromSetSchema(d *schema.ResourceData) *[]admin.ResourceTag
func FlattenTags ¶ added in v1.15.2
func FlattenTags(tags []admin.ResourceTag) []map[string]string
func GetEncodedID ¶
func Int64PtrToIntPtr ¶
func IntPtrToInt64Ptr ¶
func IsStringPresent ¶
IsStringPresent returns true if the string is non-empty.
func MongoDBRegionToAWSRegion ¶
MongoDBRegionToAWSRegion converts region in US_EAST_1-like format to us-east-1-like
func SafeString ¶
func StringNullIfEmpty ¶
StringNullIfEmpty converts a string value to a Framework String value. An empty string is converted to a null String. Useful for optional attributes.
func StringPtrNullIfEmpty ¶
StringPtrNullIfEmpty is similar to StringNullIfEmpty but can also handle nil string pointers.
func StringToTime ¶ added in v1.15.2
StringToTime is the opposite to TimeToString, returns ok if conversion is possible.
func TimePtrToStringPtr ¶
utility conversions that can potentially be defined in sdk
func TimeToString ¶
TimeToString returns a RFC3339 date time string format. The resulting format is identical to the format returned by Atlas API, documented as ISO 8601 timestamp format in UTC. It also returns decimals in seconds (up to nanoseconds) if available. Example formats: "2023-07-18T16:12:23Z", "2023-07-18T16:12:23.456Z"
Types ¶
This section is empty.