Documentation ¶
Index ¶
- Variables
- type Inventory
- func (inv *Inventory) Get(name string) (*Stock, error)
- func (inv *Inventory) Init(ctx context.Context, c *engine_config.Inventory, engine *engine.Engine, ...) error
- func (inv *Inventory) InventoryLoad()
- func (inv *Inventory) InventorySave() error
- func (inv *Inventory) Iter(fun func(s *Stock))
- func (inv *Inventory) SetTele(src *tele_api.Inventory) (*tele_api.Inventory, error)
- func (inv *Inventory) Tele() *tele_api.Inventory
- func (inv *Inventory) WithTuning(ctx context.Context, stockName string, adj float32) (context.Context, error)
- type Stock
- func (s *Stock) Enabled() bool
- func (s *Stock) Has(v float32) bool
- func (s *Stock) Set(v float32)
- func (s *Stock) SetLevel(v int)
- func (s *Stock) ShowLevel() string
- func (s *Stock) String() string
- func (s *Stock) TranslateHw(arg engine.Arg) float32
- func (s *Stock) TranslateSpend(arg engine.Arg) float32
- func (s *Stock) Value() float32
- func (s *Stock) Wrap(d engine.Doer) engine.Doer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStockLow = errors.New("Stock is too low")
)
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
func (*Inventory) InventoryLoad ¶ added in v0.220611.0
func (inv *Inventory) InventoryLoad()
func (*Inventory) InventorySave ¶ added in v0.220611.0
Click to show internal directories.
Click to hide internal directories.