controllers

package
v0.0.0-...-e0b51f3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 48 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 BillingStatusApi

func BillingStatusApi(c *gin.Context)

func CreateTerraformOutputsSummary

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

func CreateVCSConnectionApi

func CreateVCSConnectionApi(c *gin.Context)

func DeleteOlderPRCommentsIfEnabled

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

func DeleteVCSConnection

func DeleteVCSConnection(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 GenerateTerraformFromCode

func GenerateTerraformFromCode(payload *github.IssueCommentEvent, commentReporterManager utils.CommentReporterManager, config *digger_config.DiggerConfig, defaultBranch string, ghService *github2.GithubService, repoOwner string, repoName string, commitSha *string, issueNumber int, branch *string) error

func GetActivity

func GetActivity(c *gin.Context)

func GetDashboardStatusApi

func GetDashboardStatusApi(c *gin.Context)

func GetDiggerConfigForBranch

func GetDiggerConfigForBranch(gh utils.GithubClientProvider, installationId int64, repoFullName string, repoOwner string, repoName string, cloneUrl string, branch string, changedFiles []string, taConfig *tac.AtlantisConfig) (string, *github2.GithubService, *digger_config.DiggerConfig, graph.Graph[string, digger_config.Project], error)

func GetIndependentProjects

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

func GetJobsForRepoApi

func GetJobsForRepoApi(c *gin.Context)

func GetOrgSettingsApi

func GetOrgSettingsApi(c *gin.Context)

func GetVCSConnection

func GetVCSConnection(c *gin.Context)

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 LinkGithubInstallationToOrgApi

func LinkGithubInstallationToOrgApi(c *gin.Context)

func ListProjectsApi

func ListProjectsApi(c *gin.Context)

func ListReposApi

func ListReposApi(c *gin.Context)

func ListVCSConnectionsApi

func ListVCSConnectionsApi(c *gin.Context)

func PolicyOrgGetApi

func PolicyOrgGetApi(c *gin.Context)

func PolicyOrgUpsertApi

func PolicyOrgUpsertApi(c *gin.Context)

func ProjectDetails

func ProjectDetails(c *gin.Context)

func ProjectsDetailsApi

func ProjectsDetailsApi(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 UpdateCheckStatusForBatch

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

func UpdateCheckStatusForJob

func UpdateCheckStatusForJob(gh utils.GithubClientProvider, job *models.DiggerJob) error

func UpdateCommentsForBatchGroup

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

func UpdateOrgSettingsApi

func UpdateOrgSettingsApi(c *gin.Context)

func UpdateProjectApi

func UpdateProjectApi(c *gin.Context)

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) CreateUserInternal

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

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)

func (DiggerController) UpsertOrgInternal

func (d DiggerController) UpsertOrgInternal(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"`
	PrCommentId     string                      `json:"pr_comment_id"`
	TerraformOutput string                      `json:"terraform_output"`
	WorkflowUrl     string                      `json:"workflow_url,omitempty"`
}

type TenantCreatedEvent

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

type UpdateCacheRequest

type UpdateCacheRequest struct {
	RepoFullName   string `json:"repo_full_name"`
	Branch         string `json:"branch"`
	OrgId          uint   `json:"org_id"`
	InstallationId int64  `json:"installation_id"`
}

Jump to

Keyboard shortcuts

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