constants

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: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CategoryIssue            = "OpenIssue"
	CategoryOpenPullRequest  = "OpenPullRequest"
	CategoryComment          = "Comment"
	CategoryReview           = "Review"
	CategoryMergePullRequest = "MergePullRequest"
)
View Source
const (
	RoleAuthor    = "author"
	RoleCommenter = "commenter"
	RoleReviewer  = "reviewed-by"
)
View Source
const (
	SearchSort  = "updated"
	SearchOrder = "desc"
)
View Source
const (
	LockKeyPrefix = "lock"
	LockSeparator = "|"
)
View Source
const (
	LockDeveloper = "lock_developer"

	LockRepo = "lock_repo"

	LockCreatedRepo = "lock_created_repo"
	LockStarredRepo = "lock_starred_repo"

	LockFollowing = "lock_following"
	LockFollower  = "lock_follower"

	LockIssuePROfUser = "lock_issue_pr_of_user"
	LockCommentOfUser = "lock_comment_of_user"
	LockReviewOfUser  = "lock_review_of_user"

	LockLanguage = "lock_language"
	LockNation   = "lock_nation"
	LockScore    = "lock_score"
	LockSummary  = "lock_summary"
)
View Source
const (
	BlockDeveloper = "block_developer"

	BlockRepo = "block_repo"

	BlockCreatedRepo = "block_created_repo"
	BlockStarredRepo = "block_starred_repo"

	BlockFollowing = "block_following"
	BlockFollower  = "block_follower"

	BlockIssuePROfUser = "block_issue_pr_of_user"
	BlockCommentOfUser = "block_comment_of_user"
	BlockReviewOfUser  = "block_review_of_user"
)
View Source
const (
	ScoreRepoStar    float64 = 0.01
	ScoreRepoFork    float64 = 0.03
	ScoreRepoCommit  float64 = 0.1
	ScoreRepoComment float64 = 1
	ScoreRepoIssue   float64 = 2
	ScoreRepoOpenPR  float64 = 3
	ScoreRepoReview  float64 = 4
	ScoreRepoMergePR float64 = 5
)
View Source
const (
	ScoreContributionComment float64 = 1
	ScoreContributionIssue   float64 = 2
	ScoreContributionOpenPR  float64 = 3
	ScoreContributionReview  float64 = 4
	ScoreContributionMergePR float64 = 5
)
View Source
const (
	ScoreStarred  float64 = 0.01
	ScoreFollower float64 = 0.1
)
View Source
const (
	APITaskExpireTime = time.Minute * 10
	APIMaxRetry       = 10
	APIRetryDelay     = time.Second * 10
	APIConcurrency    = 20
)

------ APITask ------

View Source
const (
	APITaskName  = "api"
	APITaskQueue = "api"
)
View Source
const (
	APIGetLanguage int = iota
	APIGetScore
	APIGetNation
	APIGetSummary
)
View Source
const (
	FetchExpireTime  = time.Minute * 5
	FetchMaxRetry    = 3
	FetchRetryDelay  = time.Second * 5
	FetchConcurrency = 20
)

------ FetcherTask ------

View Source
const (
	FetcherTaskName  = "fetch"
	FetcherTaskQueue = "fetch"
)
View Source
const (
	FetchDeveloper int = iota

	FetchRepo

	FetchCreatedRepo

	FetchStarredRepo

	FetchFollowing
	FetchFollower

	FetchIssuePROfUser
	FetchCommentOfUser
	FetchReviewOfUser
)
View Source
const (
	FetchCreatedRepoCompletedDataId int64 = -iota - 1

	FetchStarredRepoCompletedDataId

	FetchFollowingCompletedDataId
	FetchFollowerCompletedDataId

	FetchIssuePROfUserCompletedDataId
	FetchCommentOfUserCompletedDataId
	FetchReviewOfUserCompletedDataId
)
View Source
const (
	ONE_SECOND = time.Second
	ONE_MINUTE = time.Minute
	ONE_HOUR   = time.Hour
	ONE_DAY    = 24 * ONE_HOUR
	ONE_WEEK   = 7 * ONE_DAY

	DataExpiredTime time.Duration = 24 * time.Hour
)
View Source
const (
	DefaultSearchLimit int64 = 150
)
View Source
const (
	LLModelConfidenceWeight = 0.4
)
View Source
const (
	ScoreKey = "score"
)

Key Name

View Source
const TaskSeparator = "|"

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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