models

package
v0.14.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubAccount added in v0.12.0

type GithubAccount struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	Id           int    `json:"id" gorm:"primaryKey;autoIncrement:false"`
	Login        string `json:"login" gorm:"type:varchar(255)"`
	Name         string `json:"name" gorm:"type:varchar(255)"`
	Company      string `json:"company" gorm:"type:varchar(255)"`
	Email        string `json:"Email" gorm:"type:varchar(255)"`
	AvatarUrl    string `json:"avatar_url" gorm:"type:varchar(255)"`
	Url          string `json:"url" gorm:"type:varchar(255)"`
	HtmlUrl      string `json:"html_url" gorm:"type:varchar(255)"`
	Type         string `json:"type" gorm:"type:varchar(255)"`
	common.NoPKModel
}

func (GithubAccount) TableName added in v0.12.0

func (GithubAccount) TableName() string

type GithubAccountOrg added in v0.12.0

type GithubAccountOrg struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	AccountId    int    `gorm:"primaryKey;autoIncrement:false"`
	OrgId        int    `gorm:"primaryKey;autoIncrement:false"`
	OrgLogin     string `json:"org_login" gorm:"type:varchar(255)"`
	common.NoPKModel
}

func (GithubAccountOrg) TableName added in v0.12.0

func (GithubAccountOrg) TableName() string

type GithubCommit

type GithubCommit struct {
	Sha            string `gorm:"primaryKey;type:varchar(40)"`
	AuthorId       int
	AuthorName     string `gorm:"type:varchar(255)"`
	AuthorEmail    string `gorm:"type:varchar(255)"`
	AuthoredDate   time.Time
	CommitterId    int
	CommitterName  string `gorm:"type:varchar(255)"`
	CommitterEmail string `gorm:"type:varchar(255)"`
	CommittedDate  time.Time
	Message        string
	Url            string `gorm:"type:varchar(255)"`
	Additions      int    `gorm:"comment:Added lines of code"`
	Deletions      int    `gorm:"comment:Deleted lines of code"`
	common.NoPKModel
}

func (GithubCommit) TableName

func (GithubCommit) TableName() string

type GithubCommitStat

type GithubCommitStat struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	Sha          string `gorm:"primaryKey;type:varchar(40)"`
	Additions    int    `gorm:"comment:Added lines of code"`
	Deletions    int    `gorm:"comment:Deleted lines of code"`

	CommittedDate time.Time `gorm:"index"`
	common.NoPKModel
}

func (GithubCommitStat) TableName

func (GithubCommitStat) TableName() string

type GithubConnection

type GithubConnection struct {
	helper.RestConnection `mapstructure:",squash"`
	helper.AccessToken    `mapstructure:",squash"`
}

func (GithubConnection) TableName added in v0.12.0

func (GithubConnection) TableName() string

type GithubIssue

type GithubIssue struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	RepoId          int    `gorm:"index"`
	Number          int    `gorm:"index;comment:Used in API requests ex. api/repo/1/issue/<THIS_NUMBER>"`
	State           string `gorm:"type:varchar(255)"`
	Title           string
	Body            string
	Priority        string `gorm:"type:varchar(255)"`
	Type            string `gorm:"type:varchar(100)"`
	Status          string `gorm:"type:varchar(255)"`
	AuthorId        int
	AuthorName      string `gorm:"type:varchar(255)"`
	AssigneeId      int
	AssigneeName    string `gorm:"type:varchar(255)"`
	MilestoneId     int    `gorm:"index"`
	LeadTimeMinutes uint
	Url             string `gorm:"type:varchar(255)"`
	ClosedAt        *time.Time
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	Severity        string    `gorm:"type:varchar(255)"`
	Component       string    `gorm:"type:varchar(255)"`
	common.NoPKModel
}

func (GithubIssue) TableName

func (GithubIssue) TableName() string

type GithubIssueComment

type GithubIssueComment struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	IssueId         int    `gorm:"index;comment:References the Issue"`
	Body            string
	AuthorUsername  string `gorm:"type:varchar(255)"`
	AuthorUserId    int
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	common.NoPKModel
}

func (GithubIssueComment) TableName

func (GithubIssueComment) TableName() string

type GithubIssueEvent

