forked from mittwald/go-helm-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface.go
32 lines (28 loc) · 1.27 KB
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package helmclient
import (
"context"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/release"
"helm.sh/helm/v3/pkg/repo"
)
//go:generate mockgen -source=interface.go -package mockhelmclient -destination=./mock/interface.go -self_package=. Client
// Client holds the method signatures for a Helm client.
// NOTE: This is an interface to allow for mocking in tests.
type Client interface {
AddOrUpdateChartRepo(entry repo.Entry) error
UpdateChartRepos() error
InstallOrUpgradeChart(ctx context.Context, spec *ChartSpec) (*release.Release, error)
InstallChart(ctx context.Context, spec *ChartSpec) (*release.Release, error)
UpgradeChart(ctx context.Context, spec *ChartSpec) (*release.Release, error)
ListDeployedReleases() ([]*release.Release, error)
ListReleasesByStateMask(action.ListStates) ([]*release.Release, error)
GetRelease(name string) (*release.Release, error)
RollbackRelease(spec *ChartSpec, version int) error
GetReleaseValues(name string, allValues bool) (map[string]interface{}, error)
UninstallRelease(spec *ChartSpec) error
UninstallReleaseByName(name string) error
TemplateChart(spec *ChartSpec) ([]byte, error)
LintChart(spec *ChartSpec) error
SetDebugLog(debugLog action.DebugLog)
ListReleaseHistory(name string, max int) ([]*release.Release, error)
}