bricklist

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright © 2022-2023 Oliver Götz <developer@geekgasm.eu>

Copyright © 2022-2023 Oliver Götz <developer@geekgasm.eu>

Copyright © 2022-2023 Oliver Götz <developer@geekgasm.eu>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintInventory

func PrintInventory(inventory Inventory)

func RenderSingleXML added in v0.7.0

func RenderSingleXML(inventory Inventory, multiline bool) string

func RenderXML

func RenderXML(inventory Inventory, multiline bool, chunkSize int) []string

Types

type Inventory

type Inventory struct {
	Items []Item `xml:"ITEM"`
}

func AddInventories

func AddInventories(inventory1 Inventory, inventory2 Inventory) Inventory

func IntersectInventories

func IntersectInventories(inventory1 Inventory, inventory2 Inventory) Inventory

func Multiply added in v0.6.0

func Multiply(inventory Inventory, factor int) Inventory

func ReadXmlList

func ReadXmlList(filename string) Inventory

func SubtractInventories

func SubtractInventories(inventory1 Inventory, inventory2 Inventory) Inventory

func UnionInventories

func UnionInventories(inventory1 Inventory, inventory2 Inventory) Inventory

type Item

type Item struct {
	ItemType  string `xml:"ITEMTYPE"`
	ItemID    string `xml:"ITEMID"`
	Color     string `xml:"COLOR"`
	Maxprice  string `xml:"MAXPRICE,omitempty"`
	MinQTY    int    `xml:"MINQTY"`
	Condition string `xml:"CONDITION,omitempty"`
	Remarks   string `xml:"REMARKS,omitempty"`
	Notify    string `xml:"NOTIFY,omitempty"`
}

type ItemKey

type ItemKey struct {
	ItemType string
	ItemID   string
	Color    string
}

type ItemMap

type ItemMap map[ItemKey]Item

Jump to

Keyboard shortcuts

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