Documentation
¶
Index ¶
- Constants
- type MetaInfo
- func (sf *MetaInfo) Generate() (barcode.Barcode, error)
- func (sf MetaInfo) GenerateToBase64() (string, string, error)
- func (sf *MetaInfo) GenerateToBytes() ([]byte, string, error)
- func (sf *MetaInfo) GenerateToFile(path string) (string, error)
- func (sf *MetaInfo) GenerateToImageB64() (string, string, error)
Constants ¶
View Source
const ( ExtJPG = ".jpg" ExtPNG = ".png" ExtGIF = ".gif" ExtBMP = ".bmp" )
扩展名,支持四种图片二维码生成
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetaInfo ¶
type MetaInfo struct {
Content string // 内容
Level qr.ErrorCorrectionLevel
Mode qr.Encoding
Width int
Height int
Ext string // 命名扩展名
}
MetaInfo 元信息
func (MetaInfo) GenerateToBase64 ¶ added in v0.2.7
GenerateToBase64 generate QR code to base64 string, return base64 string and filename
func (*MetaInfo) GenerateToBytes ¶
GenerateToBytes generate to byte
func (*MetaInfo) GenerateToFile ¶
GenerateToFile generate QR code, return filename
Click to show internal directories.
Click to hide internal directories.