handler

package
v0.0.1-alpha4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyResource

func ApplyResource(c echo.Context) error

ApplyResource handles the request to apply a Kubernetes resource.

func CreateOrUpdateCattleHelmChart

func CreateOrUpdateCattleHelmChart(c echo.Context) error

CreateOrUpdateCattleHelmChart creates or updates a CattleHelmChart in a namespace

func DeleteCattleHelmChart

func DeleteCattleHelmChart(c echo.Context) error

DeleteCattleHelmChart deletes a CattleHelmChart in a namespace

func DeleteResource

func DeleteResource(c echo.Context) error

DeleteResource handles the request to delete a Kubernetes resource.

func GetCattleHelmChart

func GetCattleHelmChart(c echo.Context) error

GetCattleHelmChart gets a CattleHelmChart in a namespace

func GetChartReleaseRevisions

func GetChartReleaseRevisions(c echo.Context) error

func GetHelmChartRelease

func GetHelmChartRelease(c echo.Context) error

GetHelmChartRelease returns the Helm chart release

func GetHelmChartReleaseWithWorkloads

func GetHelmChartReleaseWithWorkloads(c echo.Context) error

GetHelmChartReleaseWithWorkloads returns the Helm chart release with workloads

func GetHelmRepoChartSpec

func GetHelmRepoChartSpec(c echo.Context) error

GetHelmRepoChartSpec returns the chart data for a Helm chart

func GetHelmRepoIndex

func GetHelmRepoIndex(c echo.Context) error

GetHelmRepoIndex returns the index.yaml for a Helm repository

func GetNamespaces

func GetNamespaces(c echo.Context) error

GetNamespaces handles the request to get a list of Kubernetes namespaces.

func GetResources

func GetResources(c echo.Context) error

GetResources handles the request to retrieve Kubernetes resources.

func K3sInstall

func K3sInstall(c echo.Context) error

K3sInstall installs K3s

func K3sJoin

func K3sJoin(c echo.Context) error

K3sJoin joins a node to a K3s cluster

func K3sStableVersions

func K3sStableVersions(c echo.Context) error

K3sStableVersions lists K3s stable versions

func K3sUninstall

func K3sUninstall(c echo.Context) error

K3sUninstall uninstalls K3s

func ListAPIResources

func ListAPIResources(c echo.Context) error

ListApiResources handles the request to list API resources in the Kubernetes cluster.

func ListCattleHelmCharts

func ListCattleHelmCharts(c echo.Context) error

ListCattleHelmCharts lists all CattleHelmCharts in all namespaces

func ListClusters

func ListClusters(c echo.Context) error

ListClusters lists K3s clusters

func ListHelmChartReleases

func ListHelmChartReleases(c echo.Context) error

ListHelmChartReleases returns the list of Helm chart releases

func ListHelmRepos

func ListHelmRepos(c echo.Context) error

ListHelmRepos returns the list of Helm repositories

func ListNodes

func ListNodes(c echo.Context) error

ListNodes lists K3s nodes in a cluster

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache is a struct to hold the cached data

type ChartVersion

type ChartVersion struct {
	Version string   `yaml:"version"`
	URLs    []string `yaml:"urls"`
}

ChartVersion represents a Helm chart version

type EchoOutputHandler

type EchoOutputHandler struct {
	// contains filtered or unexported fields
}

EchoOutputHandler is a struct to handle the output from SSH

func (EchoOutputHandler) Flush

func (e EchoOutputHandler) Flush()

Flush method to ensure all data is sent

func (EchoOutputHandler) Write

func (e EchoOutputHandler) Write(p []byte) (n int, err error)

Write method to write the output

type HelmIndex

type HelmIndex struct {
	Entries map[string][]ChartVersion `yaml:"entries"`
}

HelmIndex represents a Helm repository index

type K3sInstallRequest

type K3sInstallRequest struct {
	SSHClient          *ssh.Client `json:"ssh" validate:"required"`
	TLSSAN             string      `json:"tls_san,omitempty" validate:"omitempty,hostname"`
	K3sArgs            string      `json:"k3s_args,omitempty"`
	Version            string      `json:"version,omitempty"`
	Cluster            bool        `json:"cluster,omitempty"`
	DownloadKubeconfig bool        `json:"KUBECONFIG,omitempty"`
}

K3sInstallRequest is the request payload for K3s install

type K3sJoinRequest

type K3sJoinRequest struct {
	SSHClient *ssh.Client `json:"ssh" validate:"required"`
	Server    string      `json:"server,omitempty"`
	Token     string      `json:"token,omitempty"`
	Master    bool        `json:"master,omitempty"`
}

type K3sUninstallRequest

type K3sUninstallRequest struct {
	SSHClient *ssh.Client `json:"ssh" validate:"required"`
	Agent     bool        `json:"agent,omitempty"`
}

K3sUninstallRequest is the request payload for K3s uninstall

Jump to

Keyboard shortcuts

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