BitcrowdEcto.Random (bitcrowd_ecto v1.2.0)

View Source

Various random value generators.

Summary

Functions

Generates a random token from an alphabet designed to have no ambiguities.

Generates a random token suitable for inclusion in URLs.

Generates a UUID V4.

Functions

unambiguous_human_token(length \\ 6)

(since 0.6.0)
@spec unambiguous_human_token(length :: non_neg_integer()) :: String.t()

Generates a random token from an alphabet designed to have no ambiguities.

url_token(bytes \\ 16)

(since 0.6.0)
@spec url_token(bytes :: non_neg_integer()) :: String.t()

Generates a random token suitable for inclusion in URLs.

uuid()

(since 0.6.0)
@spec uuid() :: String.t()

Generates a UUID V4.