You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
455 B

  1. package barcode
  2. import "image"
  3. // Contains some meta information about a barcode
  4. type Metadata struct {
  5. // the name of the barcode kind
  6. CodeKind string
  7. // contains 1 for 1D barcodes or 2 for 2D barcodes
  8. Dimensions byte
  9. }
  10. // a rendered and encoded barcode
  11. type Barcode interface {
  12. image.Image
  13. // returns some meta information about the barcode
  14. Metadata() Metadata
  15. // the data that was encoded in this barcode
  16. Content() string
  17. CheckSum() int
  18. }