type GithubIssueEvent struct {
	ConnectionId    uint64    `gorm:"primaryKey"`
	GithubId        int       `gorm:"primaryKey"`
	IssueId         int       `gorm:"index;comment:References the Issue"`
	Type            string    `gorm:"type:varchar(255);comment:Events that can occur to an issue, ex. assigned, closed, labeled, etc."`
	AuthorUsername  string    `gorm:"type:varchar(255)"`
	GithubCreatedAt time.Time `gorm:"index"`
	common.NoPKModel
}

func (GithubIssueEvent) TableName

func (GithubIssueEvent) TableName() string

type GithubIssueLabel

type GithubIssueLabel struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	IssueId      int    `gorm:"primaryKey;autoIncrement:false"`
	LabelName    string `gorm:"primaryKey;type:varchar(255)"`
	common.NoPKModel
}

func (GithubIssueLabel) TableName

func (GithubIssueLabel) TableName() string

type GithubJob added in v0.13.0

type GithubJob struct {
	common.NoPKModel
	ConnectionId  uint64         `gorm:"primaryKey"`
	RepoId        int            `gorm:"primaryKey"`
	ID            int            `json:"id" gorm:"primaryKey;autoIncrement:false"`
	RunID         int            `json:"run_id"`
	RunURL        string         `json:"run_url" gorm:"type:varchar(255)"`
	NodeID        string         `json:"node_id" gorm:"type:varchar(255)"`
	HeadSha       string         `json:"head_sha" gorm:"type:varchar(255)"`
	URL           string         `json:"url" gorm:"type:varchar(255)"`
	HTMLURL       string         `json:"html_url" gorm:"type:varchar(255)"`
	Status        string         `json:"status" gorm:"type:varchar(255)"`
	Conclusion    string         `json:"conclusion" gorm:"type:varchar(255)"`
	StartedAt     *time.Time     `json:"started_at"`
	CompletedAt   *time.Time     `json:"completed_at"`
	Name          string         `json:"name" gorm:"type:varchar(255)"`
	Steps         datatypes.JSON `json:"steps"`
	CheckRunURL   string         `json:"check_run_url" gorm:"type:varchar(255)"`
	Labels        datatypes.JSON `json:"labels"`
	RunnerID      int            `json:"runner_id"`
	RunnerName    string         `json:"runner_name" gorm:"type:varchar(255)"`
	RunnerGroupID int            `json:"runner_group_id"`
	Type          string         `json:"type" gorm:"type:varchar(255)"`
}

func (GithubJob) TableName added in v0.13.0

func (GithubJob) TableName() string

type GithubMilestone added in v0.12.0

type GithubMilestone struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	MilestoneId  int    `gorm:"primaryKey;autoIncrement:false"`
	RepoId       int
	Number       int
	URL          string
	Title        string
	OpenIssues   int
	ClosedIssues int
	State        string
	CreatedAt    time.Time
	UpdatedAt    time.Time
	ClosedAt     *time.Time
	common.NoPKModel
}

func (GithubMilestone) TableName added in v0.12.0

func (GithubMilestone) TableName() string

type GithubPrComment added in v0.12.0

type GithubPrComment struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	PullRequestId   int    `gorm:"index"`
	Body            string
	AuthorUsername  string `gorm:"type:varchar(255)"`
	AuthorUserId    int
	CommitSha       string `gorm:"type:varchar(255)"`
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	ReviewId        int
	Type            string `gorm:"index;type:varchar(255)"`
	common.NoPKModel
}

func (GithubPrComment) TableName added in v0.12.0

func (GithubPrComment) TableName() string

type GithubPrCommit added in v0.12.0

type GithubPrCommit struct {
	ConnectionId  uint64 `gorm:"primaryKey"`
	CommitSha     string `gorm:"primaryKey;type:varchar(40)"`
	PullRequestId int    `gorm:"primaryKey;autoIncrement:false"`
	common.NoPKModel
}

func (GithubPrCommit) TableName added in v0.12.0

func (GithubPrCommit) TableName() string

type GithubPrIssue added in v0.12.0

type GithubPrIssue struct {
	ConnectionId      uint64 `gorm:"primaryKey"`
	PullRequestId     int    `gorm:"primaryKey"`
	IssueId           int    `gorm:"primaryKey"`
	PullRequestNumber int
	IssueNumber       int
	common.NoPKModel
}

