hdm

package module
v0.0.0-...-d10f883 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHeader = []byte{0xD5, 0x80, 0xD4, 0xB4, 0xD5, 0x84, 0x00, 0x07}

Functions

func TripleDesDecrypt

func TripleDesDecrypt(data, key []byte) ([]byte, error)

func TripleDesEncrypt

func TripleDesEncrypt(data, key []byte) ([]byte, error)

Types

type Client

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

func New

func New(password string, addr string) *Client

func (*Client) PrintItemsReceipt

func (h *Client) PrintItemsReceipt(ctx context.Context, items map[string]*Item, prepaymentAmount float64) ([]byte, error)

func (*Client) PrintPrepaymentReceipt

func (h *Client) PrintPrepaymentReceipt(ctx context.Context, amount float64) ([]byte, error)

type Item

type Item struct {
	AdgCode     string  `json:"adgCode"`
	Dep         int     `json:"dep"`
	ProductCode string  `json:"productCode"`
	ProductName string  `json:"productName"`
	Qty         float64 `json:"qty"`
	Unit        string  `json:"unit"`
	Price       float64 `json:"price"`
}

func CreateItem

func CreateItem(productCode string, productName string, qty float64, price float64) *Item

Jump to

Keyboard shortcuts

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