handler

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRouteWith added in v1.8.0

func AddRouteWith(
	r *mux.Router,
	withHandlerConfig func(dependentHandler) handlerutil.WithParams,
) func(verb, path string, handler dependentHandler)

AddRouteWith makes it easier to define routes in main.go and avoids code repetition.

func CreateRelease added in v1.8.0

func CreateRelease(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params)

CreateRelease creates a release.

func DeleteRelease added in v1.8.0

func DeleteRelease(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params)

DeleteRelease deletes a release.

func GetRelease added in v1.8.0

func GetRelease(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params)

GetRelease returns a release.

func ListAllReleases

func ListAllReleases(cfg Config, w http.ResponseWriter, req *http.Request, _ handlerutil.Params)

ListAllReleases list all the releases available.

func ListReleases

func ListReleases(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params)

ListReleases list existing releases.

func OperateRelease added in v1.8.0

func OperateRelease(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params)

OperateRelease decides which method to call depending on the "action" query param.

func WithHandlerConfig added in v1.8.0

func WithHandlerConfig(storageForDriver agent.StorageForDriver, options Options) func(f dependentHandler) handlerutil.WithParams

WithHandlerConfig takes a dependentHandler and creates a regular (WithParams) handler that, for every request, will create a handler config for itself. Written in a curried fashion for convenient usage; see cmd/kubeops/main.go.

Types

type Config added in v1.8.0

type Config struct {
	ActionConfig *action.Configuration
	Options      Options
	ChartClient  chartUtils.Resolver
}

Config represents data needed by each handler to be able to create Helm 3 actions. It cannot be created without a bearer token, so a new one must be created upon each HTTP request.

type Options added in v1.8.0

type Options struct {
	ListLimit          int
	Timeout            int64
	UserAgent          string
	KubeappsNamespace  string
	AdditionalClusters kube.AdditionalClustersConfig
}

Options represents options that can be created without a bearer token, i.e. once at application startup.

Jump to

Keyboard shortcuts

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