qr

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "qr"

Name holds the name of the Format.

Variables

This section is empty.

Functions

func ChunkSize

func ChunkSize(capacity int, size int64) int

ChunkSize returns the number of bytes fitting into a single qr code image.

func NewWriter

func NewWriter(in input.Input, x byte) io.WriteCloser

NewWriter returns a qr code format writer instance.

func NumChunks

func NumChunks(capacity int, size int64) int

NumChunks returns the number of images required to encode the data.

Types

type Format

type Format struct {
	// contains filtered or unexported fields
}

Format represents the raw type format.

func New

func New(input input.Input) *Format

New creates a new Format of type raw.

func (*Format) Name

func (f *Format) Name() string

Name returns the formats name.

func (*Format) OutputFileName

func (f *Format) OutputFileName(x byte) string

OutputFileName returns the file name for the given x.

func (*Format) Reader

func (f *Format) Reader(r io.Reader) (io.Reader, error)

Reader creates a new Format reader using the given reader as input.

func (*Format) Writer

func (f *Format) Writer(x byte) (io.Writer, []io.Closer, error)

Writer creates a new QR code format writer for the part identified by x.

Jump to

Keyboard shortcuts

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