packagediscovery

package
v0.0.0-...-5cbd3cb Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToStr

func ToStr(packages []DiscoveredPackage) string

ToStr is convenient method to pretty print set of packages.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

type DiscoveredPackage

type DiscoveredPackage struct {
	// User specified properties
	Directory string
	Revision  string
	Branch    string

	// GitLabProject contains the info retrieved from GitLab
	GitLabProject *gitlab.Project
	// GithubRepo contains the info retrieved from GitHub
	GitHubRepo *github.Repository
	// OciRepo contains info retrieved from the OCI registry
	OciRepo *OCIRepo
}

DiscoveredPackage represents a config package that will be rolled out.

func (*DiscoveredPackage) HTTPURL

func (dp *DiscoveredPackage) HTTPURL() string

HTTPURL refers to the HTTP URL for the repository.

func (*DiscoveredPackage) ID

func (dp *DiscoveredPackage) ID() (id string)

ID returns an identifier for the package. This is currently being used to generate the unique name of the RemoteSync object. TODO (droot): figure out a naming scheme for the package identity.

func (*DiscoveredPackage) SSHURL

func (dp *DiscoveredPackage) SSHURL() string

SSHURL refers to the SSH(Git) URL for the repository.

func (*DiscoveredPackage) String

func (dp *DiscoveredPackage) String() string

type GitHubClientMaker

type GitHubClientMaker interface {
	NewGitHubClient(ctx context.Context, config gitopsv1alpha1.GitHubSelector) (*github.Client, error)
}

GitHubClientMaker knows how to make a GitHub Client.

type GitLabClientMaker

type GitLabClientMaker interface {
	NewGitLabClient(ctx context.Context, config gitopsv1alpha1.GitLabSource) (*gitlab.Client, error)
}

GitLabClientMaker knows how to make a GitLab Client.

type OCIRepo

type OCIRepo struct {
	Image string
}

type PackageDiscovery

type PackageDiscovery struct {
	// contains filtered or unexported fields
}

func NewPackageDiscovery

func NewPackageDiscovery(client client.Client, namespace string) *PackageDiscovery

func (*PackageDiscovery) GetPackages

func (d *PackageDiscovery) GetPackages(ctx context.Context, config gitopsv1alpha1.PackagesConfig) (discoveredPackages []DiscoveredPackage, err error)

func (*PackageDiscovery) NewGitHubClient

func (d *PackageDiscovery) NewGitHubClient(ctx context.Context, ghConfig gitopsv1alpha1.GitHubSelector) (*github.Client, error)

func (*PackageDiscovery) NewGitLabClient

func (d *PackageDiscovery) NewGitLabClient(ctx context.Context, gitlabSource gitopsv1alpha1.GitLabSource) (*gitlab.Client, error)

Jump to

Keyboard shortcuts

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