Documentation ¶
Index ¶
- Constants
- func ChaosHubIconHandler() gin.HandlerFunc
- func CopyZipItems(file *zip.File, extractPath string, chartsPath string) error
- func DefaultChaosHubIconHandler() gin.HandlerFunc
- func DownloadRemoteHub(hubDetails model.CreateRemoteChaosHub, projectID string) error
- func GetChartsData(ChartsPath string) ([]*model.Chart, error)
- func GetChartsPath(chartsInput model.CloningInput, projectID string, isDefault bool) string
- func GetExperimentData(experimentFilePath string) (*model.Chart, error)
- func IsFileExisting(path string) (bool, error)
- func ListPredefinedWorkflowDetails(name string, projectID string) ([]*model.PredefinedExperimentList, error)
- func ReadExperimentYAMLFile(path string) (string, error)
- func SyncRemoteRepo(hubData model.CloningInput, projectID string) error
- func UnzipRemoteHub(zipPath string, hubDetails model.CreateRemoteChaosHub, projectID string) error
- func ValidateLocalRepository(hub chaos_hub.ChaosHub) (bool, error)
- type Annotation
- type ChaosChart
- type ChaosCharts
- type ExecutionPlaneDetails
- type Faults
- type Link
- type Maintainer
- type Metadata
- type PackageInformation
- type Spec
Constants ¶
const DefaultPath = "/tmp/"
Variables ¶
This section is empty.
Functions ¶
func ChaosHubIconHandler ¶
func ChaosHubIconHandler() gin.HandlerFunc
ChaosHubIconHandler is used for fetching ChaosHub icons
func CopyZipItems ¶
CopyZipItems is used to copy the content from the extracted zip file to the ChaosHub directory
func DefaultChaosHubIconHandler ¶
func DefaultChaosHubIconHandler() gin.HandlerFunc
func DownloadRemoteHub ¶
func DownloadRemoteHub(hubDetails model.CreateRemoteChaosHub, projectID string) error
DownloadRemoteHub is used to download a remote hub from the url provided by the user
func GetChartsData ¶
GetChartsData is used to get details of charts like experiments.
func GetChartsPath ¶
func GetChartsPath(chartsInput model.CloningInput, projectID string, isDefault bool) string
GetChartsPath is used to construct path for given chart.
func GetExperimentData ¶
GetExperimentData is used for getting details of selected Experiment path
func IsFileExisting ¶
func ListPredefinedWorkflowDetails ¶
func ListPredefinedWorkflowDetails(name string, projectID string) ([]*model.PredefinedExperimentList, 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, projectID string) error
SyncRemoteRepo is used to sync the remote ChaosHub
func UnzipRemoteHub ¶
func UnzipRemoteHub(zipPath string, hubDetails model.CreateRemoteChaosHub, projectID string) error
UnzipRemoteHub is used to unzip the zip file
Types ¶
type Annotation ¶
type Annotation struct { Categories string `yaml:"categories" json:"categories"` Vendor string `yaml:"vendor" json:"vendor"` CreatedAt string `yaml:"createdAt" json:"createdAt"` Repository string `yaml:"repository" json:"repository"` Support string `yaml:"support" json:"support"` ChartDescription string `yaml:"chartDescription" json:"chartDescription"` }
type ChaosChart ¶
type ChaosChart struct { APIVersion string `yaml:"apiVersion" json:"apiVersion"` Kind string `yaml:"kind" json:"kind"` Metadata Metadata `yaml:"metadata" json:"metadata"` Spec Spec `yaml:"spec" json:"spec"` PackageInfo PackageInformation `yaml:"packageInfo" json:"packageInfo"` }
func ReadExperimentFile ¶
func ReadExperimentFile(path string) (ChaosChart, error)
ReadExperimentFile is used for reading experiment file from given path
type ChaosCharts ¶
type ChaosCharts []ChaosChart
type ExecutionPlaneDetails ¶
type Maintainer ¶
type Metadata ¶
type Metadata struct { Name string `yaml:"name" json:"name"` Version string `yaml:"version" json:"version,omitempty"` Annotations Annotation `yaml:"annotations" json:"annotations,omitempty"` }
type PackageInformation ¶
type Spec ¶
type Spec struct { DisplayName string `yaml:"displayName" json:"displayName"` CategoryDescription string `yaml:"categoryDescription" json:"categoryDescription"` Plan []string `json:"plan" json:"plan"` Keywords []string `yaml:"keywords" json:"keywords"` Maturity string `yaml:"maturity" json:"maturity,omitempty"` Maintainers []Maintainer `yaml:"maintainers" json:"maintainers,omitempty"` MinKubeVersion string `yaml:"minKubeVersion" json:"minKubeVersion,omitempty"` Scenarios []string `yaml:"scenarios" json:"scenarios"` Provider struct { Name string `yaml:"name" json:"name"` } `yaml:"provider" json:"provider"` Links []Link `yaml:"links" json:"links,omitempty"` Experiments []string `yaml:"experiments" json:"experiments"` Faults []Faults `yaml:"faults" json:"faults"` ChaosExpCRDLink string `yaml:"chaosexpcrdlink" json:"chaosexpcrdlink,omitempty"` Platforms []string `yaml:"platforms" json:"platforms,omitempty"` ChaosType string `yaml:"chaosType" json:"chaosType,omitempty"` }