code

package
v0.0.0-...-7d3b672 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPEN   = "OPEN"
	CLOSED = "CLOSED"
	MERGED = "MERGED"
)
View Source
const (
	NORMAL_COMMENT = "NORMAL"
	DIFF_COMMENT   = "DIFF"
	REVIEW         = "REVIEW"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	common.NoPKModel
	Sha            string `json:"sha" gorm:"primaryKey;type:varchar(40);comment:commit hash"`
	Additions      int    `json:"additions" gorm:"comment:Added lines of code"`
	Deletions      int    `json:"deletions" gorm:"comment:Deleted lines of code"`
	DevEq          int    `json:"deveq" gorm:"comment:Merico developer equivalent from analysis engine"`
	Message        string
	AuthorName     string `gorm:"type:varchar(160)"`
	AuthorEmail    string `gorm:"type:varchar(160)"`
	AuthoredDate   time.Time
	AuthorId       string `gorm:"type:varchar(160)"`
	CommitterName  string `gorm:"type:varchar(160)"`
	CommitterEmail string `gorm:"type:varchar(160)"`
	CommittedDate  time.Time
	CommitterId    string `gorm:"index;type:varchar(160)"`
}

func (Commit) TableName

func (Commit) TableName() string

type CommitFile

type CommitFile struct {
	domainlayer.DomainEntity
	CommitSha string `gorm:"index;type:varchar(40)"`
	FilePath  string `gorm:"type:text"`
	Additions int
	Deletions int
}

func (CommitFile) TableName

func (CommitFile) TableName() string

type CommitFileComponent

type CommitFileComponent struct {
	common.NoPKModel
	CommitFileId  string `gorm:"primaryKey;type:varchar(160)"`
	ComponentName string `gorm:"type:varchar(160)"`
}

func (CommitFileComponent) TableName

func (CommitFileComponent) TableName() string

type CommitLineChange

type CommitLineChange struct {
	domainlayer.DomainEntity
	Id          string `gorm:"type:varchar(160);primaryKey"`
	CommitSha   string `gorm:"type:varchar(40);"`
	NewFilePath string `gorm:"type:varchar(160);"`
	LineNoNew   int    `gorm:"type:int"`
	LineNoOld   int    `gorm:"type:int"`
	OldFilePath string `gorm:"type:varchar(160)"`
	HunkNum     int    `gorm:"type:int"`
	ChangedType string `gorm:"type:varchar(160)"`
	PrevCommit  string `gorm:"type:varchar(160)"`
}

func (CommitLineChange) TableName

func (CommitLineChange) TableName() string

type CommitParent

type CommitParent struct {
	common.NoPKModel
	CommitSha       string `json:"commitSha" gorm:"primaryKey;type:varchar(40);comment:commit hash"`
	ParentCommitSha string `json:"parentCommitSha" gorm:"primaryKey;type:varchar(40);comment:parent commit hash"`
}

func (CommitParent) TableName

func (CommitParent) TableName() string

type CommitsDiff

type CommitsDiff struct {
	NewCommitSha string `gorm:"primaryKey;type:varchar(40)"`
	OldCommitSha string `gorm:"primaryKey;type:varchar(40)"`
	CommitSha    string `gorm:"primaryKey;type:varchar(40)"`
	SortingIndex int
}

func (CommitsDiff) TableName

func (CommitsDiff) TableName() string

type Component

type Component struct {
	RepoId    string `gorm:"type:varchar(255)"`
	Name      string `gorm:"primaryKey;type:varchar(255)"`
	PathRegex string `gorm:"type:varchar(255)"`
}

func (Component) TableName

func (Component) TableName() string

type PullRequest

type PullRequest struct {
	domainlayer.DomainEntity
	BaseRepoId     string `gorm:"index"`
	HeadRepoId     string `gorm:"index"`
	Status         string `gorm:"type:varchar(100);comment:open/closed or other"`
	OriginalStatus string `gorm:"type:varchar(100)"`
	Title          string
	Description    string
	Url            string `gorm:"type:varchar(255)"`
	AuthorName     string `gorm:"type:varchar(100)"`
	//User		   domainUser.User `gorm:"foreignKey:AuthorId"`
	AuthorId       string `gorm:"type:varchar(100)"`
	ParentPrId     string `gorm:"index;type:varchar(100)"`
	PullRequestKey int
	CreatedDate    time.Time
	MergedDate     *time.Time
	ClosedDate     *time.Time
	Type           string `gorm:"type:varchar(100)"`
	Component      string `gorm:"type:varchar(100)"`
	MergeCommitSha string `gorm:"type:varchar(40)"`
	HeadRef        string `gorm:"type:varchar(255)"`
	BaseRef        string `gorm:"type:varchar(255)"`
	BaseCommitSha  string `gorm:"type:varchar(40)"`
	HeadCommitSha  string `gorm:"type:varchar(40)"`
}

func (PullRequest) TableName

func (PullRequest) TableName() string

type PullRequestComment

