qrcode

package
v0.0.0-...-1911912 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXT_JPG = ".jpg"
)

Variables

This section is empty.

Functions

func GenerateQrWithLogo(uri, path string) (string, string, error)

Encode generate QR code with logo

func GetQrCodeFileName

func GetQrCodeFileName(value string) string

GetQrCodeFileName get qr file name

func GetQrCodeFullPath

func GetQrCodeFullPath() string

GetQrCodeFullPath get full save path

func GetQrCodeFullUrl

func GetQrCodeFullUrl(name string) string

GetQrCodeFullUrl get the full access path

func GetQrCodePath

func GetQrCodePath() string

GetQrCodePath get save path

Types

type QrCode

type QrCode struct {
	URL    string
	Width  int
	Height int
	Ext    string
	Level  qr.ErrorCorrectionLevel
	Mode   qr.Encoding
}

func NewQrCode

func NewQrCode(url string, width, height int, level qr.ErrorCorrectionLevel, mode qr.Encoding) *QrCode

NewQrCode initialize instance

func (*QrCode) Encode

func (q *QrCode) Encode(path string) (string, string, error)

Encode generate QR code

func (*QrCode) GetQrCodeExt

func (q *QrCode) GetQrCodeExt() string

GetQrCodeExt get qr file ext

Jump to

Keyboard shortcuts

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