controllers

package
v0.0.0-...-b802271 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadJobArtefact

func DownloadJobArtefact(c *gin.Context)

func GetGitlabRepoUrl

func GetGitlabRepoUrl(event interface{}) string

func GithubAppConnections

func GithubAppConnections(c *gin.Context)

func SetJobArtefact

func SetJobArtefact(c *gin.Context)

func TriggerPipeline

func TriggerPipeline(pipelineType string) error

TriggerPipeline triggers a CI pipeline with the specified type

Types

type Actor

type Actor struct {
	AccountID   string `json:"account_id"`
	DisplayName string `json:"display_name"`
	Nickname    string `json:"nickname,omitempty"`
	UUID        string `json:"uuid"`
	Type        string `json:"type"`
	Links       Links  `json:"links"`
}

type Author

type Author struct {
	Raw  string `json:"raw"`
	User Actor  `json:"user,omitempty"`
}

type BBWebhookPayload

type BBWebhookPayload map[string]interface{}

type BitbucketCommentCreatedEvent

type BitbucketCommentCreatedEvent struct {
	Actor       Actor        `json:"actor"`
	Repository  Repository   `json:"repository"`
	Comment     Comment      `json:"comment"`
	Commit      *CommitInfo  `json:"commit,omitempty"`      // For repo:commit_comment_created
	PullRequest *PullRequest `json:"pullrequest,omitempty"` // For pullrequest:comment_created
}

type BitbucketPullRequestCreatedEvent

type BitbucketPullRequestCreatedEvent struct {
	Actor       Actor       `json:"actor"`
	Repository  Repository  `json:"repository"`
	PullRequest PullRequest `json:"pullrequest"`
}

type BitbucketPushEvent

type BitbucketPushEvent struct {
	Actor      Actor      `json:"actor"`
	Repository Repository `json:"repository"`
	Push       Push       `json:"push"`
}

type Branch

type Branch struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type Change

type Change struct {
	Forced    bool      `json:"forced"`
	Old       Reference `json:"old"`
	New       Reference `json:"new"`
	Created   bool      `json:"created"`
	Closed    bool      `json:"closed"`
	Commits   []Commit  `json:"commits"`
	Truncated bool      `json:"truncated"`
}
type CloneLink struct {
	Href string `json:"href"`
	Name string `json:"name"`
}

type Comment

type Comment struct {
	ID        int       `json:"id"`
	Content   Content   `json:"content"`
	CreatedOn time.Time `json:"created_on"`
	UpdatedOn time.Time `json:"updated_on"`
	User      Actor     `json:"user"`
	Links     Links     `json:"links"`
	Parent    *Comment  `json:"parent,omitempty"` // For replies to comments
	Inline    *Inline   `json:"inline,omitempty"` // For inline comments
}

type Commit

type Commit struct {
	Hash    string    `json:"hash"`
	Type    string    `json:"type"`
	Message string    `json:"message"`
	Author  Author    `json:"author"`
	Links   Links     `json:"links"`
	Date    time.Time `json:"date"`
	Parents []Parent  `json:"parents,omitempty"`
}

type CommitInfo

type CommitInfo struct {
	Hash    string    `json:"hash"`
	Author  Author    `json:"author,omitempty"`
	Message string    `json:"message"`
	Date    time.Time `json:"date"`
	Parents []Parent  `json:"parents,omitempty"`
	Type    string    `json:"type"`
	Links   Links     `json:"links"`
}

type Content

type Content struct {
	Raw    string `json:"raw"`
	HTML   string `json:"html"`
	Markup string `json:"markup"`
}

type DiggerEEController

type DiggerEEController struct {
	GithubClientProvider utils.GithubClientProvider
	GitlabProvider       utils.GitlabProvider
	BitbucketProvider    utils.BitbucketProvider
	CiBackendProvider    ci_backends.CiBackendProvider
}

func (DiggerEEController) BitbucketWebhookHandler

func (ee DiggerEEController) BitbucketWebhookHandler(c *gin.Context)

WebhookHandler processes incoming Bitbucket webhook events

func (DiggerEEController) GetSpec

func (d DiggerEEController) GetSpec(c *gin.Context)

func (DiggerEEController) GithubAppConnectionsConfirm

func (d DiggerEEController) GithubAppConnectionsConfirm(c *gin.Context)

GithubAppConnectionsConfirm 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 (DiggerEEController) GithubAppConnectionsDelete

func (d DiggerEEController) GithubAppConnectionsDelete(c *gin.Context)

func (DiggerEEController) GitlabWebHookHandler

func (d DiggerEEController) GitlabWebHookHandler(c *gin.Context)

type Inline

type Inline struct {
	Path string `json:"path"`
	From *int   `json:"from,omitempty"`
	To   *int   `json:"to,omitempty"`
}

type LinkItem

