Versions in this module Expand all Collapse all v2 v2.0.0 Apr 27, 2026 Changes in this version + func BoolP(v bool) *bool + func ContextWithQR(ctx context.Context, client Client) context.Context + func DefaultModuleStyle() *renderer.ModuleStyle + func DurationP(v time.Duration) *time.Duration + func Float64P(v float64) *float64 + func GetRenderer(f Format) (renderer.Renderer, error) + func IntP(v int) *int + func NewBase64Renderer() *renderer.Base64Renderer + func NewPDFRenderer() *renderer.PDFRenderer + func NewPNGRenderer() *renderer.PNGRenderer + func NewSVGRenderer() *renderer.SVGRenderer + func NewTerminalRenderer() *renderer.TerminalRenderer + func Quick(data string, size ...int) ([]byte, error) + func QuickContact(firstName, lastName, phone, email string, size ...int) ([]byte, error) + func QuickEmail(to, subject, body string, size ...int) ([]byte, error) + func QuickEvent(title, location string, start, end time.Time, size ...int) ([]byte, error) + func QuickFile(data, path string, size ...int) error + func QuickGeo(lat, lng float64, size ...int) ([]byte, error) + func QuickPayment(username, amount string, size ...int) ([]byte, error) + func QuickSMS(phone, message string, size ...int) ([]byte, error) + func QuickSVG(data string, size ...int) (string, error) + func QuickURL(url string, size ...int) ([]byte, error) + func QuickWiFi(ssid, password, encryption string, size ...int) ([]byte, error) + func StringP(v string) *string + func ValidatePatch(patch *ConfigPatch) error + type Builder struct + func NewBuilder() *Builder + func (b *Builder) AutoSize(auto bool) *Builder + func (b *Builder) BackgroundColor(color string) *Builder + func (b *Builder) Build() (Client, error) + func (b *Builder) Clone() *Builder + func (b *Builder) ErrorCorrection(level ECLevel) *Builder + func (b *Builder) ForegroundColor(color string) *Builder + func (b *Builder) Format(f Format) *Builder + func (b *Builder) Logo(source string, sizeRatio float64) *Builder + func (b *Builder) LogoOverlay(enabled bool) *Builder + func (b *Builder) LogoTint(color string) *Builder + func (b *Builder) Margin(margin int) *Builder + func (b *Builder) MaskPattern(pattern int) *Builder + func (b *Builder) MaxVersion(v int) *Builder + func (b *Builder) MinVersion(v int) *Builder + func (b *Builder) MustBuild() Client + func (b *Builder) Options(opts ...Option) *Builder + func (b *Builder) Prefix(prefix string) *Builder + func (b *Builder) QueueSize(n int) *Builder + func (b *Builder) Quick(data string, size ...int) ([]byte, error) + func (b *Builder) QuickContact(firstName, lastName, phone, email string, size ...int) ([]byte, error) + func (b *Builder) QuickEmail(to, subject, body string, size ...int) ([]byte, error) + func (b *Builder) QuickEvent(title, location string, start, end time.Time, size ...int) ([]byte, error) + func (b *Builder) QuickFile(data, path string, size ...int) error + func (b *Builder) QuickGeo(lat, lng float64, size ...int) ([]byte, error) + func (b *Builder) QuickPayment(username, amount string, size ...int) ([]byte, error) + func (b *Builder) QuickSMS(phone, message string, size ...int) ([]byte, error) + func (b *Builder) QuickSVG(data string, size ...int) (string, error) + func (b *Builder) QuickURL(url string, size ...int) ([]byte, error) + func (b *Builder) QuickWiFi(ssid, password, encryption string, size ...int) ([]byte, error) + func (b *Builder) Size(size int) *Builder + func (b *Builder) Version(v int) *Builder + func (b *Builder) WorkerCount(n int) *Builder + type Client interface + Batch func(ctx context.Context, payloads []payload.Payload, opts ...Option) ([]*encoding.QRCode, error) + Close func() error + Closed func() bool + Generate func(ctx context.Context, p payload.Payload) (*encoding.QRCode, error) + GenerateToWriter func(ctx context.Context, p payload.Payload, w io.Writer, format Format) error + GenerateWithOptions func(ctx context.Context, p payload.Payload, opts ...Option) (*encoding.QRCode, error) + Render func(ctx context.Context, p payload.Payload, format Format) ([]byte, error) + Save func(ctx context.Context, p payload.Payload, path string) error + SetOptions func(opts ...Option) error + func MustNew(opts ...Option) Client + func MustNewClient(opts ...Option) Client + func New(opts ...Option) (Client, error) + func NewClient(opts ...Option) (Client, error) + func QRFromContext(ctx context.Context) (Client, bool) + type Config struct + AutoSize bool + BackgroundColor string + DefaultECLevel string + DefaultFormat string + DefaultSize int + DefaultVersion int + ForegroundColor string + LogoOverlay bool + LogoSizeRatio float64 + LogoSource string + LogoTint string + MaskPattern int + MaxVersion int + MinVersion int + Prefix string + QueueSize int + QuietZone int + SlowOperation time.Duration + WorkerCount int + func ApplyPatch(base *Config, patch *ConfigPatch) *Config + func (c *Config) Clone() *Config + func (c *Config) Validate() error + type ConfigPatch struct + AutoSize *bool + BackgroundColor *string + DefaultECLevel *string + DefaultFormat *string + DefaultSize *int + DefaultVersion *int + ForegroundColor *string + LogoOverlay *bool + LogoSizeRatio *float64 + LogoSource *string + LogoTint *string + MaskPattern *int + MaxVersion *int + MinVersion *int + Prefix *string + QueueSize *int + QuietZone *int + SlowOperation *time.Duration + WorkerCount *int + func ConfigToPatch(c *Config) ConfigPatch + type ECLevel int + const LevelH + const LevelL + const LevelM + const LevelQ + func (l ECLevel) String() string + type Format int + const FormatBase64 + const FormatPDF + const FormatPNG + const FormatSVG + const FormatTerminal + func FormatFromPath(path string) Format + func (f Format) Extension() string + func (f Format) String() string + type ModuleStyle = renderer.ModuleStyle + type Option func(*Config) + func WithAutoSize(auto bool) Option + func WithBackgroundColor(color string) Option + func WithDefaultFormat(f Format) Option + func WithDefaultSize(size int) Option + func WithErrorCorrection(level ECLevel) Option + func WithForegroundColor(color string) Option + func WithLogo(logoSource string, sizeRatio float64) Option + func WithLogoOverlay(enabled bool) Option + func WithLogoTint(color string) Option + func WithMaskPattern(pattern int) Option + func WithMaxVersion(v int) Option + func WithMinVersion(v int) Option + func WithPrefix(prefix string) Option + func WithQueueSize(n int) Option + func WithQuietZone(zone int) Option + func WithSlowOperation(d time.Duration) Option + func WithVersion(v int) Option + func WithWorkerCount(n int) Option + type RenderOption = renderer.RenderOption + func WithCircleModules() RenderOption + func WithGradient(startColor, endColor string, angle float64) RenderOption + func WithModuleStyle(style *renderer.ModuleStyle) RenderOption + func WithRoundedModules(roundness float64) RenderOption + func WithTransparency(alpha float64) RenderOption Other modules containing this package github.com/os-gomod/qrcode