Versions in this module Expand all Collapse all v1 v1.0.0 Sep 20, 2026 Changes in this version + const MaxVersion + const MinVersion + var ErrDataTooLong = errors.New("qrkit: content too long") + var ErrEmptyData = errors.New("qrkit: empty content") + var ErrInvalidOption = errors.New("qrkit: invalid option") + var ErrLogoTooLarge = errors.New("qrkit: logo too large") + type FinderShape int + const FinderCircle + const FinderModules + const FinderRounded + const FinderSquare + type FinderStyle struct + InnerColor color.Color + OuterColor color.Color + Shape FinderShape + type LogoOption func(*logoCfg) + func LogoAllowUnsafe() LogoOption + func LogoClip(s LogoShape) LogoOption + func LogoPadding(modules float64) LogoOption + func LogoPlate(col color.Color) LogoOption + func LogoScale(s float64) LogoOption + type LogoShape int + const LogoCircle + const LogoRounded + const LogoSquare + type ModuleShape int + const ShapeCircle + const ShapeDiamond + const ShapeHorizontalBars + const ShapeRounded + const ShapeSquare + const ShapeVerticalBars + type Option func(*config) + func WithBackground(col color.Color) Option + func WithCornerRadius(r float64) Option + func WithFinderStyle(s FinderStyle) Option + func WithForeground(col color.Color) Option + func WithLogo(img image.Image, opts ...LogoOption) Option + func WithMask(m int) Option + func WithModuleScale(s float64) Option + func WithModuleShape(s ModuleShape) Option + func WithModuleSize(px int) Option + func WithQuietZone(modules int) Option + func WithRecoveryLevel(l RecoveryLevel) Option + func WithSize(px int) Option + func WithTransparentBackground() Option + func WithVersion(v int) Option + func WithVersionRange(min, max int) Option + type QRCode struct + func New(content string, opts ...Option) (*QRCode, error) + func NewFromBytes(data []byte, opts ...Option) (*QRCode, error) + func (q *QRCode) Image() image.Image + func (q *QRCode) IsDark(x, y int) bool + func (q *QRCode) Mask() int + func (q *QRCode) Matrix() [][]bool + func (q *QRCode) PNG() ([]byte, error) + func (q *QRCode) RecoveryLevel() RecoveryLevel + func (q *QRCode) SVG() (string, error) + func (q *QRCode) Save(path string) error + func (q *QRCode) Size() int + func (q *QRCode) Version() int + func (q *QRCode) WritePNG(w io.Writer) error + func (q *QRCode) WriteSVG(w io.Writer) error + type RecoveryLevel int + const LevelHigh + const LevelLow + const LevelMedium + const LevelQuartile + func (l RecoveryLevel) String() string