Documentation ¶
Index ¶
- Constants
- func DecodeSnowflakeID(id string) sdk.ObjectIdentifier
- func DecodeSnowflakeParameterID(identifier string) (sdk.ObjectIdentifier, error)
- func EncodeSnowflakeID(attributes ...interface{}) string
- func IPListToSnowflakeString(ips []string) string
- func ListContentToString(listString string) string
- func ListToSnowflakeString(list []string) string
- func RandomBool() bool
- func RandomIntRange(min, max int) int
- func RandomString() string
- func RandomStringRange(min, max int) string
- func Retry(attempts int, sleepDuration time.Duration, f func() (error, bool)) error
- func StringListToList(s string) []string
- func StringToBool(s string) bool
Constants ¶
const ( IDDelimiter = "|" ParameterIDDelimiter = '.' )
Variables ¶
This section is empty.
Functions ¶
func DecodeSnowflakeID ¶ added in v0.64.0
func DecodeSnowflakeID(id string) sdk.ObjectIdentifier
func DecodeSnowflakeParameterID ¶ added in v0.75.0
func DecodeSnowflakeParameterID(identifier string) (sdk.ObjectIdentifier, error)
DecodeSnowflakeParameterID decodes identifier (usually passed as one of the parameter in tf configuration) into sdk.ObjectIdentifier. identifier can be specified in two ways: quoted and unquoted, e.g.
quoted { "some_identifier": "\"database.name\".\"schema.name\".\"test.name\" } (note that here dots as part of the name are allowed)
unquoted { "some_identifier": "database_name.schema_name.test_name" } (note that here dots as part of the name are NOT allowed, because they're treated in this case as dividers)
The following configuration { "some_identifier": "db.name" } will be parsed as an object called "name" that lives inside database called "db", not a database called "db.name". In this case quotes should be used.
func EncodeSnowflakeID ¶ added in v0.64.0
func EncodeSnowflakeID(attributes ...interface{}) string
EncodeSnowflakeID generates a unique ID for a resource.
func IPListToSnowflakeString ¶ added in v0.47.0
IPListToString formats a list of IPs into a Snowflake-DDL friendly string, e.g. ('192.168.1.0', '192.168.1.100').
func ListContentToString ¶ added in v0.36.0
ListContentToString strips list elements of double quotes or brackets.
func ListToSnowflakeString ¶
This function converts list of string into snowflake formated string like 'ele1', 'ele2'.
func RandomBool ¶ added in v0.64.0
func RandomBool() bool
func RandomIntRange ¶ added in v0.64.0
func RandomString ¶ added in v0.64.0
func RandomString() string
func RandomStringRange ¶ added in v0.64.0
func StringListToList ¶ added in v0.62.0
StringListToList splits a string into a slice of strings, separated by a separator. It also removes empty strings and trims whitespace.
func StringToBool ¶ added in v0.62.0
StringToBool converts a string to a bool.
Types ¶
This section is empty.