item

package
v0.0.0-...-68ec1c9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToInt64

func ToInt64(n string) int64

func ToPrettyJSON

func ToPrettyJSON(o interface{}) string

Types

type Item

type Item struct {
	ID            string        `json:"id"`
	Name          string        `json:"name"`
	Status        Status        `json:"status"`
	Created       int64         `json:"created"`
	Updated       int64         `json:"updated"`
	CategoryID    int           `json:"category_id"`
	Price         int           `json:"price"`
	ItemCondition ItemCondition `json:"item_condition"`
	Attributes    []string      `json:"attributes"`
}

type ItemCondition

type ItemCondition int
const (
	ItemConditionLikeNew ItemCondition = iota + 1
	ItemConditionGood
	ItemConditionPoor
	ItemConditionOther
)

type ItemsBatch

type ItemsBatch struct {
	Size         int
	Total        int
	Items        []*Item
	ForEachBatch func(totalItems int, items []*Item) error
	ConvertIDs   map[string]int // key = UUID, value = int (attribute ID or option ID)
	// contains filtered or unexported fields
}

func (*ItemsBatch) Add

func (b *ItemsBatch) Add(rec, headers []string) error

func (*ItemsBatch) Flush

func (b *ItemsBatch) Flush() error

type Status

type Status int
const (
	StatusOnSale Status = iota + 1
	StatusTrading
	StatusSold
	StatusStopped
	StatusCancel
	StatusOther
)

Jump to

Keyboard shortcuts

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