itemupgrader

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSchema

func RegisterSchema(r io.Reader) error

RegisterSchema attempts to decode and parse a schema from the provided file reader. The file must follow the correct specification otherwise an error will be returned.

Types

type Item

type Item interface {
	// contains filtered or unexported methods
}

Item holds the data that identifies an item. It is implemented by ItemMeta.

type ItemMeta

type ItemMeta struct {
	Name string
	Meta int16
}

ItemMeta holds the name and meta values of an item.

func Upgrade

func Upgrade(b Item) ItemMeta

Upgrade upgrades the given item using the registered item upgrade schemas. If an Item has not been changed through several versions, Upgrade will simply return the original value. Calling itemupgrader.Upgrade is therefore safe regardless of whether the item is already up-to-date or not.

Jump to

Keyboard shortcuts

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