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 AlgorithmOption ¶
type AlgorithmOption struct { Option // contains filtered or unexported fields }
AlgorithmOption defines a wrapper to pass the algorithm to encoding functions.
func NewAlgorithmOption ¶
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.