func (GithubPrIssue) TableName added in v0.12.0

func (GithubPrIssue) TableName() string

type GithubPrLabel added in v0.12.0

type GithubPrLabel struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	PullId       int    `gorm:"primaryKey;autoIncrement:false"`
	LabelName    string `gorm:"primaryKey;type:varchar(255)"`
	common.NoPKModel
}

func (GithubPrLabel) TableName added in v0.12.0

func (GithubPrLabel) TableName() string

type GithubPrReview added in v0.12.0

type GithubPrReview struct {
	ConnectionId   uint64 `gorm:"primaryKey"`
	GithubId       int    `gorm:"primaryKey"`
	PullRequestId  int    `gorm:"index"`
	Body           string
	AuthorUsername string `gorm:"type:varchar(255)"`
	AuthorUserId   int
	CommitSha      string
	GithubSubmitAt *time.Time
	State          string
	common.NoPKModel
}

func (GithubPrReview) TableName added in v0.12.0

func (GithubPrReview) TableName() string

type GithubPullRequest

type GithubPullRequest struct {
	ConnectionId    uint64 `gorm:"primaryKey"`
	GithubId        int    `gorm:"primaryKey"`
	RepoId          int    `gorm:"index"`
	HeadRepoId      int
	Number          int    `gorm:"index"` // This number is used in GET requests to the API associated to reviewers / comments / etc.
	State           string `gorm:"type:varchar(255)"`
	Title           string
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	ClosedAt        *time.Time
	// In order to get the following fields, we need to collect PRs individually from GitHub
	Additions      int
	Deletions      int
	Comments       int
	Commits        int
	ReviewComments int
	Merged         bool
	MergedAt       *time.Time
	Body           string
	Type           string `gorm:"type:varchar(255)"`
	Component      string `gorm:"type:varchar(255)"`
	MergeCommitSha string `gorm:"type:varchar(40)"`
	HeadRef        string `gorm:"type:varchar(255)"`
	BaseRef        string `gorm:"type:varchar(255)"`
	BaseCommitSha  string `gorm:"type:varchar(255)"`
	HeadCommitSha  string `gorm:"type:varchar(255)"`
	Url            string `gorm:"type:varchar(255)"`
	AuthorName     string `gorm:"type:varchar(100)"`
	AuthorId       int
	common.NoPKModel
}

func (GithubPullRequest) TableName

func (GithubPullRequest) TableName() string

type GithubRepo

type GithubRepo struct {
	ConnectionId   uint64 `gorm:"primaryKey"`
	GithubId       int    `gorm:"primaryKey"`
	Name           string `gorm:"type:varchar(255)"`
	HTMLUrl        string `gorm:"type:varchar(255)"`
	Description    string
	OwnerId        int        `json:"ownerId"`
	OwnerLogin     string     `json:"ownerLogin" gorm:"type:varchar(255)"`
	Language       string     `json:"language" gorm:"type:varchar(255)"`
	ParentGithubId int        `json:"parentId"`
	ParentHTMLUrl  string     `json:"parentHtmlUrl"`
	CreatedDate    time.Time  `json:"createdDate"`
	UpdatedDate    *time.Time `json:"updatedDate"`
	common.NoPKModel
}

func (GithubRepo) TableName

func (GithubRepo) TableName() string

type GithubRepoAccount added in v0.12.0

type GithubRepoAccount struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	AccountId    int    `gorm:"primaryKey;autoIncrement:false"`
	RepoGithubId int    `gorm:"primaryKey;autoIncrement:false"`
	Login        string `json:"login" gorm:"type:varchar(255)"`
	common.NoPKModel
}

func (GithubRepoAccount) TableName added in v0.12.0

func (GithubRepoAccount) TableName() string

type GithubRepoCommit

type GithubRepoCommit struct {
	ConnectionId uint64 `gorm:"primaryKey"`
	RepoId       int    `gorm:"primaryKey"`
	CommitSha    string `gorm:"primaryKey;type:varchar(40)"`
	common.NoPKModel
}

func (GithubRepoCommit) TableName

func (GithubRepoCommit) TableName() string

