models

package
v0.10.0-test3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubCommit

type GithubCommit struct {
	Sha            string `gorm:"primaryKey;type:char(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 added in v0.10.0

func (GithubCommit) TableName() string

type GithubCommitStat added in v0.10.0

type GithubCommitStat struct {
	Sha       string `gorm:"primaryKey;type:char(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 added in v0.10.0

func (GithubCommitStat) TableName() string

type GithubIssue

type GithubIssue struct {
	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)"`
	AssigneeId      int
	AssigneeName    string `gorm:"type:varchar(255)"`
	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 added in v0.10.0

func (GithubIssue) TableName() string

type GithubIssueComment added in v0.3.0

type GithubIssueComment struct {
	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 added in v0.10.0

func (GithubIssueComment) TableName() string

type GithubIssueEvent added in v0.3.0

type GithubIssueEvent struct {
	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 added in v0.10.0

func (GithubIssueEvent) TableName() string

type GithubIssueLabel added in v0.3.0

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

func (GithubIssueLabel) TableName added in v0.10.0

func (GithubIssueLabel) TableName() string

type GithubPullRequest

type GithubPullRequest struct {
	GithubId        int    `gorm:"primaryKey"`
	RepoId          int    `gorm:"index"`
	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 `gorm:"type:varchar(255)"`
	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:char(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:char(255)"`
	AuthorName     string `gorm:"type:char(100)"`
	AuthorId       int
	common.NoPKModel
}

func (GithubPullRequest) TableName added in v0.10.0

func (GithubPullRequest) TableName() string

type GithubPullRequestComment

type GithubPullRequestComment struct {
	GithubId        int `gorm:"primaryKey"`
	PullRequestId   int `gorm:"index"`
	Body            string
	AuthorUsername  string `gorm:"type:varchar(255)"`
	AuthorUserId    int
	GithubCreatedAt time.Time
	GithubUpdatedAt time.Time `gorm:"index"`
	common.NoPKModel
}

func (GithubPullRequestComment) TableName added in v0.10.0

func (GithubPullRequestComment) TableName() string

type GithubPullRequestCommit

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

func (GithubPullRequestCommit) TableName added in v0.10.0

func (GithubPullRequestCommit) TableName() string

type GithubPullRequestIssue added in v0.9.0

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

func (GithubPullRequestIssue) TableName added in v0.10.0

func (GithubPullRequestIssue) TableName() string

type GithubPullRequestLabel

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

func (GithubPullRequestLabel) TableName added in v0.10.0

func (GithubPullRequestLabel) TableName() string

type GithubRepo added in v0.7.0

type GithubRepo struct {
	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 added in v0.10.0

func (GithubRepo) TableName() string

type GithubRepoCommit added in v0.6.0

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

func (GithubRepoCommit) TableName added in v0.10.0

func (GithubRepoCommit) TableName() string

type GithubReviewer

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

	common.NoPKModel
}

func (GithubReviewer) TableName added in v0.10.0

func (GithubReviewer) TableName() string

type GithubUser added in v0.6.0

type GithubUser struct {
	Id        int    `json:"id" gorm:"primaryKey"`
	Login     string `json:"login" 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 (GithubUser) TableName added in v0.10.0

func (GithubUser) TableName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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