Documentation
¶
Index ¶
- Constants
- type MetaInfo
- func (sf *MetaInfo) Encode() (barcode.Barcode, error)
- func (sf *MetaInfo) Filename() string
- func (sf *MetaInfo) ToBase64() (string, error)
- func (sf *MetaInfo) ToBytes() ([]byte, error)
- func (sf *MetaInfo) ToImageB64() (string, error)
- func (sf *MetaInfo) Write(w io.Writer) error
- func (sf *MetaInfo) WriteFile(path 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) ToBase64 ¶ added in v1.0.3
ToBase64 generate QR code to base64 string, return base64 string
func (*MetaInfo) ToImageB64 ¶ added in v1.0.3
ToImageB64 generate QR code to base images string, return base64 image string base64 images string format like: data: image/png;base64,xxxxxxxxxx
Click to show internal directories.
Click to hide internal directories.