func NewItemLog(e event.Event) EventLogger { return &itemLog{ ID: item.Identifier(e.SubID), EventID: e.ID, Num: e.Num, } }
func (e *Event) BuildItem() (item.Item, error) { if !e.IsItem() { return item.Item{}, errors.New("build error missmatch event " + string(e.ID)) } return item.ResolveItem(item.Identifier(e.SubID)), nil }