repo

package
v0.0.0-...-9b06841 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Repo

type Repo struct {
	DataId                  int64        `db:"data_id"`                    // Generated Primary Key, Must Not Be Changed
	Id                      int64        `db:"id"`                         // Unique GitHub Repository ID
	Name                    string       `db:"name"`                       // Repository Name
	StarCount               int64        `db:"star_count"`                 // Number Of Stars
	ForkCount               int64        `db:"fork_count"`                 // Number Of Forks
	IssueCount              int64        `db:"issue_count"`                // Number Of Open Issues
	CommitCount             int64        `db:"commit_count"`               // Number Of Commits
	PrCount                 int64        `db:"pr_count"`                   // Total Pull Requests Count
	Language                string       `db:"language"`                   // Programming Languages Used (JSON Format)
	Description             string       `db:"description"`                // Repository Description
	LastFetchForkAt         int64        `db:"last_fetch_fork_at"`         // Unix Timestamp Of Last Fork Data Fetch
	LastFetchContributionAt int64        `db:"last_fetch_contribution_at"` // Unix Timestamp Of Last Contribution Data Fetch
	MergedPrCount           int64        `db:"merged_pr_count"`            // Count Of Merged Pull Requests
	OpenPrCount             int64        `db:"open_pr_count"`              // Count Of Open Pull Requests
	CommentCount            int64        `db:"comment_count"`              // Total Comments Count
	ReviewCount             int64        `db:"review_count"`               // Code Reviews Count
	CreatedAt               time.Time    `db:"created_at"`
	UpdatedAt               time.Time    `db:"updated_at"` // update data time
	DeletedAt               sql.NullTime `db:"deleted_at"`
}

type RepoModel

type RepoModel interface {
	CreateDataId() (int64, error)
	// contains filtered or unexported methods
}

RepoModel is an interface to be customized, add more methods here, and implement the added methods in customRepoModel.

func NewRepoModel

func NewRepoModel(conn sqlx.SqlConn, c cache.CacheConf, DatancenterId, WorkerId int64, opts ...cache.Option) RepoModel

NewRepoModel returns a model for the database table.

Jump to

Keyboard shortcuts

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