mock

package
v0.0.1-alpha.12 Latest Latest
Warning

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

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

Documentation

Index

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) DeleteMockData

func (m *Mock) DeleteMockData(ctx context.Context) error

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)

func (*Mock) GetMockData

func (m *Mock) GetMockData(ctx context.Context) (*MockData, error)

func (*Mock) HasMockData

func (m *Mock) HasMockData(ctx context.Context, dataKey string) (bool, error)

func (*Mock) SetMockData

func (m *Mock) SetMockData(ctx context.Context, mockData MockData) error

type MockData

type MockData struct {
	CurrentRelease    *MockRelease  `json:"currentRelease,omitempty"`
	DeployedReleases  []MockRelease `json:"deployedReleases,omitempty"`
	AvailableReleases []MockRelease `json:"availableReleases,omitempty"`
}

type MockRelease

type MockRelease struct {
	VersionLabel         string `json:"versionLabel"`
	ChannelID            string `json:"channelID"`
	ChannelName          string `json:"channelName"`
	IsRequired           bool   `json:"isRequired"`
	ReleaseNotes         string `json:"releaseNotes"`
	HelmReleaseName      string `json:"helmReleaseName,omitempty"`
	HelmReleaseRevision  int    `json:"helmReleaseRevision,omitempty"`
	HelmReleaseNamespace string `json:"helmReleaseNamespace,omitempty"`
}

Jump to

Keyboard shortcuts

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