qrcode

package
v0.0.0-...-c7ddeeb Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXT_JPG = ".jpg"
)

Variables

This section is empty.

Functions

func GetQrCodeFileName

func GetQrCodeFileName(value string) string

* 获取二维码文件名

func GetQrCodeFullPath

func GetQrCodeFullPath() string

* 获取二维码完整路径

func GetQrCodeFullUrl

func GetQrCodeFullUrl(name string) string

* 获取二维码路由

func GetQrCodePath

func GetQrCodePath() string

* 获取二维码路径

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

* 产生二维码

func (*QrCode) CheckEncode

func (q *QrCode) CheckEncode(path string) bool

* 检验解码二维码

func (*QrCode) Encode

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

* 加密二维码

func (*QrCode) GetQrCodeExt

func (q *QrCode) GetQrCodeExt() string

* 获取二维码文件后缀名

Jump to

Keyboard shortcuts

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