qrcode-server

command module
v0.0.0-...-cf59f0d Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT, MIT Imports: 15 Imported by: 0

README

Generation of one-time qr codes.

Instaling
  1. Clone project
git clone https://github.com/tesla-v7/qrcode-server.git
  1. Change folder
cd  qrcode-server
  1. Configure your config.toml
[qr]

#maximum identifier value
idMax=999

#prefix for idMax(required for deployment on multiple servers)
idPrefix=1

#logo file name
logoPath="logo.png"

#color in the center of qr code
colorCenter="05ffb8"

#qr code edge color
colorEdge="007aff"

#radius of one bit of qr code
pixRadius=5

#gr code lifetime
lifetime=120

#buffer size of ready qr codes
sizeBuffer=8

#the number of threads to generate qr codes
numberOfThreads=1

#coded text pattern in qr code
template="{\"id\": %d}"

Build

./build.sh

Run

./qr-code s --listen 0.0.0.0:3344

View result

curl http://0.0.0.0:3344/qrCode

Result

{"id":9281,"qrBase64":"data:image/png;base64,iVBOR...kJggg=="}

qr-code result image:

qrResult.png

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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