Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ Scheme: "bitcoin", Level: M, }
DefaultConfig contains the default config values used by the package-level functions. You can override these values, or create a custom *Config (safer).
View Source
var ( // ErrNegativeAmount is returned when amount is negative ErrNegativeAmount = errors.New("amount can not be negative") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Scheme is the scheme name/urn used in the URI. // When empty, "bitcoin" will be used. Scheme string // Level denotes a QR error correction level. // For more information see the Level type and constants. Level Level // Debug logger Logger *log.Logger }
Config allows the user of this package
type Level ¶
type Level int
A Level denotes a QR error correction level. From least to most tolerant of errors, they are L, M, Q, H.
type Request ¶
type Request struct { // Config used to generate the QR code // When empty, DefaultConfig is used. Config *Config // Address to which the coins should be sent // The address is assumed to be a valid and correct bitcoin address Address string // Amount as float64 (optional) // When left empty (zero), it will not be encoded into the QR code Amount float64 // Label for the address (optional) // When left emtpy, it will not be encoded into the QR code Label string // Optional message string to be shown to the sender Message string // Optional parameters to be encoded in the URI Params map[string]string }
Request to be encoded to QR code
Click to show internal directories.
Click to hide internal directories.