Documentation ¶
Index ¶
- func CopyZipItems(file *zip.File, extractPath string, chartsPath string) error
- func DownloadRemoteHub(hubDetails model.CreateRemoteChaosHub) error
- func GetCSVData(request model.ExperimentRequest) string
- func GetChartsData(ChartsPath string) ([]*model.Chart, error)
- func GetChartsPath(chartsInput model.CloningInput) string
- func GetExperimentData(experimentFilePath string) (*model.Chart, error)
- func GetExperimentYAMLPath(request model.ExperimentRequest) string
- func GetPredefinedExperimentManifest(request model.ExperimentRequest) string
- func IsFileExisting(path string) (bool, error)
- func ListPredefinedWorkflowDetails(hubName string, projectID string) ([]*model.PredefinedWorkflowList, error)
- func ReadExperimentYAMLFile(path string) (string, error)
- func SyncRemoteRepo(hubData model.CloningInput) error
- func UnzipRemoteHub(zipPath string, hubDetails model.CreateRemoteChaosHub) error
- type Annotation
- type ChaosChart
- type Link
- type Maintainer
- type Metadata
- type PackageInformation
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyZipItems ¶
CopyZipItems is used to copy the content from the extracted zip file to the ChaosHub directory
func DownloadRemoteHub ¶
func DownloadRemoteHub(hubDetails model.CreateRemoteChaosHub) error
DownloadRemoteHub is used to download a remote hub from the url provided by the user
func GetCSVData ¶
func GetCSVData(request model.ExperimentRequest) string
GetCSVData returns the ChartServiceYAML details according to the given filetype
func GetChartsData ¶
GetChartsData is used to get details of charts like experiments.
func GetChartsPath ¶
func GetChartsPath(chartsInput model.CloningInput) string
GetChartsPath is used to construct path for given chart.
func GetExperimentData ¶
GetExperimentData is used for getting details of selected Experiment path
func GetExperimentYAMLPath ¶
func GetExperimentYAMLPath(request model.ExperimentRequest) string
GetExperimentYAMLPath is used to construct path for given experiment/engine.
func GetPredefinedExperimentManifest ¶
func GetPredefinedExperimentManifest(request model.ExperimentRequest) string
GetPredefinedExperimentManifest is used to construct path for given chartsversion.yaml.
func IsFileExisting ¶
func ListPredefinedWorkflowDetails ¶
func ListPredefinedWorkflowDetails(hubName string, projectID string) ([]*model.PredefinedWorkflowList, error)
ListPredefinedWorkflowDetails reads the workflow directory for all the predefined experiments and returns the csv, workflow manifest and workflow name
func ReadExperimentYAMLFile ¶
ReadExperimentYAMLFile is used for reading experiment/engine file from given path
func SyncRemoteRepo ¶
func SyncRemoteRepo(hubData model.CloningInput) error
SyncRemoteRepo is used to sync the remote ChaosHub
func UnzipRemoteHub ¶
func UnzipRemoteHub(zipPath string, hubDetails model.CreateRemoteChaosHub) error
UnzipRemoteHub is used to unzip the zip file
Types ¶
type Annotation ¶
type Annotation struct { Categories string `yaml:"categories"` Vendor string `yaml:"vendor"` CreatedAt string `yaml:"createdAt"` Repository string `yaml:"repository"` Support string `yaml:"support"` ChartDescription string `yaml:"chartDescription"` }
Annotation ...
type ChaosChart ¶
type ChaosChart struct { APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata Metadata `yaml:"metadata"` Spec Spec `yaml:"spec"` PackageInfo PackageInformation `yaml:"packageInfo"` }
ChaosChart ...
func ReadExperimentFile ¶
func ReadExperimentFile(path string) (ChaosChart, error)
ReadExperimentFile is used for reading experiment file from given path
type Metadata ¶
type Metadata struct { Name string `yaml:"name"` Version string `yaml:"version"` Annotations Annotation `yaml:"annotations"` }
Metadata ...
type PackageInformation ¶
type PackageInformation struct { PackageName string `yaml:"packageName"` Experiments []struct { Name string `yaml:"name"` CSV string `yaml:"CSV"` Desc string `yaml:"desc"` } `yaml:"experiments"` }
PackageInformation ...
type Spec ¶
type Spec struct { DisplayName string `yaml:"displayName"` CategoryDescription string `yaml:"categoryDescription"` Keywords []string `yaml:"keywords"` Maturity string `yaml:"maturity"` Maintainers []Maintainer `yaml:"maintainers"` MinKubeVersion string `yaml:"minKubeVersion"` Provider struct { Name string `yaml:"name"` } `yaml:"provider"` Links []Link `yaml:"links"` Experiments []string `yaml:"experiments"` ChaosExpCRDLink string `yaml:"chaosexpcrdlink"` Platforms []string `yaml:"platforms"` ChaosType string `yaml:"chaosType"` }
Spec ...