mqrcode

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXT_JPG = ".png"
)
View Source
const QrCodeSavePath = "qrcode/"

Variables

This section is empty.

Functions

func GetQrCodeFileName

func GetQrCodeFileName(value string) string

func GetQrCodeFullPath

func GetQrCodeFullPath() 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
}

QrCode 二维码 实体类

func NewQrCode

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

NewQrCode 创建一个 qrode

func (*QrCode) CheckEncode

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

CheckEncode 检查二维码是否存在

func (*QrCode) Encode

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

Encode 返回带有名称和路径的二维码

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