handler

package
v0.0.0-...-9a43622 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChaosChartPath = os.Getenv("GOPATH") + "/src/github.com/litmuschaos/charthub.litmuschaos.io/app/client/public/chaos-charts/"

ChaosChartPath refers the location of the freshly updated repository

Functions

func FileHandler

func FileHandler(w http.ResponseWriter, r *http.Request)

FileHandler takes out the file paths from the query params respectives URLs

func GetAnalyticsData

func GetAnalyticsData(w http.ResponseWriter, r *http.Request)

GetAnalyticsData gets the data from GA instance

func GetChart

func GetChart(w http.ResponseWriter, r *http.Request)

GetChart is used to create YAML objects from experiments' directories from the respective charts'

func GetChartVersion

func GetChartVersion(w http.ResponseWriter, r *http.Request)

GetChartVersion will return the available version of chaos-chart

func GetCharts

func GetCharts(w http.ResponseWriter, r *http.Request)

GetCharts is used to create list of YAML objects from charts' directories

func GetCommunityAnalyticsData

func GetCommunityAnalyticsData(w http.ResponseWriter, r *http.Request)

GetCommunityAnalyticsData returns all the analytics data related to the community

func GetGithubRepoData

func GetGithubRepoData(w http.ResponseWriter, r *http.Request)

GetGithubRepoData will return the github repo data for litmus

func GetIconHandler

func GetIconHandler(w http.ResponseWriter, r *http.Request)

GetIconHandler takes the experiment group and icon file required and returns the specific icon 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"`
}

type Chart

type Chart struct {
	ApiVersion  string             `yaml:"apiVersion"`
	Kind        string             `yaml:"kind"`
	Metadata    Metadata           `yaml:"metadata"`
	Spec        Spec               `yaml:"spec"`
	PackageInfo PackageInformation `yaml:"packageInfo"`
	Experiments []Chart            `yaml:"experiments"`
}

type Charts

type Charts []Chart
type Link struct {
	Name string
	Url  string
}

type Maintainer

type Maintainer struct {
	Name  string
	Email string
}

type Metadata

type Metadata struct {
	Name        string     `yaml:"name"`
	Version     string     `yaml:"version"`
	Annotations Annotation `yaml:"annotations"`
}

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"`
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL