Documentation ¶
Index ¶
- Constants
- Variables
- func NewComponent(ctx context.Context, typ string) (*wtype.Liquid, error)
- func NewContext(ctx context.Context, inv Inventory) context.Context
- func NewPlate(ctx context.Context, typ string) (*wtype.Plate, error)
- func NewTipbox(ctx context.Context, typ string) (*wtype.LHTipbox, error)
- func NewTipwaste(ctx context.Context, typ string) (*wtype.LHTipwaste, error)
- func XXXNewPlates(ctx context.Context) ([]*wtype.Plate, error)
- type Inventory
Constants ¶
View Source
const (
// WaterType is the component type of water
WaterType = "water"
)
Variables ¶
View Source
var ( // ErrUnknownType is returned if type is not in inventory ErrUnknownType = errors.New("unknown type requested from inventory") )
Functions ¶
func NewComponent ¶
NewComponent returns a new component of the given type
func NewContext ¶
NewContext returns a context with the given inventory
func NewTipwaste ¶
NewTipwaste returns a new tipwaste of the given type
Types ¶
type Inventory ¶
type Inventory interface { NewComponent(ctx context.Context, typ string) (*wtype.Liquid, error) NewPlate(ctx context.Context, typ string) (*wtype.Plate, error) NewTipwaste(ctx context.Context, typ string) (*wtype.LHTipwaste, error) NewTipbox(ctx context.Context, typ string) (*wtype.LHTipbox, error) }
An Inventory returns items by name
func GetInventory ¶
GetInventory returns an Inventory instance from Context
Click to show internal directories.
Click to hide internal directories.