Documentation
¶
Overview ¶
Package service provides token generation services for various formats. Supports UUID, numeric, Luhn-preserving, and alphanumeric token generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenGenerator ¶
TokenGenerator defines the interface for token generation.
func NewAlphanumericGenerator ¶
func NewAlphanumericGenerator() TokenGenerator
NewAlphanumericGenerator creates a new alphanumeric token generator. Generates cryptographically secure random alphanumeric tokens using [A-Za-z0-9].
func NewLuhnGenerator ¶
func NewLuhnGenerator() TokenGenerator
NewLuhnGenerator creates a new Luhn algorithm compliant token generator. Generates cryptographically secure random numeric tokens that pass Luhn validation (used for payment cards).
func NewNumericGenerator ¶
func NewNumericGenerator() TokenGenerator
NewNumericGenerator creates a new numeric token generator. Generates cryptographically secure random numeric strings of the specified length.
func NewTokenGenerator ¶
func NewTokenGenerator(formatType tokenizationDomain.FormatType) (TokenGenerator, error)
NewTokenGenerator creates a new token generator based on the specified format type.
func NewUUIDGenerator ¶
func NewUUIDGenerator() TokenGenerator
NewUUIDGenerator creates a new UUID token generator. Generates UUIDv7 tokens.