helpers

package
v0.66.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const IDDelimiter = "|"

Variables

This section is empty.

Functions

func DecodeSnowflakeID added in v0.64.0

func DecodeSnowflakeID(id string) sdk.ObjectIdentifier

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

func IPListToSnowflakeString(ips []string) string

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

func ListContentToString(listString string) string

ListContentToString strips list elements of double quotes or brackets.

func ListToSnowflakeString

func ListToSnowflakeString(list []string) string

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 RandomIntRange(min, max int) int

func RandomString added in v0.64.0

func RandomString() string

func RandomStringRange added in v0.64.0

func RandomStringRange(min, max int) string

func StringListToList added in v0.62.0

func StringListToList(s string) []string

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

func StringToBool(s string) bool

StringToBool converts a string to a bool.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL