item

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller consists instance for a type of data

func New

func New() *Controller

New creates a new Controller with its corresponding utils.Cache

func (*Controller) Content

func (c *Controller) Content() []*Item

Content returns the content from its cache

func (*Controller) Item

func (c *Controller) Item(itemID string) (result *Item)

Item returns the Item found with specified itemID

func (*Controller) Status

func (c *Controller) Status(_ string) *status.Status

Status gives status.Status of current controller with the cache status

type Item

type Item struct {
	ItemID      string            `json:"itemId,omitempty"`
	NameI18N    map[string]string `json:"name_i18n,omitempty"`
	Existence   models.Existence  `json:"existence"`
	SpriteCoord []int             `json:"spriteCoord,omitempty"`
}

Item specifies data structure for the item data type

func (Item) MarshalJSON added in v1.1.0

func (i Item) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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