controllers

package
v0.0.0-...-3a96d25 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 44 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproveRun

func ApproveRun(c *gin.Context)

func AssociateTenantIdToDiggerOrg

func AssociateTenantIdToDiggerOrg(c *gin.Context)

func AutomergePRforBatchIfEnabled

func AutomergePRforBatchIfEnabled(gh utils.GithubClientProvider, batch *models.DiggerBatch) error

func CreateDiggerWorkflowWithPullRequest

func CreateDiggerWorkflowWithPullRequest(org *models.Organisation, client *github.Client, githubRepo string) error

CreateDiggerWorkflowWithPullRequest for specified repo it will create a new branch 'digger/configure' and a pull request to default branch in the pull request it will try to add .github/workflows/digger_workflow.yml file with workflow for digger

func CreateFronteggOrgFromWebhook

func CreateFronteggOrgFromWebhook(c *gin.Context)

func CreateRunForProject

func CreateRunForProject(c *gin.Context)

func FindAccessPolicy

func FindAccessPolicy(c *gin.Context)

func FindAccessPolicyForOrg

func FindAccessPolicyForOrg(c *gin.Context)

func FindDriftPolicy

func FindDriftPolicy(c *gin.Context)

func FindDriftPolicyForOrg

func FindDriftPolicyForOrg(c *gin.Context)

func FindPlanPolicy

func FindPlanPolicy(c *gin.Context)

func FindPlanPolicyForOrg

func FindPlanPolicyForOrg(c *gin.Context)

func FindProjectsForOrg

func FindProjectsForOrg(c *gin.Context)

func FindProjectsForRepo

func FindProjectsForRepo(c *gin.Context)

func GetActivity

func GetActivity(c *gin.Context)

func GetDiggerConfigForBranch

func GetDiggerConfigForBranch(gh utils.GithubClientProvider, installationId int64, repoFullName string, repoOwner string, repoName string, cloneUrl string, branch string, changedFiles []string) (string, *dg_github.GithubService, *dg_configuration.DiggerConfig, graph.Graph[string, dg_configuration.Project], error)

func GetIndependentProjects

func GetIndependentProjects(depGraph graph.Graph[string, string], projectsToFilter []dg_configuration.Project) ([]dg_configuration.Project, error)

func GetRepoByInstllationId

func GetRepoByInstllationId(installationId int64, repoOwner string, repoName string) (*models.Repo, error)

func GithubAppSetup

func GithubAppSetup(c *gin.Context)

func Home

func Home(c *gin.Context)

func IssueAccessTokenForOrg

func IssueAccessTokenForOrg(c *gin.Context)

func JoinedOrganisationRepoProjectQuery

func JoinedOrganisationRepoProjectQuery() *gorm.DB

func ListProjects

func ListProjects(c *gin.Context)

func ProjectDetails

func ProjectDetails(c *gin.Context)

func ReportProjectsForRepo

func ReportProjectsForRepo(c *gin.Context)

func RunDetails

func RunDetails(c *gin.Context)

func RunHistoryForProject

func RunHistoryForProject(c *gin.Context)

func RunsForProject

func RunsForProject(c *gin.Context)

func TriggerDiggerJobs

func TriggerDiggerJobs(ciBackend ci_backends.CiBackend, repoFullName string, repoOwner string, repoName string, batchId *uuid.UUID, prNumber int, prService ci.PullRequestService, gh utils.GithubClientProvider) error

func UpdateCommentsForBatchGroup

func UpdateCommentsForBatchGroup(gh utils.GithubClientProvider, batch *models.DiggerBatch, serializedJobs []orchestrator_scheduler.SerializedJob) error

func UpsertAccessPolicyForOrg

func UpsertAccessPolicyForOrg(c *gin.Context)

func UpsertAccessPolicyForRepoAndProject

func UpsertAccessPolicyForRepoAndProject(c *gin.Context)

func UpsertDriftPolicyForOrg

func UpsertDriftPolicyForOrg(c *gin.Context)

func UpsertDriftPolicyForRepoAndProject

func UpsertDriftPolicyForRepoAndProject(c *gin.Context)

func UpsertPlanPolicyForOrg

func UpsertPlanPolicyForOrg(c *gin.Context)

func UpsertPlanPolicyForRepoAndProject

func UpsertPlanPolicyForRepoAndProject(c *gin.Context)

Types

type CreatePolicyInput

type CreatePolicyInput struct {
	Policy string
}

type CreateProjectRequest

type CreateProjectRequest struct {
	Name              string `json:"name"`
	ConfigurationYaml string `json:"configurationYaml"`
}

type CreateProjectRunRequest

type CreateProjectRunRequest struct {
	StartedAt time.Time `json:"startedAt"`
	EndedAt   time.Time `json:"endedAt"`
	Status    string    `json:"status"`
	Command   string    `json:"command"`
	Output    string    `json:"output"`
}

type DiggerController

type DiggerController struct {
	CiBackendProvider                  ci_backends.CiBackendProvider
	GithubClientProvider               utils.GithubClientProvider
	GithubWebhookPostIssueCommentHooks []IssueCommentHook
}

func (DiggerController) GithubAppCallbackPage

func (d DiggerController) GithubAppCallbackPage(c *gin.Context)

func (DiggerController) GithubAppWebHook

func (d DiggerController) GithubAppWebHook(c *gin.Context)

func (DiggerController) GithubReposPage

func (d DiggerController) GithubReposPage(c *gin.Context)

func (DiggerController) GithubSetupExchangeCode

func (d DiggerController) GithubSetupExchangeCode(c *gin.Context)

GithubSetupExchangeCode handles the user coming back from creating their app A code query parameter is exchanged for this app's ID, key, and webhook_secret Implements https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#implementing-the-github-app-manifest-flow

func (DiggerController) SetJobStatusForProject

func (d DiggerController) SetJobStatusForProject(c *gin.Context)

func (DiggerController) UpdateRepoCache

func (d DiggerController) UpdateRepoCache(c *gin.Context)

type IssueCommentHook

type IssueCommentHook func(gh utils.GithubClientProvider, payload *github.IssueCommentEvent, ciBackendProvider ci_backends.CiBackendProvider) error

type SetJobStatusRequest

type SetJobStatusRequest struct {
	Status          string                      `json:"status"`
	Timestamp       time.Time                   `json:"timestamp"`
	JobSummary      *iac_utils.IacSummary       `json:"job_summary"`
	Footprint       *iac_utils.IacPlanFootprint `json:"job_plan_footprint"`
	PrCommentUrl    string                      `json:"pr_comment_url"`
	TerraformOutput string                      `json:"terraform_output"`
}

type TenantCreatedEvent

type TenantCreatedEvent struct {
	TenantId string `json:"tenantId,omitempty"`
	Name     string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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