Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultImgSize = 256
)
View Source
const (
Version = "1.0.3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QrCodeOperation ¶
type QrCodeOperation struct {
// contains filtered or unexported fields
}
QrCodeOperation 二维码操作
func QrCode ¶
func QrCode(ctx context.Context, imgSize int, qcContent string, qcLevel qrcode.RecoveryLevel) (*QrCodeOperation, error)
QrCode 生成二维码
func QrCodeText ¶
func QrCodeText(ctx context.Context, imgSize int, textContent string, qcContent string, qcLevel qrcode.RecoveryLevel) (*QrCodeOperation, error)
QrCodeText 生成二维码带文本
func (*QrCodeOperation) EncodePNG ¶
func (o *QrCodeOperation) EncodePNG(w io.Writer) error
EncodePNG 返回图片编码
func (*QrCodeOperation) SavePNG ¶
func (o *QrCodeOperation) SavePNG(filePath, fileName string) error
SavePNG 保存图片
Click to show internal directories.
Click to hide internal directories.