type PullRequestComment struct {
	domainlayer.DomainEntity
	PullRequestId string `gorm:"index;varchar(255)"`
	Body          string
	AccountId     string `gorm:"type:varchar(255)"`
	CreatedDate   time.Time
	CommitSha     string `gorm:"type:varchar(255)"`
	Position      int
	Type          string `gorm:"type:varchar(255)"`
	ReviewId      string `gorm:"type:varchar(255)"`
	Status        string `gorm:"type:varchar(255)"`
}

func (PullRequestComment) TableName

func (PullRequestComment) TableName() string

type PullRequestCommit

type PullRequestCommit struct {
	CommitSha          string `gorm:"primaryKey;type:varchar(40)"`
	PullRequestId      string `json:"id" gorm:"primaryKey;type:varchar(255);comment:This key is generated based on details from the original plugin"` // format: <Plugin>:<Entity>:<PK0>:<PK1>
	CommitAuthorName   string `gorm:"type:varchar(255)"`
	CommitAuthorEmail  string `gorm:"type:varchar(255)"`
	CommitAuthoredDate time.Time
	common.NoPKModel
}

func (PullRequestCommit) TableName

func (PullRequestCommit) TableName() string

type PullRequestLabel

type PullRequestLabel struct {
	PullRequestId string `json:"id" gorm:"primaryKey;type:varchar(255);comment:This key is generated based on details from the original plugin"` // format: <Plugin>:<Entity>:<PK0>:<PK1>
	LabelName     string `gorm:"primaryKey;type:varchar(255)"`
	common.NoPKModel
}

func (PullRequestLabel) TableName

func (PullRequestLabel) TableName() string

type Ref

type Ref struct {
	domainlayer.DomainEntity
	RepoId      string `gorm:"type:varchar(255)"`
	Name        string `gorm:"type:varchar(255)"`
	CommitSha   string `gorm:"type:varchar(40)"`
	IsDefault   bool
	RefType     string `gorm:"type:varchar(255)"`
	CreatedDate *time.Time
}

func (Ref) TableName

func (Ref) TableName() string

type RefCommit

type RefCommit struct {
	NewRefId     string `gorm:"primaryKey;type:varchar(255)"`
	OldRefId     string `gorm:"primaryKey;type:varchar(255)"`
	NewCommitSha string `gorm:"type:varchar(40)"`
	OldCommitSha string `gorm:"type:varchar(40)"`
}

func (RefCommit) TableName

func (RefCommit) TableName() string

type RefsPrCherrypick

type RefsPrCherrypick struct {
	RepoName               string `gorm:"type:varchar(255)"`
	ParentPrKey            int
	CherrypickBaseBranches string `gorm:"type:varchar(255)"`
	CherrypickPrKeys       string `gorm:"type:varchar(255)"`
	ParentPrUrl            string `gorm:"type:varchar(255)"`
	ParentPrId             string `` // format: <Plugin>:<Entity>:<PK0>:<PK1>
	/* 127-byte string literal not displayed */
	common.NoPKModel
}

multi pk

func (RefsPrCherrypick) TableName

func (RefsPrCherrypick) TableName() string

type Repo

type Repo struct {
	domainlayer.DomainEntity
	Name        string     `json:"name"`
	Url         string     `json:"url"`
	Description string     `json:"description"`
	OwnerId     string     `json:"ownerId" gorm:"type:varchar(255)"`
	Language    string     `json:"language" gorm:"type:varchar(255)"`
	ForkedFrom  string     `json:"forkedFrom"`
	CreatedDate *time.Time `json:"createdDate"`
	UpdatedDate *time.Time `json:"updatedDate"`
	Deleted     bool       `json:"deleted"`
}

func NewRepo

func NewRepo(id string, name string) *Repo

func (*Repo) ScopeId

func (r *Repo) ScopeId() string

func (*Repo) ScopeName

func (r *Repo) ScopeName() string

func (Repo) TableName

func (Repo) TableName() string

type RepoCommit

type RepoCommit struct {
	RepoId    string `json:"repoId" gorm:"primaryKey;type:varchar(255)"`
	CommitSha string `json:"commitSha" gorm:"primaryKey;type:varchar(40)"`
	common.NoPKModel
}

func (RepoCommit) TableName

func (RepoCommit) TableName() string

type RepoLanguage

type RepoLanguage struct {
	RepoId   string `json:"repoId" gorm:"index;type:varchar(255)"`
	Language string `json:"language" gorm:"type:varchar(255)"`
	Bytes    int
}

func (RepoLanguage) TableName

func (RepoLanguage) TableName() string

type RepoSnapshot

type RepoSnapshot struct {
	common.NoPKModel
	RepoId    string `gorm:"primaryKey;type:varchar(160)"`
	CommitSha string `gorm:"primaryKey;type:varchar(40);"`
	FilePath  string `gorm:"primaryKey;type:varchar(160);"`
	LineNo    int    `gorm:"primaryKey;type:int;"`
}

func (RepoSnapshot) TableName

func (RepoSnapshot) TableName() string

Jump to

Keyboard shortcuts

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