proxy.golang.org : github.com/ceebydith/id
Package id provides functionality to generate unique IDs based on Unix time and a sequencer. The generated ID is a signed number that can be verified using a validator. This package supports various validators and sequencers for flexible usage. The id package offers: - Unique ID generation using Unix time and sequencers. - Customizable validators for signing and verifying IDs. - Flexible sequencer implementations, including in-memory and database-backed sequencers. To install the package, use: Example of generating an ID with a range sequencer and Luhn validator: Example of using a PostgreSQL sequence as the sequencer: Package id provides utilities for generating and validating sequential identifiers using the Luhn algorithm or other methods or without validation. The package includes the following components: 1. Sequencer: Interface for generating sequences. 2. Validator: Interface for signing and verifying numbers. 3. Generator: Struct for generating signed numbers with a sequence and validator. Types: Functions: Structs: Example usage:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/ceebydith/id
License: MIT
Latest release: 5 months ago
First release: 6 months ago
Namespace: github.com/ceebydith
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 1 month ago