Documentation ¶
Overview ¶
Package scenario is a package for loading scenario manifests from a `scenarios.yaml` file and accessing and manipulating them programmatically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶
type Manifest struct { // Name - the name of the manifest e.g. scenarios Name string `yaml:"name"` // Kind - unique name and version string idenitfying the schema of this // document Kind string `yaml:"kind"` // Scenarios - a list of Scenario structs representing the scenarios Scenarios []Scenario `yaml:"scenarios"` }
Manifest structure representing a `scenarios.yaml` document
func LoadManifest ¶
LoadManifest loads a manifest named `scenarios.yaml` from the supplied path
type Scenario ¶
type Scenario struct { // A machine parseable unique id for the scenario Id string `yaml:"id"` // Path to the scenario - paths are relative to the ScenarioManifest that // defines this scenario Path string `yaml:"path"` // A human-friendly readable name for this scenario for use in user interfaces DisplayName string `yaml:"name"` // A Difficulty level for this scenario for use in user interfaces Difficulty string `yaml:"difficulty"` // A short description of the scenario to be used in the user interfaces Description string `yaml:"description"` // The category of the scenario to be used in the user interfaces Category string `yaml:"category"` }
Scenario structure representing a scenario
Click to show internal directories.
Click to hide internal directories.