tokenapi-go

module
v0.0.0-...-918653d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2023 License: AGPL-3.0

README

Ledger

Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order to get stable binaries.

ledger diagram

Ledger is a service used to generate one or multiple string tokens. These tokens are 22 characters long and limited to 455,902 per request.

The service is written in Go and integrates with an external service (Source) to generate string tokens. It stores all valid issued tokens to a storage (PostgreSQL) enforcing uniqueness and validation, like no-dash characters.

Getting started

Quick start
# Clone repository
$ git clone https://github.com/danielnegri/tokenapi-go.git
$ cd tokenapi-go

# Make sure to edit the database address, username, password, and token URL parameters.
$ cp .env.sample .env
$ vim .env

# Build & run
$ docker-compose up -d
$ curl -s -XPOST http://localhost:8080/api/v1/tokens?size=1
OK : ijkr2lXOkM1EElPSDQFkeg
Getting Ledger

The easiest way to get Ledger is to use one the pre-built release binaries which are available for OSX and Linux.

For those wanting to try the very latest version, build the latest version of Ledger from the master branch. This first needs Go installed (version 1.13+ is required). All development occurs on master, including new features and bug fixes. Bug fixes are first targeted at master and subsequently ported to release branches, as described in the branch management guide.

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

License

Ledger is under the AGPL 3.0 license. See the LICENSE file for details.

Directories

Path Synopsis
cmd
net
Package valid does validation of various data types.
Package valid does validation of various data types.
Package version contains version information for this app.
Package version contains version information for this app.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL