wifiqr

package module
v0.0.0-...-153a47b Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 9 Imported by: 0

README

WIFI QR-Code

Generate a qr code for your wifi network to let others quickly connect to your wifi.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEncoder = Encoder{
	AlphaThreshold: 2000,
	GreyThreshold:  30,
	QRLevel:        qr.Highest,
}

DefaultEncoder is the encoder with default settings.

View Source
var WIFIIMG []byte

Functions

func Encode

func Encode(str string, logo image.Image, size int) (*bytes.Buffer, error)

Encode encodes QR image, adds logo overlay and renders result as PNG.

func GenWIFICode

func GenWIFICode(ssid, authType string, hidden bool, pwd ...string) (string, error)

func GenWIFIQRCode

func GenWIFIQRCode(text string, size int, logo ...image.Image) (*bytes.Buffer, error)

Types

type Encoder

type Encoder struct {
	AlphaThreshold int
	GreyThreshold  int
	QRLevel        qr.RecoveryLevel
}

Encoder defines settings for QR/Overlay encoder.

func (Encoder) Encode

func (e Encoder) Encode(str string, logo image.Image, size int) (*bytes.Buffer, error)

Encode encodes QR image, adds logo overlay and renders result as PNG.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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