qr

package
v0.0.0-...-a52efcf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorInvalidRecoveryLevel = "invalid recovery level requested"
	ErrorInvalidSize          = "invalid size requested"
	ErrorNoContent            = "content can't be empty"
	ErrorContentTooLarge      = "content size too large"
	ErrorGenerate             = "unable to generate QR"
)

QR Service Error descriptions

View Source
const ServiceName = "qr"

ServiceName of this service.

Variables

View Source
var (
	ErrInvalidRecoveryLevel = errors.New(ErrorInvalidRecoveryLevel)
	ErrInvalidSize          = errors.New(ErrorInvalidSize)
	ErrNoContent            = errors.New(ErrorNoContent)
	ErrContentTooLarge      = errors.New(ErrorContentTooLarge)
	ErrGenerate             = errors.New(ErrorGenerate)
)

QR Service Errors

Functions

This section is empty.

Types

type RecoveryLevel

type RecoveryLevel int

RecoveryLevel : Error detection/recovery capacity. See: http://www.qrcode.com/en/about/error_correction.html

const (
	LevelL RecoveryLevel = iota // Level L: 7% error recovery.
	LevelM                      // Level M: 15% error recovery.
	LevelQ                      // Level Q: 25% error recovery.
	LevelH                      // Level H: 30% error recovery.
)

RecoveryLevel enum identifying QR Code Error Correction Capability

type Service

type Service interface {
	Generate(ctx context.Context, url string, level RecoveryLevel, size int) ([]byte, error)
}

Service describes our QR service.

Directories

Path Synopsis
pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL