Documentation ¶
Index ¶
- func FindSourceRepository(ctx context.Context, jxClient versioned.Interface, ...) (*v1.SourceRepository, error)
- func FindSourceRepositoryWithoutProvider(ctx context.Context, jxClient versioned.Interface, ns, owner, name string) (*v1.SourceRepository, error)
- func GetOrCreateSourceRepository(ctx context.Context, jxClient versioned.Interface, ...) (*v1.SourceRepository, error)
- func GetOrCreateSourceRepositoryCallback(ctx context.Context, jxClient versioned.Interface, ...) (*v1.SourceRepository, error)
- func GetRepositoryGitURL(s *v1.SourceRepository) (string, error)
- func IsIncludedInTheGivenEnvs(environments map[string]*v1.Environment, repository *v1.SourceRepository) bool
- func IsRemoteEnvironmentRepository(environments map[string]*v1.Environment, repository *v1.SourceRepository) bool
- func ToProviderName(gitURL string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindSourceRepository ¶
func FindSourceRepository(ctx context.Context, jxClient versioned.Interface, ns, owner, name, providerName string) (*v1.SourceRepository, error)
FindSourceRepository returns a SourceRepository for the given namespace, owner, repo name, and (optional) provider name. If no SourceRepository is found, return nil.
func FindSourceRepositoryWithoutProvider ¶
func FindSourceRepositoryWithoutProvider(ctx context.Context, jxClient versioned.Interface, ns, owner, name string) (*v1.SourceRepository, error)
FindSourceRepositoryWithoutProvider returns a SourceRepository for the given namespace, owner and repo name. If no SourceRepository is found, return nil.
func GetOrCreateSourceRepository ¶
func GetOrCreateSourceRepository(ctx context.Context, jxClient versioned.Interface, ns, name, organisation, providerURL string) (*v1.SourceRepository, error)
GetOrCreateSourceRepository gets or creates the SourceRepository for the given repository name and organisation
func GetOrCreateSourceRepositoryCallback ¶
func GetOrCreateSourceRepositoryCallback(ctx context.Context, jxClient versioned.Interface, ns, name, organisation, providerURL string, callback func(*v1.SourceRepository)) (*v1.SourceRepository, error)
GetOrCreateSourceRepositoryCallback gets or creates the SourceRepository for the given repository name and organisation invoking the given callback to modify the resource before create/udpate
func GetRepositoryGitURL ¶
func GetRepositoryGitURL(s *v1.SourceRepository) (string, error)
GetRepositoryGitURL returns the git repository clone URL
func IsIncludedInTheGivenEnvs ¶
func IsIncludedInTheGivenEnvs(environments map[string]*v1.Environment, repository *v1.SourceRepository) bool
IsIncludedInTheGivenEnvs returns true if the given repository is an environment repository
func IsRemoteEnvironmentRepository ¶
func IsRemoteEnvironmentRepository(environments map[string]*v1.Environment, repository *v1.SourceRepository) bool
IsRemoteEnvironmentRepository returns true if the given repository is a remote environment
func ToProviderName ¶
ToProviderName takes the git URL and converts it to a provider name which can be used as a label selector
Types ¶
This section is empty.