Documentation ¶
Index ¶
- Constants
- func InitMock(clientset kubernetes.Interface, namespace string)
- type Mock
- func (m *Mock) GetAvailableReleases(ctx context.Context) ([]MockRelease, error)
- func (m *Mock) GetCurrentRelease(ctx context.Context) (*MockRelease, error)
- func (m *Mock) GetDeployedReleases(ctx context.Context) ([]MockRelease, error)
- func (m *Mock) GetHelmChartURL(ctx context.Context) (string, error)
- func (m *Mock) GetMockData(ctx context.Context) (*MockData, error)
- func (m *Mock) IsMockEnabled(ctx context.Context) (bool, error)
- func (m *Mock) SetMockData(ctx context.Context, mockData MockData) error
- type MockData
- type MockRelease
Constants ¶
View Source
const ( CurrentReleaseMockKey = "currentRelease" DeployedReleasesMockKey = "deployedReleases" AvailableReleasesMockKey = "availableReleases" )
Variables ¶
This section is empty.
Functions ¶
func InitMock ¶
func InitMock(clientset kubernetes.Interface, namespace string)
Types ¶
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
func MustGetMock ¶
func MustGetMock() *Mock
func (*Mock) GetAvailableReleases ¶
func (m *Mock) GetAvailableReleases(ctx context.Context) ([]MockRelease, error)
func (*Mock) GetCurrentRelease ¶
func (m *Mock) GetCurrentRelease(ctx context.Context) (*MockRelease, error)
func (*Mock) GetDeployedReleases ¶
func (m *Mock) GetDeployedReleases(ctx context.Context) ([]MockRelease, error)
type MockData ¶
type MockData struct { HelmChartURL string `json:"helmChartURL,omitempty" yaml:"helmChartURL,omitempty"` CurrentRelease *MockRelease `json:"currentRelease,omitempty" yaml:"currentRelease,omitempty"` DeployedReleases []MockRelease `json:"deployedReleases,omitempty" yaml:"deployedReleases,omitempty"` AvailableReleases []MockRelease `json:"availableReleases,omitempty" yaml:"availableReleases,omitempty"` }
type MockRelease ¶
type MockRelease struct { VersionLabel string `json:"versionLabel" yaml:"versionLabel"` ReleaseNotes string `json:"releaseNotes" yaml:"releaseNotes"` CreatedAt string `json:"createdAt" yaml:"createdAt"` DeployedAt string `json:"deployedAt" yaml:"deployedAt"` HelmReleaseName string `json:"helmReleaseName" yaml:"helmReleaseName"` HelmReleaseRevision int `json:"helmReleaseRevision" yaml:"helmReleaseRevision"` HelmReleaseNamespace string `json:"helmReleaseNamespace" yaml:"helmReleaseNamespace"` }
Click to show internal directories.
Click to hide internal directories.