type GithubReviewer

type GithubReviewer struct {
	ConnectionId  uint64 `gorm:"primaryKey"`
	GithubId      int    `gorm:"primaryKey"`
	Login         string `gorm:"type:varchar(255)"`
	PullRequestId int    `gorm:"primaryKey"`

	common.NoPKModel
}

func (GithubReviewer) TableName

func (GithubReviewer) TableName() string

type GithubRun added in v0.13.0

type GithubRun struct {
	common.NoPKModel
	ConnectionId     uint64     `gorm:"primaryKey"`
	RepoId           int        `gorm:"primaryKey"`
	ID               int        `json:"id" gorm:"primaryKey;autoIncrement:false"`
	Name             string     `json:"name" gorm:"type:varchar(255)"`
	NodeID           string     `json:"node_id" gorm:"type:varchar(255)"`
	HeadBranch       string     `json:"head_branch" gorm:"type:varchar(255)"`
	HeadSha          string     `json:"head_sha" gorm:"type:varchar(255)"`
	Path             string     `json:"path" gorm:"type:varchar(255)"`
	RunNumber        int        `json:"run_number"`
	Event            string     `json:"event" gorm:"type:varchar(255)"`
	Status           string     `json:"status" gorm:"type:varchar(255)"`
	Conclusion       string     `json:"conclusion" gorm:"type:varchar(255)"`
	WorkflowID       int        `json:"workflow_id"`
	CheckSuiteID     int64      `json:"check_suite_id"`
	CheckSuiteNodeID string     `json:"check_suite_node_id" gorm:"type:varchar(255)"`
	URL              string     `json:"url" gorm:"type:varchar(255)"`
	HTMLURL          string     `json:"html_url" gorm:"type:varchar(255)"`
	GithubCreatedAt  *time.Time `json:"created_at"`
	GithubUpdatedAt  *time.Time `json:"updated_at"`
	RunAttempt       int        `json:"run_attempt"`
	RunStartedAt     *time.Time `json:"run_started_at"`
	JobsURL          string     `json:"jobs_url" gorm:"type:varchar(255)"`
	LogsURL          string     `json:"logs_url" gorm:"type:varchar(255)"`
	CheckSuiteURL    string     `json:"check_suite_url" gorm:"type:varchar(255)"`
	ArtifactsURL     string     `json:"artifacts_url" gorm:"type:varchar(255)"`
	CancelURL        string     `json:"cancel_url" gorm:"type:varchar(255)"`
	RerunURL         string     `json:"rerun_url" gorm:"type:varchar(255)"`
	WorkflowURL      string     `json:"workflow_url" gorm:"type:varchar(255)"`
	Type             string     `json:"type" gorm:"type:varchar(255)"`
}

func (GithubRun) TableName added in v0.13.0

func (GithubRun) TableName() string

type GithubUserOfToken added in v0.12.0

type GithubUserOfToken struct {
	Login string `json:"login"`
}

Using GithubUserOfToken because it requires authentication, and it is public information anyway.

type TestConnectionRequest

type TestConnectionRequest struct {
	Endpoint string `json:"endpoint" validate:"required,url"`
	Token    string `json:"token" validate:"required"`
	Proxy    string `json:"proxy"`
}

type TransformationRules added in v0.12.0

type TransformationRules struct {
	PrType               string `mapstructure:"prType" json:"prType"`
	PrComponent          string `mapstructure:"prComponent" json:"prComponent"`
	PrBodyClosePattern   string `mapstructure:"prBodyClosePattern" json:"prBodyClosePattern"`
	IssueSeverity        string `mapstructure:"issueSeverity" json:"issueSeverity"`
	IssuePriority        string `mapstructure:"issuePriority" json:"issuePriority"`
	IssueComponent       string `mapstructure:"issueComponent" json:"issueComponent"`
	IssueTypeBug         string `mapstructure:"issueTypeBug" json:"issueTypeBug"`
	IssueTypeIncident    string `mapstructure:"issueTypeIncident" json:"issueTypeIncident"`
	IssueTypeRequirement string `mapstructure:"issueTypeRequirement" json:"issueTypeRequirement"`
	DeploymentPattern    string `mapstructure:"deploymentPattern" json:"deploymentPattern"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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