Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteArrayWriteCloser ¶
type ByteArrayWriteCloser struct {
// contains filtered or unexported fields
}
ByteArrayWriteCloser is a wrapper around a byte array that satisfies the io.WriteCloser interface.
func NewByteArrayWriteCloser ¶
func NewByteArrayWriteCloser() *ByteArrayWriteCloser
NewByteArrayWriteCloser creates a new ByteArrayWriteCloser with the provided byte array.
func (*ByteArrayWriteCloser) Bytes ¶
func (b *ByteArrayWriteCloser) Bytes() []byte
Bytes returns the underlying byte array.
func (*ByteArrayWriteCloser) Close ¶
func (b *ByteArrayWriteCloser) Close() error
Close closes the underlying byte array.
type ProductInfo ¶
ProductInfo represents a product
func (ProductInfo) Content ¶
func (p ProductInfo) Content() (string, error)
Content returns the value from ProductInfo for which qrcode will be generated
type QRCode ¶
type QRCode interface { Create(product ProductInfo) (QRResult, error) CreateN(product []ProductInfo) ([]QRResult, error) CreateWithWriter(product ProductInfo, writer io.WriteCloser) error }
QRCode specifies the contraints related to qrcode generation
type QRConfig ¶
type QRConfig struct { // Validates logo size as follows Width >= 2*logoWidth && qrHeight >= 2*logoHeight // Instead of default expression Width >= 5*logoWidth && qrHeight >= 5*logoHeight LogoPath string BgHexColor string FgHexColor string Width int Shape ShapeType }
QRConfig represnts the configuration to generate a QR Code
type QRResult ¶
type QRResult struct { ProductInfo ProductInfo QRCode []byte }
QRResult represent the result with qrcode
Click to show internal directories.
Click to hide internal directories.