pricify

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

Data parsed from the source

func New

func New(ctx context.Context, uriOverride ...string) (*Data, error)

New price data, always returns cache (if available) on error

func (*Data) Calculate

func (d *Data) Calculate(input map[string]string) int

Calculate total price based on the input

func (*Data) CalculateVerbose

func (d *Data) CalculateVerbose(input map[string]string) (total int, verbose map[string]*Item)

CalculateVerbose calculates total price and provides details about each found item

func (*Data) Items

func (d *Data) Items() []*Item

Items returns clone of all items in the Data

type Item

type Item struct {
	ID                 string
	VID                int64
	InventoryID        string
	Name               string
	Description        string
	Help               string
	Value              string
	Price              int
	SectionID          string
	SectionVID         int64
	SectionName        string
	SectionDescription string
	SectionHelp        string
	SectionPrice       int
	Regions            []string
	Archived           bool
}

Item is specific item parsed from the source

func (*Item) Clone

func (i *Item) Clone() *Item

Clone creates a copy of the item

Jump to

Keyboard shortcuts

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