type LinkItem struct {
	Href string `json:"href"`
}
type Links struct {
	Self     LinkItem    `json:"self"`
	HTML     LinkItem    `json:"html"`
	Avatar   LinkItem    `json:"avatar,omitempty"`
	Branches *LinkItem   `json:"branches,omitempty"`
	Commits  *LinkItem   `json:"commits,omitempty"`
	Clone    []CloneLink `json:"clone,omitempty"`
}

type Owner

type Owner struct {
	Username    string `json:"username"`
	DisplayName string `json:"display_name"`
	AccountID   string `json:"account_id,omitempty"`
	UUID        string `json:"uuid"`
	Type        string `json:"type"`
	Links       Links  `json:"links"`
}

type PREndpoint

type PREndpoint struct {
	Branch     Branch     `json:"branch"`
	Commit     CommitInfo `json:"commit"`
	Repository Repository `json:"repository"`
}

type Parent

type Parent struct {
	Hash  string `json:"hash"`
	Type  string `json:"type"`
	Links Links  `json:"links"`
}

type Project

type Project struct {
	Key         string    `json:"key"`
	UUID        string    `json:"uuid"`
	Name        string    `json:"name"`
	Description string    `json:"description,omitempty"`
	Links       Links     `json:"links"`
	Type        string    `json:"type"`
	IsPrivate   bool      `json:"is_private,omitempty"`
	CreatedOn   time.Time `json:"created_on,omitempty"`
	UpdatedOn   time.Time `json:"updated_on,omitempty"`
}

type PullRequest

type PullRequest struct {
	ID                int         `json:"id"`
	Title             string      `json:"title"`
	Description       string      `json:"description"`
	State             string      `json:"state"`
	Author            Actor       `json:"author"`
	Source            PREndpoint  `json:"source"`
	Destination       PREndpoint  `json:"destination"`
	MergeCommit       *CommitInfo `json:"merge_commit,omitempty"`
	ClosedBy          *Actor      `json:"closed_by,omitempty"`
	CreatedOn         time.Time   `json:"created_on"`
	UpdatedOn         time.Time   `json:"updated_on"`
	CommentCount      int         `json:"comment_count"`
	TaskCount         int         `json:"task_count"`
	CloseSourceBranch bool        `json:"close_source_branch"`
	Type              string      `json:"type"`
	Links             Links       `json:"links"`
	Summary           Content     `json:"summary"`
	Reviewers         []Actor     `json:"reviewers"`
	Participants      []Actor     `json:"participants"`
}

type Push

type Push struct {
	Changes []Change `json:"changes"`
}

type Reference

type Reference struct {
	Name   string     `json:"name"`
	Type   string     `json:"type"`
	Target CommitInfo `json:"target,omitempty"`
}

type Repository

type Repository struct {
	Type        string    `json:"type"`
	Name        string    `json:"name"`
	FullName    string    `json:"full_name"`
	UUID        string    `json:"uuid"`
	IsPrivate   bool      `json:"is_private"`
	Owner       Owner     `json:"owner"`
	Website     string    `json:"website,omitempty"`
	SCM         string    `json:"scm"`
	Description string    `json:"description,omitempty"`
	Links       Links     `json:"links"`
	Project     Project   `json:"project,omitempty"`
	ForkPolicy  string    `json:"fork_policy,omitempty"`
	CreatedOn   time.Time `json:"created_on,omitempty"`
	UpdatedOn   time.Time `json:"updated_on,omitempty"`
	Size        int       `json:"size,omitempty"`
	Language    string    `json:"language,omitempty"`
	HasIssues   bool      `json:"has_issues,omitempty"`
	HasWiki     bool      `json:"has_wiki,omitempty"`
	MainBranch  *Branch   `json:"mainbranch,omitempty"`
}

type WebController

type WebController struct {
	Config *config.Config
}

func (*WebController) AddPolicyPage

func (web *WebController) AddPolicyPage(c *gin.Context)

func (*WebController) PoliciesPage

func (web *WebController) PoliciesPage(c *gin.Context)

func (*WebController) PolicyDetailsPage

func (web *WebController) PolicyDetailsPage(c *gin.Context)

func (*WebController) PolicyDetailsUpdatePage

func (web *WebController) PolicyDetailsUpdatePage(c *gin.Context)

func (*WebController) ProjectDetailsPage

func (web *WebController) ProjectDetailsPage(c *gin.Context)

func (*WebController) ProjectDetailsUpdatePage

func (web *WebController) ProjectDetailsUpdatePage(c *gin.Context)

func (*WebController) ProjectsPage

func (web *WebController) ProjectsPage(c *gin.Context)

func (*WebController) ReposPage

func (web *WebController) ReposPage(c *gin.Context)

func (*WebController) RunDetailsPage

func (web *WebController) RunDetailsPage(c *gin.Context)

func (*WebController) RunsPage

func (web *WebController) RunsPage(c *gin.Context)

Jump to

Keyboard shortcuts

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