github.com/koderover/helm@v2.17.0+incompatible/pkg/helm/interface.go (about) 1 /* 2 Copyright The Helm Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package helm 18 19 import ( 20 "golang.org/x/net/context" 21 "k8s.io/helm/pkg/proto/hapi/chart" 22 rls "k8s.io/helm/pkg/proto/hapi/services" 23 ) 24 25 // Interface for helm client for mocking in tests 26 type Interface interface { 27 ListReleases(opts ...ReleaseListOption) (*rls.ListReleasesResponse, error) 28 InstallRelease(chStr, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) 29 InstallReleaseWithContext(ctx context.Context, chStr, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) 30 InstallReleaseFromChart(chart *chart.Chart, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) 31 InstallReleaseFromChartWithContext(ctx context.Context, chart *chart.Chart, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) 32 DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) 33 ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error) 34 UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) 35 UpdateReleaseWithContext(ctx context.Context, rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) 36 UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) 37 UpdateReleaseFromChartWithContext(ctx context.Context, rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) 38 RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error) 39 ReleaseContent(rlsName string, opts ...ContentOption) (*rls.GetReleaseContentResponse, error) 40 ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.GetHistoryResponse, error) 41 GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, error) 42 RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) 43 PingTiller() error 44 }