Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GardenMapModel ¶
type GardenMapModel struct { Plants map[string]PlantModel `json:"plants" yaml:"plants"` Zones map[string]ZoneModel `json:"zones" yaml:"zones"` }
GardenMapModel ...
func CreateGardenMapModelFromYMLFile ¶
func CreateGardenMapModelFromYMLFile(pth string) (GardenMapModel, error)
CreateGardenMapModelFromYMLFile ...
func LoadGardenMap ¶
func LoadGardenMap(gardenDirPath string) (GardenMapModel, string, error)
LoadGardenMap ..
gardenDirPath is optional, if provided will be used as the Garden Dir path if not provided the standard .garden dir paths will be checked
func (GardenMapModel) CollectAllVarsForPlant ¶
func (gardenMap GardenMapModel) CollectAllVarsForPlant(plantID string) (PlantVarsMap, error)
CollectAllVarsForPlant ...
collects all the Vars for a plant, including the ones defined for the plant's zones
In case a variable is defined in multiple Zones or in a Zone and in the Plant
as well: Plant's Vars will always be the #1 priority, no matter whether it's also defined in a Zone or not. In case of different Zones, the last one in the Plant's Zones list will be the one which's Var will be used, it'll overwrite other zones' previously defined Vars for the same key.
func (GardenMapModel) FilteredPlants ¶
func (gardenMap GardenMapModel) FilteredPlants(plantID, zone string) PlantsMap
FilteredPlants ...
func (GardenMapModel) FilteredPlantsIDs ¶
func (gardenMap GardenMapModel) FilteredPlantsIDs(plantID, zone string) []string
FilteredPlantsIDs ...
type PlantModel ¶
type PlantModel struct { Path string `json:"path" yaml:"path"` Seed string `json:"seed" yaml:"seed"` Vars PlantVarsMap `json:"vars" yaml:"vars"` Zones []string `json:"zones" yaml:"zones"` }
PlantModel ...
func (PlantModel) ExpandedPath ¶
func (plant PlantModel) ExpandedPath(plantID string) string
ExpandedPath ...
Click to show internal directories.
Click to hide internal directories.