Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchProtectionReconciler ¶
type BranchProtectionReconciler struct {
client.Client
Scheme *runtime.Scheme
GitHubClient BranchProtectionRequester
DeleteOnResourceDeletion bool
RequeueInterval time.Duration
}
BranchProtectionReconciler reconciles a BranchProtection object
func (*BranchProtectionReconciler) Reconcile ¶
func (r *BranchProtectionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the BranchProtection object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*BranchProtectionReconciler) SetupWithManager ¶
func (r *BranchProtectionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BranchProtectionRequester ¶
type BranchProtectionRequester interface {
RepositoryGetter // needed to create new branch protection rules
GetBranchProtection(ctx context.Context, nodeId string) (*gh.BranchProtection, error)
CreateBranchProtection(ctx context.Context, input *githubv4.CreateBranchProtectionRuleInput) (*gh.BranchProtection, error)
GetBranchProtectionByOwnerRepoPattern(ctx context.Context, repositoryOwner, repositoryName, pattern string) (*gh.BranchProtection, error)
UpdateBranchProtection(ctx context.Context, input *githubv4.UpdateBranchProtectionRuleInput) (*gh.BranchProtection, error)
DeleteBranchProtection(ctx context.Context, input *githubv4.DeleteBranchProtectionRuleInput) error
}
type GitHubRequester ¶
type GitHubRequester interface {
TeamRequester
RepositoryRequester
OrganizationRequester
BranchProtectionRequester
}
type OrganizationReconciler ¶
type OrganizationReconciler struct {
client.Client
Scheme *runtime.Scheme
GitHubClient OrganizationRequester
DeleteOnResourceDeletion bool
RequeueInterval time.Duration
}
OrganizationReconciler reconciles a Organization object
func (*OrganizationReconciler) Reconcile ¶
func (r *OrganizationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Organization object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*OrganizationReconciler) SetupWithManager ¶
func (r *OrganizationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type OrganizationRequester ¶
type OrganizationRequester interface {
GetOrganization(ctx context.Context, org string) (*github.Organization, error)
GetOrganizationByNodeId(ctx context.Context, nodeId string) (*github.Organization, error)
UpdateOrganization(ctx context.Context, org string, updateOrg *github.Organization) (*github.Organization, error)
}
type RepositoryGetter ¶
type RepositoryReconciler ¶
type RepositoryReconciler struct {
client.Client
Scheme *runtime.Scheme
GitHubClient RepositoryRequester
DeleteOnResourceDeletion bool
RequeueInterval time.Duration
}
RepositoryReconciler reconciles a Repository object
func (*RepositoryReconciler) Reconcile ¶
func (r *RepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Repository object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*RepositoryReconciler) SetupWithManager ¶
func (r *RepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RepositoryRequester ¶
type RepositoryRequester interface {
RepositoryGetter
UpdateRepositoryByName(ctx context.Context, owner, name string, update *github.Repository) (*github.Repository, error)
CreateRepository(ctx context.Context, org string, create *github.Repository) (*github.Repository, error)
CreateRepositoryFromTemplate(ctx context.Context, templateOwner string, templateRepository string, req *github.TemplateRepoRequest) (*github.Repository, error)
DeleteRepositoryByName(ctx context.Context, owner, name string) error
UpdateRepositoryTopics(ctx context.Context, owner string, repo string, topics []string) ([]string, error)
}
type TeamReconciler ¶
type TeamReconciler struct {
client.Client
Scheme *runtime.Scheme
GitHubClient TeamRequester
DeleteOnResourceDeletion bool
RequeueInterval time.Duration
}
TeamReconciler reconciles a Team object
func (*TeamReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Team object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.0/pkg/reconcile
func (*TeamReconciler) SetupWithManager ¶
func (r *TeamReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type TeamRequester ¶
type TeamRequester interface {
GetTeamBySlug(ctx context.Context, org, slug string) (*github.Team, error)
GetTeamById(ctx context.Context, org, teamId int64) (*github.Team, error)
GetTeamByNodeId(ctx context.Context, nodeId string) (*github.Team, error)
CreateTeam(ctx context.Context, org string, newTeam github.NewTeam) (*github.Team, error)
UpdateTeamBySlug(ctx context.Context, org, slug string, newTeam github.NewTeam) (*github.Team, error)
UpdateTeamById(ctx context.Context, org, teamId int64, newTeam github.NewTeam) (*github.Team, error)
DeleteTeamBySlug(ctx context.Context, org, slug string) error
DeleteTeamById(ctx context.Context, org, teamId int64) error
GetTeamRepositoryPermission(ctx context.Context, org, slug, repoName string) (*gh.TeamRepositoryPermission, error)
GetTeamRepositoryPermissions(ctx context.Context, org, slug string) ([]*gh.TeamRepositoryPermission, error)
UpdateTeamRepositoryPermissions(ctx context.Context, org, slug string, repoName, permission string) error
RemoveTeamRepositoryPermissions(ctx context.Context, org, slug string, repoName string) error
}