SkillAgentSearch skills...

Qrcode

QR Code generator function for the FaaS Platform in #golang

Install / Use

/learn @faas-and-furious/Qrcode
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

FaaS qrcode

Go Report Card

This repo contains an example FaaS function which uses the skip2/go-qrcode Go library to generate a QR Code for a string.

Deploying the Function

Make sure you have deployed a FaaS stack to your cluster using the instructions on the FaaS repo.

Use the CLI (faas-cli)

Get the CLI

The faas-cli can be installed via brew install faas-cli or curl -sSL https://get.openfaas.com | sudo sh.

Now deploy the function as follows:

# faas-cli -action deploy -image=faasandfurious/qrcode -name=qrcode -fprocess="/usr/bin/qrcode"
200 OK
URL: http://localhost:8080/function/qrcode

Testing the Function

Now that the function is running in your FaaS environment you can test it from the command line by running:

$ curl localhost:8080/function/qrcode --data "https://github.com/alexellis/faas" > qrcode.png

You can check the QR code works using your phone, or an online QR Code decoder (ZXing Decoder Online for example)

View on GitHub
GitHub Stars17
CategoryDevelopment
Updated1y ago
Forks3

Languages

Dockerfile

Security Score

80/100

Audited on Feb 2, 2025

No findings