Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Base32Encoder = base32.NewEncoding(specialEncoderKey).WithPadding(base32.NoPadding)
Functions ¶
func FixedLengthUniqueID ¶
FixedLengthUniqueID creates a new UniqueID that is based on the inputID and of a specified length, if the given id is longer than the maxLength.
func FixedLengthUniqueIDForParts ¶
FixedLengthUniqueIDForParts creates a new uniqueID using the parts concatenated using `-` and ensures that the uniqueID is not longer than the maxLength. In case a simple concatenation yields a longer string, a new hashed ID is created which is always around 8 characters in length.
Types ¶
type Algorithm ¶ added in v1.0.13
type Algorithm uint32
Algorithm defines an enum for the encoding algorithm to use.
type AlgorithmOption ¶ added in v1.0.13
type AlgorithmOption struct { Option // contains filtered or unexported fields }
AlgorithmOption defines a wrapper to pass the algorithm to encoding functions.
func NewAlgorithmOption ¶ added in v1.0.13
func NewAlgorithmOption(algo Algorithm) AlgorithmOption
NewAlgorithmOption wraps the Algorithm into an AlgorithmOption to pass to the encoding functions.
Click to show internal directories.
Click to hide internal directories.