gitrepository

package
v0.9.0-nightly.20241113 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBranchName = "main"
)

Variables

This section is empty.

Functions

func GetGitProvider added in v0.5.0

func GetGitProvider(ctx context.Context, repo *v1alpha1.GitRepository, kubeClient client.Client, scheme *runtime.Scheme, tmplConfig v1alpha1.BuildCustomizationSpec) (gitProvider, error)

Types

type GiteaClient

type GiteaClient interface {
	CreateAccessToken(option gitea.CreateAccessTokenOption) (*gitea.AccessToken, *gitea.Response, error)
	CreateOrg(opt gitea.CreateOrgOption) (*gitea.Organization, *gitea.Response, error)
	CreateRepo(opt gitea.CreateRepoOption) (*gitea.Repository, *gitea.Response, error)
	DeleteOrg(orgname string) (*gitea.Response, error)
	DeleteRepo(owner, repo string) (*gitea.Response, error)
	GetOrg(orgname string) (*gitea.Organization, *gitea.Response, error)
	GetRepo(owner, reponame string) (*gitea.Repository, *gitea.Response, error)
	SetBasicAuth(username, password string)
	SetContext(ctx context.Context)
}

func NewGiteaClient

func NewGiteaClient(url string, options ...gitea.ClientOption) (GiteaClient, error)

type GiteaClientFunc

type GiteaClientFunc func(url string, options ...gitea.ClientOption) (GiteaClient, error)

type RepositoryReconciler

type RepositoryReconciler struct {
	client.Client
	Recorder        record.EventRecorder
	Scheme          *runtime.Scheme
	Config          v1alpha1.BuildCustomizationSpec
	GitProviderFunc gitProviderFunc
	TempDir         string
	RepoMap         *util.RepoMap
}

func (*RepositoryReconciler) Reconcile

func (r *RepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*RepositoryReconciler) SetupWithManager

func (r *RepositoryReconciler) SetupWithManager(mgr ctrl.Manager, notifyChan chan event.GenericEvent) error

Jump to

Keyboard shortcuts

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