Documentation ¶
Index ¶
- func GetChangeTransferPolicyName(promotionStrategyName, environmentBranch string) string
- func GetEnvironmentByBranch(promotionStrategy promoterv1alpha1.PromotionStrategy, branch string) (int, *promoterv1alpha1.Environment)
- func GetEnvironmentStatusByBranch(promotionStrategy promoterv1alpha1.PromotionStrategy, branch string) (int, *promoterv1alpha1.EnvironmentStatus)
- func GetEnvironmentsFromStatusInOrder(promotionStrategy promoterv1alpha1.PromotionStrategy) []promoterv1alpha1.EnvironmentStatus
- func GetGitRepositorytFromObjectKey(ctx context.Context, k8sClient client.Client, objectKey client.ObjectKey) (*promoterv1alpha1.GitRepository, error)
- func GetPreviousEnvironmentStatusByBranch(promotionStrategy promoterv1alpha1.PromotionStrategy, currentBranch string) (int, *promoterv1alpha1.EnvironmentStatus)
- func GetPullRequestName(ctx context.Context, ...) string
- func GetScmProviderAndSecretFromRepositoryReference(ctx context.Context, k8sClient client.Client, ...) (*promoterv1alpha1.ScmProvider, *v1.Secret, error)
- func GetScmProviderFromGitRepository(ctx context.Context, k8sClient client.Client, ...) (*promoterv1alpha1.ScmProvider, error)
- func KubeSafeLabel(ctx context.Context, name string) string
- func KubeSafeUniqueName(ctx context.Context, name string) string
- func TruncateString(str string, length int) string
- func TruncateStringFromBeginning(str string, length int) string
- func UpsertChangeTransferPolicy(policies []promoterv1alpha1.ChangeTransferPolicy, ...) []promoterv1alpha1.ChangeTransferPolicy
- func UpsertChangeTransferPolicyList(slice []promoterv1alpha1.ChangeTransferPolicy, ...) []promoterv1alpha1.ChangeTransferPolicy
- func UpsertEnvironmentStatus(slice []promoterv1alpha1.EnvironmentStatus, ...) []promoterv1alpha1.EnvironmentStatus
- type PathLookup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvironmentByBranch ¶
func GetEnvironmentByBranch(promotionStrategy promoterv1alpha1.PromotionStrategy, branch string) (int, *promoterv1alpha1.Environment)
func GetEnvironmentStatusByBranch ¶
func GetEnvironmentStatusByBranch(promotionStrategy promoterv1alpha1.PromotionStrategy, branch string) (int, *promoterv1alpha1.EnvironmentStatus)
func GetEnvironmentsFromStatusInOrder ¶
func GetEnvironmentsFromStatusInOrder(promotionStrategy promoterv1alpha1.PromotionStrategy) []promoterv1alpha1.EnvironmentStatus
func GetGitRepositorytFromObjectKey ¶
func GetGitRepositorytFromObjectKey(ctx context.Context, k8sClient client.Client, objectKey client.ObjectKey) (*promoterv1alpha1.GitRepository, error)
GetGitRepositorytFromObjectKey returns the GitRepository object from the repository reference
func GetPreviousEnvironmentStatusByBranch ¶
func GetPreviousEnvironmentStatusByBranch(promotionStrategy promoterv1alpha1.PromotionStrategy, currentBranch string) (int, *promoterv1alpha1.EnvironmentStatus)
func GetPullRequestName ¶
func GetScmProviderAndSecretFromRepositoryReference ¶
func GetScmProviderAndSecretFromRepositoryReference(ctx context.Context, k8sClient client.Client, repositoryRef promoterv1alpha1.ObjectReference, obj metav1.Object) (*promoterv1alpha1.ScmProvider, *v1.Secret, error)
func GetScmProviderFromGitRepository ¶
func GetScmProviderFromGitRepository(ctx context.Context, k8sClient client.Client, repositoryRef *promoterv1alpha1.GitRepository, obj metav1.Object) (*promoterv1alpha1.ScmProvider, error)
func KubeSafeLabel ¶
KubeSafeLabel Creates a safe label buy truncating from the beginning of 'name' to a max of 63 characters, if the name starts with a hyphen it will be removed. We truncate from beginning so that we can keep the unique hash at the end of the name.
func KubeSafeUniqueName ¶
KubeSafeUniqueName Creates a safe name by replacing all non-alphanumeric characters with a hyphen and truncating to a max of 255 characters, then appending a hash of the name.
func TruncateString ¶
func TruncateStringFromBeginning ¶
Truncate from front of string
func UpsertChangeTransferPolicy ¶
func UpsertChangeTransferPolicy(policies []promoterv1alpha1.ChangeTransferPolicy, policy promoterv1alpha1.ChangeTransferPolicy) []promoterv1alpha1.ChangeTransferPolicy
func UpsertChangeTransferPolicyList ¶
func UpsertChangeTransferPolicyList(slice []promoterv1alpha1.ChangeTransferPolicy, insertList ...[]promoterv1alpha1.ChangeTransferPolicy) []promoterv1alpha1.ChangeTransferPolicy
func UpsertEnvironmentStatus ¶
func UpsertEnvironmentStatus(slice []promoterv1alpha1.EnvironmentStatus, i promoterv1alpha1.EnvironmentStatus) []promoterv1alpha1.EnvironmentStatus
Types ¶
type PathLookup ¶
type PathLookup struct {
// contains filtered or unexported fields
}
func NewPathLookup ¶
func NewPathLookup() PathLookup
func (*PathLookup) Get ¶
func (pl *PathLookup) Get(key string) string
func (*PathLookup) GetAll ¶
func (pl *PathLookup) GetAll() map[string]string
func (*PathLookup) Set ¶
func (pl *PathLookup) Set(key string, value string)
Click to show internal directories.
Click to hide internal directories.