Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLiquid ¶
func GetLiquid(i Ingredient) *liquid.Liquid
GetLiquid gets the liquid of this Ingredient
func GetStill ¶
func GetStill(i Ingredient) component.Still
GetStill returns the still of the distillery associated with the provided ingredient.
func Init ¶
func Init(ingredient Ingredient, liquid *liquid.Liquid)
Init initializes a new Ingredient. Init is only intended to be used within a lifetime.Lifetime[Ingredient,*Liquid].
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base is embedded into every Ingredient
type FetcherFlags ¶
FetcherFlags describes options for a WissKIFetcher
type Ingredient ¶
type Ingredient interface { // Name returns the name of this ingredient // Name should be implemented by the [Base] struct. Name() string // contains filtered or unexported methods }
Ingredients represent a part of a WissKI instance. An Ingredient should be implemented as a pointer to a struct. Every ingredient must embed Base and should be initialized using Init inside a [lifetime.Lifetime].
By convention these are defined within their corresponding subpackage. This subpackage also contains all required resources.
type WissKIFetcher ¶
type WissKIFetcher interface { Ingredient // Fetch fetches information from this ingredient and writes it into target. // Distinct WissKIFetchers must write into distinct fields. Fetch(flags FetcherFlags, target *status.WissKI) error }