Documentation ¶
Index ¶
- Variables
- type Inventory
- func (self *Inventory) DisableAll()
- func (self *Inventory) EnableAll()
- func (self *Inventory) Get(name string) (*Stock, error)
- func (self *Inventory) Init(ctx context.Context, c *engine_config.Inventory, engine *engine.Engine) error
- func (self *Inventory) Iter(fun func(s *Stock))
- func (self *Inventory) MarshalBinary() ([]byte, error)
- func (self *Inventory) MustGet(f interface{ ... }, name string) *Stock
- func (self *Inventory) SetTele(src *tele_api.Inventory) (*tele_api.Inventory, error)
- func (self *Inventory) Tele() *tele_api.Inventory
- func (self *Inventory) UnmarshalBinary(b []byte) error
- func (self *Inventory) WithTuning(ctx context.Context, stockName string, adj float32) (context.Context, error)
- type State
- func (*State) Descriptor() ([]byte, []int)
- func (m *State) GetStocks() []*State_Stock
- func (*State) ProtoMessage()
- func (m *State) Reset()
- func (m *State) String() string
- func (m *State) XXX_DiscardUnknown()
- func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type State_Stock
- func (*State_Stock) Descriptor() ([]byte, []int)
- func (m *State_Stock) GetEnabled() bool
- func (m *State_Stock) GetName() string
- func (m *State_Stock) GetValue() float32
- func (*State_Stock) ProtoMessage()
- func (m *State_Stock) Reset()
- func (m *State_Stock) String() string
- func (m *State_Stock) XXX_DiscardUnknown()
- func (m *State_Stock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *State_Stock) XXX_Merge(src proto.Message)
- func (m *State_Stock) XXX_Size() int
- func (m *State_Stock) XXX_Unmarshal(b []byte) error
- type Stock
- func (s *Stock) Disable()
- func (s *Stock) Enable()
- func (s *Stock) Enabled() bool
- func (s *Stock) Has(v float32) bool
- func (s *Stock) Set(new float32)
- 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 ¶
func (*Inventory) DisableAll ¶
func (self *Inventory) DisableAll()
func (*Inventory) MarshalBinary ¶
func (*Inventory) UnmarshalBinary ¶
type State ¶
type State struct { Stocks []*State_Stock `protobuf:"bytes,1,rep,name=stocks,proto3" json:"stocks,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*State) Descriptor ¶
func (*State) GetStocks ¶
func (m *State) GetStocks() []*State_Stock
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) XXX_DiscardUnknown ¶
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶
func (*State) XXX_Unmarshal ¶
type State_Stock ¶
type State_Stock struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` Value float32 `protobuf:"fixed32,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*State_Stock) Descriptor ¶
func (*State_Stock) Descriptor() ([]byte, []int)
func (*State_Stock) GetEnabled ¶
func (m *State_Stock) GetEnabled() bool
func (*State_Stock) GetName ¶
func (m *State_Stock) GetName() string
func (*State_Stock) GetValue ¶
func (m *State_Stock) GetValue() float32
func (*State_Stock) ProtoMessage ¶
func (*State_Stock) ProtoMessage()
func (*State_Stock) Reset ¶
func (m *State_Stock) Reset()
func (*State_Stock) String ¶
func (m *State_Stock) String() string
func (*State_Stock) XXX_DiscardUnknown ¶
func (m *State_Stock) XXX_DiscardUnknown()
func (*State_Stock) XXX_Marshal ¶
func (m *State_Stock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*State_Stock) XXX_Merge ¶
func (dst *State_Stock) XXX_Merge(src proto.Message)
func (*State_Stock) XXX_Size ¶
func (m *State_Stock) XXX_Size() int
func (*State_Stock) XXX_Unmarshal ¶
func (m *State_Stock) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.