Documentation ¶
Index ¶
- func DecodePullRequest(pr *PullRequest) *database.PullRequest
- func DecodePullRequestReview(prReview *PullRequestReview) *database.PullRequestReview
- func DisableLog()
- func New(host, rootCert, cert, key string) (*cockroachdb, error)
- func UseLogger(logger slog.Logger)
- type Commit
- type MatchingReviews
- type PullRequest
- type PullRequestReview
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePullRequest ¶
func DecodePullRequest(pr *PullRequest) *database.PullRequest
DecodePullRequest decodes a cockroachdb PullRequest into a generic database.PullRequest
func DecodePullRequestReview ¶
func DecodePullRequestReview(prReview *PullRequestReview) *database.PullRequestReview
DecodePullRequestReview decodes a cockroachdb PullRequestReview into a generic database.PullRequestReview
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
Types ¶
type Commit ¶
type Commit struct { SHA string `gorm:"primary_key"` Repo string `gorm:"repo"` Organization string `gorm:"organization"` Date int64 `gorm:"not null"` Author string `gorm:"not null"` Committer string `gorm:"not null"` Message string `gorm:"not null"` URL string `gorm:"not null"` ParentSHA string `gorm:"not null"` ParentURL string `gorm:"not null"` Additions int `gorm:"not null"` Deletions int `gorm:"not null"` }
type MatchingReviews ¶
type MatchingReviews struct { PullRequestURL string ID int64 Author string State string SubmittedAt int64 CommitID string Repo string Number int Additions int Deletions int }
MatchingReviews is a struct that will return results from a review request.
type PullRequest ¶
type PullRequest struct { ID string `gorm:"primary_key"` Repo string `gorm:"not null"` Organization string `gorm:"not null"` URL string `gorm:"not null"` Number int `gorm:"not null"` Author string `gorm:"not null"` UpdatedAt int64 `gorm:"not null"` ClosedAt int64 `gorm:"not null"` MergedAt int64 `gorm:"not null"` Merged bool `gorm:"not null"` State string `gorm:"not null"` Additions int `gorm:"not null"` Deletions int `gorm:"not null"` MergedBy string `gorm:"not null"` }
PullRequest table has all of the information for a given PullRequest, this also includes its commits and reviews.
func EncodePullRequest ¶
func EncodePullRequest(dbPullRequest *database.PullRequest) PullRequest
EncodePullRequest encodes a database.PullRequest into a cockroachdb PullRequest.
func (PullRequest) TableName ¶
func (PullRequest) TableName() string
TableName returns the table name of the pull requests table.
type PullRequestReview ¶
type PullRequestReview struct { PullRequestURL string `gorm:"not null"` ID int64 `gorm:"primary_key"` Author string `gorm:"not null"` State string `gorm:"not null"` SubmittedAt int64 `gorm:"not null"` CommitID string `gorm:"not null"` Repo string `gorm:"not null"` Number int `gorm:"not null"` }
PullRequestReview contains all of the information about reviews of a given pull request.
func EncodePullRequestReview ¶
func EncodePullRequestReview(dbPullRequestReview *database.PullRequestReview) PullRequestReview
EncodePullRequestReview encodes a database.PullRequestReview into a cockroachdb PullRequestReview.
func (PullRequestReview) TableName ¶
func (PullRequestReview) TableName() string
TableName returns the table name of the pull requests review table.