Documentation ¶
Index ¶
- func FormatLinks(links map[string]string, linkName string) (string, error)
- func GetEnvironmentLinks(provider Provider, cat *catalog.Catalog, envName string) (map[string]string, error)
- func GetOrSelectLinkUrl(links map[string]string, linkName string) (string, error)
- func GetProjectLinks(provider Provider, cat *catalog.Catalog, projectName string) (map[string]string, error)
- func GetReleaseLinks(provider Provider, cat *catalog.Catalog, envName, releaseName string) (map[string]string, error)
- type Provider
- type ProviderMock
- func (mock *ProviderMock) GetEnvironmentLinks(environment *v1alpha1.Environment) (map[string]string, error)
- func (mock *ProviderMock) GetEnvironmentLinksCalls() []struct{ ... }
- func (mock *ProviderMock) GetProjectLinks(project *v1alpha1.Project) (map[string]string, error)
- func (mock *ProviderMock) GetProjectLinksCalls() []struct{ ... }
- func (mock *ProviderMock) GetReleaseLinks(release *v1alpha1.Release) (map[string]string, error)
- func (mock *ProviderMock) GetReleaseLinksCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLinks ¶ added in v0.46.0
func GetEnvironmentLinks ¶
func GetOrSelectLinkUrl ¶
func GetProjectLinks ¶
Types ¶
type Provider ¶
type ProviderMock ¶ added in v0.45.1
type ProviderMock struct { // GetEnvironmentLinksFunc mocks the GetEnvironmentLinks method. GetEnvironmentLinksFunc func(environment *v1alpha1.Environment) (map[string]string, error) // GetProjectLinksFunc mocks the GetProjectLinks method. GetProjectLinksFunc func(project *v1alpha1.Project) (map[string]string, error) // GetReleaseLinksFunc mocks the GetReleaseLinks method. GetReleaseLinksFunc func(release *v1alpha1.Release) (map[string]string, error) // contains filtered or unexported fields }
ProviderMock is a mock implementation of Provider.
func TestSomethingThatUsesProvider(t *testing.T) { // make and configure a mocked Provider mockedProvider := &ProviderMock{ GetEnvironmentLinksFunc: func(environment *v1alpha1.Environment) (map[string]string, error) { panic("mock out the GetEnvironmentLinks method") }, GetProjectLinksFunc: func(project *v1alpha1.Project) (map[string]string, error) { panic("mock out the GetProjectLinks method") }, GetReleaseLinksFunc: func(release *v1alpha1.Release) (map[string]string, error) { panic("mock out the GetReleaseLinks method") }, } // use mockedProvider in code that requires Provider // and then make assertions. }
func (*ProviderMock) GetEnvironmentLinks ¶ added in v0.45.1
func (mock *ProviderMock) GetEnvironmentLinks(environment *v1alpha1.Environment) (map[string]string, error)
GetEnvironmentLinks calls GetEnvironmentLinksFunc.
func (*ProviderMock) GetEnvironmentLinksCalls ¶ added in v0.45.1
func (mock *ProviderMock) GetEnvironmentLinksCalls() []struct { Environment *v1alpha1.Environment }
GetEnvironmentLinksCalls gets all the calls that were made to GetEnvironmentLinks. Check the length with:
len(mockedProvider.GetEnvironmentLinksCalls())
func (*ProviderMock) GetProjectLinks ¶ added in v0.45.1
GetProjectLinks calls GetProjectLinksFunc.
func (*ProviderMock) GetProjectLinksCalls ¶ added in v0.45.1
func (mock *ProviderMock) GetProjectLinksCalls() []struct { Project *v1alpha1.Project }
GetProjectLinksCalls gets all the calls that were made to GetProjectLinks. Check the length with:
len(mockedProvider.GetProjectLinksCalls())
func (*ProviderMock) GetReleaseLinks ¶ added in v0.45.1
GetReleaseLinks calls GetReleaseLinksFunc.
func (*ProviderMock) GetReleaseLinksCalls ¶ added in v0.45.1
func (mock *ProviderMock) GetReleaseLinksCalls() []struct { Release *v1alpha1.Release }
GetReleaseLinksCalls gets all the calls that were made to GetReleaseLinks. Check the length with:
len(mockedProvider.GetReleaseLinksCalls())
Click to show internal directories.
Click to hide internal directories.