Documentation
Index ¶
- Constants
- Variables
- func AccessTokenByNameExists(token *AccessToken) (bool, error)
- func AccessibleRepoIDsQuery(user *User) *builder.Builder
- func ActivateUserEmail(userID int64, email string, primary, activate bool) (err error)
- func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branchName string) error
- func AddEmailAddress(email *EmailAddress) error
- func AddEmailAddresses(emails []*EmailAddress) error
- func AddOrgUser(orgID, uid int64) error
- func AddReleaseAttachments(releaseID int64, attachmentUUIDs []string) (err error)
- func AddTeamMember(team *Team, userID int64) error
- func AddUserOpenID(openid *UserOpenID) error
- func AssertCount(t testing.TB, bean interface{}, expected interface{})
- func AssertExistsAndLoadBean(t testing.TB, bean interface{}, conditions ...interface{}) interface{}
- func AssertExistsIf(t *testing.T, expected bool, bean interface{}, conditions ...interface{})
- func AssertInt64InRange(t testing.TB, low, high, value int64)
- func AssertNotExistsBean(t testing.TB, bean interface{}, conditions ...interface{})
- func AssertSuccessfulInsert(t testing.TB, beans ...interface{})
- func AttachmentRelativePath(uuid string) string
- func AvatarLink(email string) string
- func BeanExists(t testing.TB, bean interface{}, conditions ...interface{}) bool
- func BuildLabelNamesIssueIDsCondition(labelNames []string) *builder.Builder
- func CalculateTrustStatus(verification *CommitVerification, repository *Repository, ...) (err error)
- func CanBeAssigned(user *User, repo *Repository, isPull bool) (bool, error)
- func CanCreateOrgRepo(orgID, uid int64) (bool, error)
- func CanMarkConversation(issue *Issue, doer *User) (permResult bool, err error)
- func CancelStopwatch(user *User, issue *Issue) error
- func Cell2Int64(val xorm.Cell) int64
- func ChangeMilestoneAssign(issue *Issue, doer *User, oldMilestoneID int64) (err error)
- func ChangeMilestoneStatus(m *Milestone, isClosed bool) (err error)
- func ChangeMilestoneStatusByRepoIDAndID(repoID, milestoneID int64, isClosed bool) error
- func ChangeOrgUserStatus(orgID, uid int64, public bool) error
- func ChangeProjectAssign(issue *Issue, doer *User, newProjectID int64) error
- func ChangeProjectStatus(p *Project, isClosed bool) error
- func ChangeProjectStatusByRepoIDAndID(repoID, projectID int64, isClosed bool) error
- func ChangeRepositoryName(doer *User, repo *Repository, newRepoName string) (err error)
- func ChangeUserName(u *User, newUserName string) (err error)
- func CheckConsistencyFor(t *testing.T, beansToCheck ...interface{})
- func CheckConsistencyForAll(t *testing.T)
- func CheckCreateRepository(doer, u *User, name string, overwriteOrAdopt bool) error
- func CheckIssueWatch(user *User, issue *Issue) (bool, error)
- func CheckLFSAccessForRepo(u *User, repo *Repository, mode AccessMode) error
- func CheckPrincipalKeyString(user *User, content string) (_ string, err error)
- func CheckPublicKeyString(content string) (_ string, err error)
- func CheckRepoStats(ctx context.Context) error
- func CommentHashTag(id int64) string
- func CommentTypeIsRef(t CommentType) bool
- func ComposeHTTPSCloneURL(owner, repo string) string
- func Cond(query interface{}, args ...interface{}) interface{}
- func ConvertUtf8ToUtf8mb4() error
- func CopyLFS(ctx DBContext, newRepo, oldRepo *Repository) error
- func CopyLanguageStat(originalRepo, destRepo *Repository) error
- func Count(bean interface{}) (int64, error)
- func CountIssues(opts *IssuesOptions) (int64, error)
- func CountIssuesByRepo(opts *IssuesOptions) (map[int64]int64, error)
- func CountLFSLockByRepoID(repoID int64) (int64, error)
- func CountLoginSources() int64
- func CountMilestonesByRepoCond(repoCond builder.Cond, isClosed bool) (map[int64]int64, error)
- func CountNotices() int64
- func CountNullArchivedRepository() (int64, error)
- func CountOrgMembers(opts FindOrgMembersOpts) (int64, error)
- func CountOrganizations() int64
- func CountOrphanedIssues() (int64, error)
- func CountOrphanedLabels() (int64, error)
- func CountOrphanedObjects(subject, refobject, joinCond string) (int64, error)
- func CountRepoClosedMilestones(repoID int64) (int64, error)
- func CountRepositories(private bool) int64
- func CountUnread(user *User) int64
- func CountUserRepositories(userID int64, private bool) int64
- func CountUsers() int64
- func CreateHookTask(t *HookTask) error
- func CreateIssueDependency(user *User, issue, dep *Issue) error
- func CreateLoginSource(source *LoginSource) error
- func CreateNotice(tp NoticeType, desc string, args ...interface{}) error
- func CreateOrStopIssueStopwatch(user *User, issue *Issue) error
- func CreateOrUpdateIssueNotifications(issueID, commentID, notificationAuthorID, receiverID int64) error
- func CreateOrUpdateIssueWatch(userID, issueID int64, isWatching bool) error
- func CreateOrganization(org, owner *User) (err error)
- func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commitSHA string) error
- func CreateRepository(ctx DBContext, doer, u *User, repo *Repository, overwriteOrAdopt bool) (err error)
- func CreateRepositoryNotice(desc string, args ...interface{}) error
- func CreateTask(task *Task) error
- func CreateTemporaryPath(prefix string) (string, error)
- func CreateTestEngine(fixturesDir string) error
- func CreateUser(u *User) (err error)
- func CreateWebhook(w *Webhook) error
- func DeleteAccessTokenByID(id, userID int64) error
- func DeleteAllRecords(tableName string) error
- func DeleteAttachment(a *Attachment, remove bool) error
- func DeleteAttachments(attachments []*Attachment, remove bool) (int, error)
- func DeleteAttachmentsByComment(commentID int64, remove bool) (int, error)
- func DeleteAttachmentsByIssue(issueID int64, remove bool) (int, error)
- func DeleteAttachmentsByRelease(releaseID int64) error
- func DeleteComment(comment *Comment, doer *User) error
- func DeleteCommentReaction(doer *User, issue *Issue, comment *Comment, content string) error
- func DeleteDefaultSystemWebhook(id int64) error
- func DeleteDeployKey(doer *User, id int64) error
- func DeleteEmailAddress(email *EmailAddress) (err error)
- func DeleteEmailAddresses(emails []*EmailAddress) (err error)
- func DeleteGPGKey(doer *User, id int64) (err error)
- func DeleteInactiveUsers(ctx context.Context, olderThan time.Duration) (err error)
- func DeleteIssueLabel(issue *Issue, label *Label, doer *User) (err error)
- func DeleteIssueReaction(doer *User, issue *Issue, content string) error
- func DeleteIssueUserTimes(issue *Issue, user *User) error
- func DeleteLabel(id, labelID int64) error
- func DeleteMilestoneByRepoID(repoID, id int64) error
- func DeleteMirrorByRepoID(repoID int64) error
- func DeleteNotice(id int64) error
- func DeleteNotices(start, end int64) error
- func DeleteNoticesByIDs(ids []int64) error
- func DeleteOAuth2Application(id, userid int64) error
- func DeleteOldRepositoryArchives(ctx context.Context, olderThan time.Duration) error
- func DeleteOrganization(org *User) (err error)
- func DeleteOrphanedIssues() error
- func DeleteOrphanedLabels() error
- func DeleteOrphanedObjects(subject, refobject, joinCond string) error
- func DeleteProjectBoardByID(boardID int64) error
- func DeleteProjectByID(id int64) error
- func DeletePublicKey(doer *User, id int64) (err error)
- func DeleteReaction(opts *ReactionOptions) error
- func DeleteRegistration(reg *U2FRegistration) error
- func DeleteReleaseByID(id int64) error
- func DeleteRepository(doer *User, uid, repoID int64) error
- func DeleteRepositoryArchives(ctx context.Context) error
- func DeleteReview(r *Review) error
- func DeleteSource(source *LoginSource) error
- func DeleteTeam(t *Team) error
- func DeleteTime(t *TrackedTime) error
- func DeleteTwoFactorByID(id, userID int64) error
- func DeleteUploadByUUID(uuid string) error
- func DeleteUploads(uploads ...*Upload) (err error)
- func DeleteUser(u *User) (err error)
- func DeleteUserOpenID(openid *UserOpenID) (err error)
- func DeleteWebhookByOrgID(orgID, id int64) error
- func DeleteWebhookByRepoID(repoID, id int64) error
- func DoctorUserStarNum() (err error)
- func DumpDatabase(filePath string, dbType string) error
- func ErrCancelledf(format string, args ...interface{}) error
- func FilterOutRepoIdsWithoutUnitAccess(u *User, repoIDs []int64, units ...UnitType) ([]int64, error)
- func FindByMaxID(maxID int64, limit int, results interface{}) error
- func FindRepoRecentCommitStatusContexts(repoID int64, before time.Duration) ([]string, error)
- func FindUserAccessibleRepoIDs(user *User) ([]int64, error)
- func FinishMigrateTask(task *Task) error
- func FixNullArchivedRepository() (int64, error)
- func FollowUser(userID, followID int64) (err error)
- func FullPushingEnvironment(author, committer *User, repo *Repository, repoName string, prID int64) []string
- func GPGKeyToEntity(k *GPGKey) (*openpgp.Entity, error)
- func GenerateAvatar(ctx DBContext, templateRepo, generateRepo *Repository) error
- func GenerateGitHooks(ctx DBContext, templateRepo, generateRepo *Repository) error
- func GenerateIssueLabels(ctx DBContext, templateRepo, generateRepo *Repository) error
- func GenerateLFSOid(content io.Reader) (string, error)
- func GenerateTopics(ctx DBContext, templateRepo, generateRepo *Repository) error
- func GenerateWebhooks(ctx DBContext, templateRepo, generateRepo *Repository) error
- func GetActiveOAuth2Providers() ([]string, map[string]OAuth2Provider, error)
- func GetAssigneeIDsByIssue(issueID int64) ([]int64, error)
- func GetCount(t testing.TB, bean interface{}, conditions ...interface{}) int
- func GetEmailForHash(md5Sum string) (string, error)
- func GetExternalLogin(externalLoginUser *ExternalLoginUser) (bool, error)
- func GetIssueIDsByRepoID(repoID int64) ([]int64, error)
- func GetIssueWatchersIDs(issueID int64, watching bool) ([]int64, error)
- func GetLabelIDsInOrgByNames(orgID int64, labelNames []string) ([]int64, error)
- func GetLabelIDsInOrgsByNames(orgIDs []int64, labelNames []string) ([]int64, error)
- func GetLabelIDsInRepoByNames(repoID int64, labelNames []string) ([]int64, error)
- func GetLabelTemplateFile(name string) ([][3]string, error)
- func GetMaxID(beanOrTableName interface{}) (maxID int64, err error)
- func GetNotificationCount(user *User, status NotificationStatus) (int64, error)
- func GetParticipantsIDsByIssueID(issueID int64) ([]int64, error)
- func GetPrivateRepositoryCount(u *User) (int64, error)
- func GetPublicRepositoryCount(u *User) (int64, error)
- func GetPullRequestIDsByCheckStatus(status PullRequestStatus) ([]int64, error)
- func GetReleaseAttachments(rels ...*Release) (err error)
- func GetReleaseCountByRepoID(repoID int64, opts FindReleasesOptions) (int64, error)
- func GetRepoIDsForIssuesOptions(opts *IssuesOptions, user *User) ([]int64, error)
- func GetRepoInitFile(tp, name string) ([]byte, error)
- func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen int64, numClosed int64)
- func GetRepoWatchersIDs(repoID int64) ([]int64, error)
- func GetRepositoriesMapByIDs(ids []int64) (map[int64]*Repository, error)
- func GetRepositoryCount(u *User) (int64, error)
- func GetTeamIDsByNames(orgID int64, names []string, ignoreNonExistent bool) ([]int64, error)
- func GetTeamNamesByID(teamIDs []int64) ([]string, error)
- func GetTrackedSeconds(opts FindTrackedTimesOptions) (int64, error)
- func GetUnindexedRepos(indexerType RepoIndexerType, maxRepoID int64, page, pageSize int) ([]int64, error)
- func GetUser(user *User) (bool, error)
- func GetUserEmailsByNames(names []string) []string
- func GetUserIDByExternalUserID(provider string, userID string) (int64, error)
- func GetUserIDsByNames(names []string, ignoreNonExistent bool) ([]int64, error)
- func GetUserNamesByIDs(ids []int64) ([]string, error)
- func GetUserSalt() (string, error)
- func GetYamlFixturesAccess() (string, error)
- func GitConfigPath(repoPath string) string
- func HasAccess(userID int64, repo *Repository) (bool, error)
- func HasAccessUnit(user *User, repo *Repository, unitType UnitType, testMode AccessMode) (bool, error)
- func HasDeployKey(keyID, repoID int64) bool
- func HasIssueLabel(issueID, labelID int64) bool
- func HasOrgVisible(org *User, user *User) bool
- func HasOrgsVisible(orgs []*User, user *User) bool
- func HasTeamRepo(orgID, teamID, repoID int64) bool
- func IncrementRepoForkNum(ctx DBContext, repoID int64) error
- func InitFixtures(dir string) (err error)
- func InitOAuth2() error
- func InitializeLabels(ctx DBContext, repoID int64, labelTemplate string, isOrg bool) error
- func InsertIssueComments(comments []*Comment) error
- func InsertIssues(issues ...*Issue) error
- func InsertMilestones(ms ...*Milestone) (err error)
- func InsertMirror(mirror *Mirror) error
- func InsertPullRequests(prs ...*PullRequest) error
- func InsertRelease(rel *Release) error
- func InsertReleases(rels ...*Release) error
- func InsertReleasesContext(ctx DBContext, rels []*Release) error
- func InsertReviews(reviews []*Review) error
- func InternalPushingEnvironment(doer *User, repo *Repository) []string
- func IsContentEmptyErr(err error) bool
- func IsEmailUsed(email string) (bool, error)
- func IsErrAccessTokenEmpty(err error) bool
- func IsErrAccessTokenNotExist(err error) bool
- func IsErrAttachmentNotExist(err error) bool
- func IsErrBranchAlreadyExists(err error) bool
- func IsErrBranchDoesNotExist(err error) bool
- func IsErrBranchNameConflict(err error) bool
- func IsErrBranchesEqual(err error) bool
- func IsErrCancelled(err error) bool
- func IsErrCircularDependency(err error) bool
- func IsErrCommentNotExist(err error) bool
- func IsErrCommitIDDoesNotMatch(err error) bool
- func IsErrDependenciesLeft(err error) bool
- func IsErrDependencyExists(err error) bool
- func IsErrDependencyNotExists(err error) bool
- func IsErrDeployKeyAlreadyExist(err error) bool
- func IsErrDeployKeyNameAlreadyUsed(err error) bool
- func IsErrDeployKeyNotExist(err error) bool
- func IsErrEmailAlreadyUsed(err error) bool
- func IsErrEmailInvalid(err error) bool
- func IsErrErrPullRequestHeadRepoMissing(err error) bool
- func IsErrExternalLoginUserAlreadyExist(err error) bool
- func IsErrExternalLoginUserNotExist(err error) bool
- func IsErrFilePathInvalid(err error) bool
- func IsErrFilePathProtected(err error) bool
- func IsErrFilenameInvalid(err error) bool
- func IsErrForbiddenIssueReaction(err error) bool
- func IsErrForkAlreadyExist(err error) bool
- func IsErrGPGKeyAccessDenied(err error) bool
- func IsErrGPGKeyIDAlreadyUsed(err error) bool
- func IsErrGPGKeyImportNotExist(err error) bool
- func IsErrGPGKeyNotExist(err error) bool
- func IsErrGPGKeyParsing(err error) bool
- func IsErrGPGNoEmailFound(err error) bool
- func IsErrInvalidCloneAddr(err error) bool
- func IsErrInvalidMergeStyle(err error) bool
- func IsErrInvalidTagName(err error) bool
- func IsErrIssueIsClosed(err error) bool
- func IsErrIssueLabelTemplateLoad(err error) bool
- func IsErrIssueNotExist(err error) bool
- func IsErrIssueWasClosed(err error) bool
- func IsErrKeyAccessDenied(err error) bool
- func IsErrKeyAlreadyExist(err error) bool
- func IsErrKeyNameAlreadyUsed(err error) bool
- func IsErrKeyNotExist(err error) bool
- func IsErrKeyUnableVerify(err error) bool
- func IsErrLFSFileLocked(err error) bool
- func IsErrLFSLockAlreadyExist(err error) bool
- func IsErrLFSLockNotExist(err error) bool
- func IsErrLFSUnauthorizedAction(err error) bool
- func IsErrLabelNotExist(err error) bool
- func IsErrLastOrgOwner(err error) bool
- func IsErrLoginSourceAlreadyExist(err error) bool
- func IsErrLoginSourceInUse(err error) bool
- func IsErrLoginSourceNotExist(err error) bool
- func IsErrMergeConflicts(err error) bool
- func IsErrMergeUnrelatedHistories(err error) bool
- func IsErrMigrationNotAllowed(err error) bool
- func IsErrMilestoneNotExist(err error) bool
- func IsErrNameCharsNotAllowed(err error) bool
- func IsErrNamePatternNotAllowed(err error) bool
- func IsErrNameReserved(err error) bool
- func IsErrNewIssueInsert(err error) bool
- func IsErrNotAllowedToMerge(err error) bool
- func IsErrNotExist(err error) bool
- func IsErrNotValidReviewRequest(err error) bool
- func IsErrOAuthApplicationNotFound(err error) bool
- func IsErrOauthClientIDInvalid(err error) bool
- func IsErrOpenIDAlreadyUsed(err error) bool
- func IsErrOpenIDConnectInitialize(err error) bool
- func IsErrOrgLabelNotExist(err error) bool
- func IsErrOrgNotExist(err error) bool
- func IsErrProjectBoardNotExist(err error) bool
- func IsErrProjectNotExist(err error) bool
- func IsErrPullRequestAlreadyExists(err error) bool
- func IsErrPullRequestHasMerged(err error) bool
- func IsErrPullRequestNotExist(err error) bool
- func IsErrPullWasClosed(err error) bool
- func IsErrReachLimitOfRepo(err error) bool
- func IsErrReactionAlreadyExist(err error) bool
- func IsErrRebaseConflicts(err error) bool
- func IsErrReleaseAlreadyExist(err error) bool
- func IsErrReleaseNotExist(err error) bool
- func IsErrRepoAlreadyExist(err error) bool
- func IsErrRepoFileAlreadyExists(err error) bool
- func IsErrRepoFileDoesNotExist(err error) bool
- func IsErrRepoFilesAlreadyExist(err error) bool
- func IsErrRepoLabelNotExist(err error) bool
- func IsErrRepoNotExist(err error) bool
- func IsErrRepoRedirectNotExist(err error) bool
- func IsErrReviewNotExist(err error) bool
- func IsErrSHADoesNotMatch(err error) bool
- func IsErrSHANotFound(err error) bool
- func IsErrSHAOrCommitIDNotProvided(err error) bool
- func IsErrSSHDisabled(err error) bool
- func IsErrStopwatchNotExist(err error) bool
- func IsErrTagAlreadyExists(err error) bool
- func IsErrTaskDoesNotExist(err error) bool
- func IsErrTeamAlreadyExist(err error) bool
- func IsErrTeamNotExist(err error) bool
- func IsErrTopicNotExist(err error) bool
- func IsErrTrackedTimeNotExist(err error) bool
- func IsErrTwoFactorNotEnrolled(err error) bool
- func IsErrU2FRegistrationNotExist(err error) bool
- func IsErrUnitTypeNotExist(err error) bool
- func IsErrUnknownDependencyType(err error) bool
- func IsErrUpdateTaskNotExist(err error) bool
- func IsErrUploadNotExist(err error) bool
- func IsErrUserAlreadyExist(err error) bool
- func IsErrUserCannotCommit(err error) bool
- func IsErrUserDoesNotHaveAccessToRepo(err error) bool
- func IsErrUserHasOrgs(err error) bool
- func IsErrUserInactive(err error) bool
- func IsErrUserNotAllowedCreateOrg(err error) bool
- func IsErrUserNotExist(err error) bool
- func IsErrUserOwnRepos(err error) bool
- func IsErrUserProhibitLogin(err error) bool
- func IsErrWebhookNotExist(err error) bool
- func IsErrWikiAlreadyExist(err error) bool
- func IsErrWikiInvalidFileName(err error) bool
- func IsErrWikiReservedName(err error) bool
- func IsErrWontSign(err error) bool
- func IsFollowing(userID, followID int64) bool
- func IsOfficialReviewer(issue *Issue, reviewers ...*User) (bool, error)
- func IsOfficialReviewerTeam(issue *Issue, team *Team) (bool, error)
- func IsOpenIDUsed(openid string) (bool, error)
- func IsOrganizationMember(orgID, uid int64) (bool, error)
- func IsOrganizationOwner(orgID, uid int64) (bool, error)
- func IsProjectBoardTypeValid(p ProjectBoardType) bool
- func IsProjectTypeValid(p ProjectType) bool
- func IsPublicMembership(orgID, uid int64) (bool, error)
- func IsReleaseExist(repoID int64, tagName string) (bool, error)
- func IsRepositoryExist(u *User, repoName string) (bool, error)
- func IsSSPIEnabled() bool
- func IsStaring(userID, repoID int64) bool
- func IsTableNotEmpty(tableName string) (bool, error)
- func IsTeamMember(orgID, teamID, userID int64) (bool, error)
- func IsUsableRepoName(name string) error
- func IsUsableTeamName(name string) error
- func IsUsableUsername(name string) error
- func IsUserAssignedToIssue(issue *Issue, user *User) (isAssigned bool, err error)
- func IsUserExist(uid int64, name string) (bool, error)
- func IsUserInTeams(userID int64, teamIDs []int64) (bool, error)
- func IsUserParticipantsOfIssue(user *User, issue *Issue) bool
- func IsUserRealRepoAdmin(repo *Repository, user *User) (bool, error)
- func IsUserRepoAdmin(repo *Repository, user *User) (bool, error)
- func IsValidHookContentType(name string) bool
- func IsValidHookTaskType(name string) bool
- func IsWatching(userID, repoID int64) bool
- func IssueNoDependenciesLeft(issue *Issue) (bool, error)
- func Iterate(ctx DBContext, tableBean interface{}, cond builder.Cond, ...) error
- func IterateAttachment(f func(attach *Attachment) error) error
- func IterateLFS(f func(mo *LFSMetaObject) error) error
- func IterateRepository(f func(repo *Repository) error) error
- func IterateUser(f func(user *User) error) error
- func LFSAutoAssociate(metas []*LFSMetaObject, user *User, repoID int64) error
- func LFSObjectAccessible(user *User, oid string) (bool, error)
- func LinkExternalToUser(user *User, externalLoginUser *ExternalLoginUser) error
- func LoadFixtures() error
- func LoadLabelsFormatted(labelTemplate string) (string, error)
- func LocalCopyPath() string
- func LockIssue(opts *IssueLockOptions) error
- func LookupRepoRedirect(ownerID int64, repoName string) (int64, error)
- func MainTest(m *testing.M, pathToGiteaRoot string)
- func MakeEmailPrimary(email *EmailAddress) error
- func MakeIDsFromAPIAssigneesToAdd(oneAssignee string, multipleAssignees []string) (assigneeIDs []int64, err error)
- func MarkConversation(comment *Comment, doer *User, isResolve bool) (err error)
- func MarkReviewsAsNotStale(issueID int64, commitID string) (err error)
- func MarkReviewsAsStale(issueID int64) (err error)
- func MaxBatchInsertSize(bean interface{}) int
- func MirrorsIterate(f func(idx int, bean interface{}) error) error
- func MoveIssueAcrossProjectBoards(issue *Issue, board *ProjectBoard) error
- func NamesToBean(names ...string) ([]interface{}, error)
- func NewAccessToken(t *AccessToken) error
- func NewCommitStatus(opts NewCommitStatusOptions) error
- func NewEngine(ctx context.Context, migrateFunc func(*xorm.Engine) error) (err error)
- func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) (err error)
- func NewIssueLabel(issue *Issue, label *Label, doer *User) (err error)
- func NewIssueLabels(issue *Issue, labels []*Label, doer *User) (err error)
- func NewLabel(label *Label) error
- func NewLabels(labels ...*Label) error
- func NewMilestone(m *Milestone) (err error)
- func NewProject(p *Project) error
- func NewProjectBoard(board *ProjectBoard) error
- func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []string, ...) (err error)
- func NewRepoContext()
- func NewRepoRedirect(ctx DBContext, ownerID, repoID int64, oldRepoName, newRepoName string) error
- func NewTeam(t *Team) (err error)
- func NewTestEngine() (err error)
- func NewTwoFactor(t *TwoFactor) error
- func NewXORMLogger(showSQL bool) xormlog.Logger
- func NotifyWatchers(actions ...*Action) error
- func NotifyWatchersActions(acts []*Action) error
- func ParseCommitsWithSignature(oldCommits *list.List, repository *Repository) *list.List
- func ParseCommitsWithStatus(oldCommits *list.List, repo *Repository) *list.List
- func Ping() error
- func PrepareTestDatabase() error
- func PrepareTestEnv(t testing.TB)
- func PublicSigningKey(repoPath string) (string, error)
- func PushUpdateDeleteTag(repo *Repository, tagName string) error
- func PushUpdateDeleteTagsContext(ctx DBContext, repo *Repository, tags []string) error
- func PushingEnvironment(doer *User, repo *Repository) []string
- func RegeneratePrincipalKeys(t io.StringWriter) error
- func RegeneratePublicKeys(t io.StringWriter) error
- func RemoveAccountLink(user *User, loginSourceID int64) (int64, error)
- func RemoveAllWithNotice(title, path string)
- func RemoveDeletedBranch(repoID int64, branch string) error
- func RemoveIssueDependency(user *User, issue *Issue, dep *Issue, depType DependencyType) (err error)
- func RemoveOldDeletedBranches(ctx context.Context, olderThan time.Duration)
- func RemoveOrgUser(orgID, userID int64) error
- func RemoveRandomAvatars(ctx context.Context) error
- func RemoveStorageWithNotice(bucket storage.ObjectStorage, title, path string)
- func RemoveTeamMember(team *Team, userID int64) error
- func RemoveTemporaryPath(basePath string) error
- func RepoPath(userName, repoName string) string
- func ResetOAuth2() error
- func ReviewExists(issue *Issue, treePath string, line int64) (bool, error)
- func RevokeOAuth2Grant(grantID, userID int64) error
- func RewriteAllPrincipalKeys() error
- func RewriteAllPublicKeys() error
- func SMTPAuth(a smtp.Auth, cfg *SMTPConfig) error
- func SSHKeyGenParsePublicKey(key string) (string, int, error)
- func SSHNativeParsePublicKey(keyLine string) (string, int, error)
- func SanitizeAndValidateTopics(topics []string) (validTopics []string, invalidTopics []string)
- func SaveOrUpdateTag(repo *Repository, newRel *Release) error
- func SaveTopics(repoID int64, topicNames ...string) error
- func SearchIssueIDsByKeyword(kw string, repoIDs []int64, limit, start int) (int64, []int64, error)
- func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond
- func SecToTime(duration int64) string
- func SetEngine() (err error)
- func SetNotificationStatus(notificationID int64, user *User, status NotificationStatus) error
- func SignInitialCommit(repoPath string, u *User) (bool, string, *git.Signature, error)
- func SigningKey(repoPath string) (string, *git.Signature)
- func SortReleases(rels []*Release)
- func StarRepo(userID, repoID int64, star bool) error
- func StopwatchExists(userID int64, issueID int64) bool
- func SubmitReview(doer *User, issue *Issue, reviewType ReviewType, content, commitID string, ...) (*Review, *Comment, error)
- func SyncExternalUsers(ctx context.Context, updateExisting bool) error
- func ToggleUserOpenIDVisibility(id int64) (err error)
- func TotalTimes(options FindTrackedTimesOptions) (map[*User]string, error)
- func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error
- func TxDBContext() (DBContext, Committer, error)
- func UnfollowUser(userID, followID int64) (err error)
- func UnlockIssue(opts *IssueLockOptions) error
- func UpdateAccessToken(t *AccessToken) error
- func UpdateAttachment(atta *Attachment) error
- func UpdateComment(c *Comment, doer *User) error
- func UpdateCommentsMigrationsByType(tp structs.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateDeployKey(key *DeployKey) error
- func UpdateDeployKeyCols(key *DeployKey, cols ...string) error
- func UpdateExternalUser(user *User, gothUser goth.User) error
- func UpdateHookTask(t *HookTask) error
- func UpdateIssueDeadline(issue *Issue, deadlineUnix timeutil.TimeStamp, doer *User) (err error)
- func UpdateIssueMentions(ctx DBContext, issueID int64, mentions []*User) error
- func UpdateIssueUserByRead(uid, issueID int64) error
- func UpdateIssueUsersByMentions(ctx DBContext, issueID int64, uids []int64) error
- func UpdateIssuesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateLabel(l *Label) error
- func UpdateMigrationsByType(tp structs.GitServiceType, externalUserID string, userID int64) error
- func UpdateMilestone(m *Milestone, oldIsClosed bool) error
- func UpdateMirror(m *Mirror) error
- func UpdateNotificationStatuses(user *User, currentStatus NotificationStatus, desiredStatus NotificationStatus) error
- func UpdateProject(p *Project) error
- func UpdateProjectBoard(board *ProjectBoard) error
- func UpdateProtectBranch(repo *Repository, protectBranch *ProtectedBranch, opts WhitelistOptions) (err error)
- func UpdatePublicKeyUpdated(id int64) error
- func UpdateReactionsMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, userID int64) error
- func UpdateRelease(ctx DBContext, rel *Release) error
- func UpdateReleasesMigrationsByType(gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateRepository(repo *Repository, visibilityChanged bool) (err error)
- func UpdateRepositoryCols(repo *Repository, cols ...string) error
- func UpdateRepositoryCtx(ctx DBContext, repo *Repository, visibilityChanged bool) error
- func UpdateRepositoryUnits(repo *Repository, units []RepoUnit, deleteUnitTypes []UnitType) (err error)
- func UpdateRepositoryUpdatedTime(repoID int64, updateTime time.Time) error
- func UpdateReviewsMigrationsByType(tp structs.GitServiceType, originalAuthorID string, posterID int64) error
- func UpdateSource(source *LoginSource) error
- func UpdateTeam(t *Team, authChanged bool, includeAllChanged bool) (err error)
- func UpdateTeamUnits(team *Team, units []TeamUnit) (err error)
- func UpdateTwoFactor(t *TwoFactor) error
- func UpdateUser(u *User) error
- func UpdateUserCols(u *User, cols ...string) error
- func UpdateUserSetting(u *User) (err error)
- func UpdateWebhook(w *Webhook) error
- func UpdateWebhookLastStatus(w *Webhook) error
- func UploadLocalPath(uuid string) string
- func UserPath(userName string) string
- func UsersInTeamsCount(userIDs []int64, teamIDs []int64) (int64, error)
- func ValidateCommitsWithEmails(oldCommits *list.List) *list.List
- func ValidateEmail(email string) error
- func ValidateTopic(topic string) bool
- func WatchIfAuto(userID int64, repoID int64, isWrite bool) error
- func WatchRepo(userID, repoID int64, watch bool) (err error)
- func WatchRepoMode(userID, repoID int64, mode RepoWatchMode) (err error)
- func WikiPath(userName, repoName string) string
- func WithContext(f func(ctx DBContext) error) error
- func WithTx(f func(ctx DBContext) error) error
- type Access
- type AccessMode
- type AccessToken
- type AccessibleReposEnvironment
- type Action
- func (a *Action) GetActAvatar() string
- func (a *Action) GetActFullName() string
- func (a *Action) GetActUserName() string
- func (a *Action) GetBranch() string
- func (a *Action) GetCommentLink() string
- func (a *Action) GetContent() string
- func (a *Action) GetCreate() time.Time
- func (a *Action) GetDisplayName() string
- func (a *Action) GetDisplayNameTitle() string
- func (a *Action) GetIssueContent() string
- func (a *Action) GetIssueInfos() []string
- func (a *Action) GetIssueTitle() string
- func (a *Action) GetOpType() ActionType
- func (a *Action) GetRepoLink() string
- func (a *Action) GetRepoName() string
- func (a *Action) GetRepoPath() string
- func (a *Action) GetRepoUserName() string
- func (a *Action) ShortActUserName() string
- func (a *Action) ShortRepoName() string
- func (a *Action) ShortRepoPath() string
- func (a *Action) ShortRepoUserName() string
- type ActionList
- type ActionType
- type ActivityAuthorData
- type ActivityStats
- func (stats *ActivityStats) ActiveIssueCount() int
- func (stats *ActivityStats) ActivePRCount() int
- func (stats *ActivityStats) ClosedIssueCount() int
- func (stats *ActivityStats) ClosedIssuePerc() int
- func (stats *ActivityStats) FillIssues(repoID int64, fromTime time.Time) error
- func (stats *ActivityStats) FillPullRequests(repoID int64, fromTime time.Time) error
- func (stats *ActivityStats) FillReleases(repoID int64, fromTime time.Time) error
- func (stats *ActivityStats) FillUnresolvedIssues(repoID int64, fromTime time.Time, issues, prs bool) error
- func (stats *ActivityStats) MergedPRCount() int
- func (stats *ActivityStats) MergedPRPerc() int
- func (stats *ActivityStats) OpenedIssueCount() int
- func (stats *ActivityStats) OpenedIssuePerc() int
- func (stats *ActivityStats) OpenedPRCount() int
- func (stats *ActivityStats) OpenedPRPerc() int
- func (stats *ActivityStats) PublishedReleaseCount() int
- func (stats *ActivityStats) UnresolvedIssueCount() int
- type Attachment
- func GetAttachmentByID(id int64) (*Attachment, error)
- func GetAttachmentByReleaseIDFileName(releaseID int64, fileName string) (*Attachment, error)
- func GetAttachmentByUUID(uuid string) (*Attachment, error)
- func GetAttachmentsByCommentID(commentID int64) ([]*Attachment, error)
- func GetAttachmentsByIssueID(issueID int64) ([]*Attachment, error)
- func GetAttachmentsByUUIDs(uuids []string) ([]*Attachment, error)
- func NewAttachment(attach *Attachment, buf []byte, file io.Reader) (_ *Attachment, err error)
- type CloneLink
- type CodeComments
- type Collaboration
- type Collaborator
- type Comment
- func AddReviewRequest(issue *Issue, reviewer, doer *User) (*Comment, error)
- func AddTeamReviewRequest(issue *Issue, reviewer *Team, doer *User) (*Comment, error)
- func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error)
- func CreatePushPullComment(pusher *User, pr *PullRequest, oldCommitID, newCommitID string) (comment *Comment, err error)
- func FindComments(opts FindCommentsOptions) ([]*Comment, error)
- func GetCommentByID(id int64) (*Comment, error)
- func RemoveReviewRequest(issue *Issue, reviewer, doer *User) (*Comment, error)
- func RemoveTeamReviewRequest(issue *Issue, reviewer *Team, doer *User) (*Comment, error)
- func UpdateIssueByAPI(issue *Issue, doer *User) (statusChangeComment *Comment, titleChanged bool, err error)
- func (c *Comment) APIFormat() *api.Comment
- func (c *Comment) APIURL() string
- func (c *Comment) AfterDelete()
- func (c *Comment) AfterLoad(session *xorm.Session)
- func (c *Comment) BeforeInsert()
- func (c *Comment) BeforeUpdate()
- func (c *Comment) CheckInvalidation(repo *git.Repository, doer *User, branch string) error
- func (c *Comment) CodeCommentURL() string
- func (c *Comment) DiffSide() string
- func (c *Comment) EventTag() string
- func (c *Comment) HTMLURL() string
- func (c *Comment) HashTag() string
- func (c *Comment) IsResolved() bool
- func (c *Comment) IssueURL() string
- func (c *Comment) LoadAssigneeUserAndTeam() error
- func (c *Comment) LoadAttachments() error
- func (c *Comment) LoadDepIssueDetails() (err error)
- func (c *Comment) LoadIssue() (err error)
- func (c *Comment) LoadLabel() error
- func (c *Comment) LoadMilestone() error
- func (c *Comment) LoadPoster() error
- func (c *Comment) LoadProject() error
- func (c *Comment) LoadPushCommits() (err error)
- func (c *Comment) LoadReactions(repo *Repository) error
- func (comment *Comment) LoadRefComment() (err error)
- func (comment *Comment) LoadRefIssue() (err error)
- func (c *Comment) LoadResolveDoer() (err error)
- func (c *Comment) LoadReview() error
- func (c *Comment) PRURL() string
- func (comment *Comment) RefCommentHTMLURL() string
- func (comment *Comment) RefIssueHTMLURL() string
- func (comment *Comment) RefIssueIdent() string
- func (comment *Comment) RefIssueTitle() string
- func (c *Comment) UnsignedLine() uint64
- func (c *Comment) UpdateAttachments(uuids []string) error
- type CommentList
- type CommentTag
- type CommentType
- type CommitStatus
- type CommitStatusOptions
- type CommitVerification
- type Committer
- type ContentEmptyErr
- type CreateCommentOptions
- type CreateOAuth2ApplicationOptions
- type CreateRepoOptions
- type CreateReviewOptions
- type DBContext
- type DeletedBranch
- type DependencyInfo
- type DependencyType
- type DeployKey
- func AddDeployKey(repoID int64, name, content string, readOnly bool) (*DeployKey, error)
- func GetDeployKeyByID(id int64) (*DeployKey, error)
- func GetDeployKeyByRepo(keyID, repoID int64) (*DeployKey, error)
- func ListDeployKeys(repoID int64, listOptions ListOptions) ([]*DeployKey, error)
- func SearchDeployKeys(repoID int64, keyID int64, fingerprint string) ([]*DeployKey, error)
- type EmailAddress
- type EmailHash
- type Engine
- type ErrAccessTokenEmpty
- type ErrAccessTokenNotExist
- type ErrAttachmentNotExist
- type ErrBranchAlreadyExists
- type ErrBranchDoesNotExist
- type ErrBranchNameConflict
- type ErrBranchesEqual
- type ErrCancelled
- type ErrCircularDependency
- type ErrCommentNotExist
- type ErrCommitIDDoesNotMatch
- type ErrDependenciesLeft
- type ErrDependencyExists
- type ErrDependencyNotExists
- type ErrDeployKeyAlreadyExist
- type ErrDeployKeyNameAlreadyUsed
- type ErrDeployKeyNotExist
- type ErrEmailAlreadyUsed
- type ErrEmailInvalid
- type ErrExternalLoginUserAlreadyExist
- type ErrExternalLoginUserNotExist
- type ErrFilePathInvalid
- type ErrFilePathProtected
- type ErrFilenameInvalid
- type ErrForbiddenIssueReaction
- type ErrForkAlreadyExist
- type ErrGPGKeyAccessDenied
- type ErrGPGKeyIDAlreadyUsed
- type ErrGPGKeyImportNotExist
- type ErrGPGKeyNotExist
- type ErrGPGKeyParsing
- type ErrGPGNoEmailFound
- type ErrInvalidCloneAddr
- type ErrInvalidMergeStyle
- type ErrInvalidTagName
- type ErrIssueIsClosed
- type ErrIssueLabelTemplateLoad
- type ErrIssueNotExist
- type ErrIssueWasClosed
- type ErrKeyAccessDenied
- type ErrKeyAlreadyExist
- type ErrKeyNameAlreadyUsed
- type ErrKeyNotExist
- type ErrKeyUnableVerify
- type ErrLFSFileLocked
- type ErrLFSLockAlreadyExist
- type ErrLFSLockNotExist
- type ErrLFSUnauthorizedAction
- type ErrLabelNotExist
- type ErrLastOrgOwner
- type ErrLoginSourceAlreadyExist
- type ErrLoginSourceInUse
- type ErrLoginSourceNotExist
- type ErrMergeConflicts
- type ErrMergeUnrelatedHistories
- type ErrMigrationNotAllowed
- type ErrMilestoneNotExist
- type ErrNameCharsNotAllowed
- type ErrNamePatternNotAllowed
- type ErrNameReserved
- type ErrNewIssueInsert
- type ErrNotAllowedToMerge
- type ErrNotExist
- type ErrNotValidReviewRequest
- type ErrOAuthApplicationNotFound
- type ErrOAuthClientIDInvalid
- type ErrOpenIDAlreadyUsed
- type ErrOpenIDConnectInitialize
- type ErrOrgLabelNotExist
- type ErrOrgNotExist
- type ErrProjectBoardNotExist
- type ErrProjectNotExist
- type ErrPullRequestAlreadyExists
- type ErrPullRequestHasMerged
- type ErrPullRequestHeadRepoMissing
- type ErrPullRequestNotExist
- type ErrPullWasClosed
- type ErrReachLimitOfRepo
- type ErrReactionAlreadyExist
- type ErrRebaseConflicts
- type ErrReleaseAlreadyExist
- type ErrReleaseNotExist
- type ErrRepoAlreadyExist
- type ErrRepoFileAlreadyExists
- type ErrRepoFileDoesNotExist
- type ErrRepoFilesAlreadyExist
- type ErrRepoLabelNotExist
- type ErrRepoNotExist
- type ErrRepoRedirectNotExist
- type ErrReviewNotExist
- type ErrSHADoesNotMatch
- type ErrSHANotFound
- type ErrSHAOrCommitIDNotProvided
- type ErrSSHDisabled
- type ErrStopwatchNotExist
- type ErrTagAlreadyExists
- type ErrTaskDoesNotExist
- type ErrTeamAlreadyExist
- type ErrTeamNotExist
- type ErrTopicNotExist
- type ErrTrackedTimeNotExist
- type ErrTwoFactorNotEnrolled
- type ErrU2FRegistrationNotExist
- type ErrUnitTypeNotExist
- type ErrUnknownDependencyType
- type ErrUpdateTaskNotExist
- type ErrUploadNotExist
- type ErrUserAlreadyExist
- type ErrUserCannotCommit
- type ErrUserDoesNotHaveAccessToRepo
- type ErrUserHasOrgs
- type ErrUserInactive
- type ErrUserNotAllowedCreateOrg
- type ErrUserNotExist
- type ErrUserOwnRepos
- type ErrUserProhibitLogin
- type ErrWebhookNotExist
- type ErrWikiAlreadyExist
- type ErrWikiInvalidFileName
- type ErrWikiReservedName
- type ErrWontSign
- type ExternalLoginUser
- type ExternalTrackerConfig
- type ExternalWikiConfig
- type FindCommentsOptions
- type FindExternalUserOptions
- type FindNotificationOptions
- type FindOrgMembersOpts
- type FindReactionsOptions
- type FindReleasesOptions
- type FindReviewOptions
- type FindTaskOptions
- type FindTopicOptions
- type FindTrackedTimesOptions
- type Follow
- type GPGKey
- type GPGKeyImport
- type GenerateRepoOptions
- type GetFeedsOptions
- type GetMilestonesOption
- type GiteaTemplate
- type HookContentType
- type HookEvent
- type HookEventType
- type HookEvents
- type HookRequest
- type HookResponse
- type HookStatus
- type HookTask
- type HookTaskType
- type Issue
- func GetIssueByID(id int64) (*Issue, error)
- func GetIssueByIndex(repoID, index int64) (*Issue, error)
- func GetIssueWithAttrsByID(id int64) (*Issue, error)
- func GetIssueWithAttrsByIndex(repoID, index int64) (*Issue, error)
- func GetIssuesByIDs(issueIDs []int64) ([]*Issue, error)
- func Issues(opts *IssuesOptions) ([]*Issue, error)
- func (issue *Issue) APIURL() string
- func (issue *Issue) BlockedByDependencies() ([]*DependencyInfo, error)
- func (issue *Issue) BlockingDependencies() ([]*DependencyInfo, error)
- func (issue *Issue) ChangeContent(doer *User, content string) (err error)
- func (issue *Issue) ChangeRef(doer *User, oldRef string) (err error)
- func (issue *Issue) ChangeStatus(doer *User, isClosed bool) (*Comment, error)
- func (issue *Issue) ChangeTitle(doer *User, oldTitle string) (err error)
- func (issue *Issue) ClearLabels(doer *User) (err error)
- func (issue *Issue) DiffURL() string
- func (issue *Issue) FindAndUpdateIssueMentions(ctx DBContext, doer *User, content string) (mentions []*User, err error)
- func (issue *Issue) GetIsRead(userID int64) error
- func (issue *Issue) GetLastComment() (*Comment, error)
- func (issue *Issue) GetLastEventLabel() string
- func (issue *Issue) GetLastEventLabelFake() string
- func (issue *Issue) GetLastEventTimestamp() timeutil.TimeStamp
- func (issue *Issue) GetPullRequest() (pr *PullRequest, err error)
- func (issue *Issue) GetTasks() int
- func (issue *Issue) GetTasksDone() int
- func (issue *Issue) HTMLURL() string
- func (issue *Issue) HasLabel(labelID int64) bool
- func (issue *Issue) HashTag() string
- func (issue *Issue) IsOverdue() bool
- func (issue *Issue) IsPoster(uid int64) bool
- func (issue *Issue) IsTimetrackerEnabled() bool
- func (issue *Issue) LoadAssignees() error
- func (issue *Issue) LoadAttributes() error
- func (issue *Issue) LoadDiscussComments() error
- func (issue *Issue) LoadLabels() error
- func (issue *Issue) LoadMilestone() error
- func (issue *Issue) LoadPoster() error
- func (i *Issue) LoadProject() (err error)
- func (issue *Issue) LoadPullRequest() error
- func (issue *Issue) LoadRepo() error
- func (issue *Issue) PatchURL() string
- func (i *Issue) ProjectBoardID() int64
- func (i *Issue) ProjectID() int64
- func (issue *Issue) ReadBy(userID int64) error
- func (issue *Issue) ReplaceLabels(labels []*Label, doer *User) (err error)
- func (issue *Issue) ReplyReference() string
- func (issue *Issue) ResolveMentionsByVisibility(ctx DBContext, doer *User, mentions []string) (users []*User, err error)
- func (issue *Issue) State() api.StateType
- func (issue *Issue) ToggleAssignee(doer *User, assigneeID int64) (removed bool, comment *Comment, err error)
- func (issue *Issue) UpdateAttachments(uuids []string) (err error)
- type IssueAssignees
- type IssueDependency
- type IssueLabel
- type IssueList
- func (issues IssueList) GetApprovalCounts() (map[int64][]*ReviewCount, error)
- func (issues IssueList) LoadAttachments() error
- func (issues IssueList) LoadAttributes() error
- func (issues IssueList) LoadComments() error
- func (issues IssueList) LoadDiscussComments() error
- func (issues IssueList) LoadRepositories() ([]*Repository, error)
- type IssueLockOptions
- type IssueStats
- type IssueStatsOptions
- type IssueUser
- type IssueWatch
- type IssueWatchList
- type IssuesConfig
- type IssuesOptions
- type KeyType
- type LDAPConfig
- type LFSLock
- func CreateLFSLock(lock *LFSLock) (*LFSLock, error)
- func DeleteLFSLockByID(id int64, u *User, force bool) (*LFSLock, error)
- func GetLFSLock(repo *Repository, path string) (*LFSLock, error)
- func GetLFSLockByID(id int64) (*LFSLock, error)
- func GetLFSLockByRepoID(repoID int64, page, pageSize int) ([]*LFSLock, error)
- type LFSMetaObject
- type LFSTokenResponse
- type Label
- func GetLabelByID(id int64) (*Label, error)
- func GetLabelInOrgByID(orgID, labelID int64) (*Label, error)
- func GetLabelInOrgByName(orgID int64, labelName string) (*Label, error)
- func GetLabelInRepoByID(repoID, labelID int64) (*Label, error)
- func GetLabelInRepoByName(repoID int64, labelName string) (*Label, error)
- func GetLabelsByIDs(labelIDs []int64) ([]*Label, error)
- func GetLabelsByIssueID(issueID int64) ([]*Label, error)
- func GetLabelsByOrgID(orgID int64, sortType string, listOptions ListOptions) ([]*Label, error)
- func GetLabelsByRepoID(repoID int64, sortType string, listOptions ListOptions) ([]*Label, error)
- func GetLabelsInOrgByIDs(orgID int64, labelIDs []int64) ([]*Label, error)
- func GetLabelsInRepoByIDs(repoID int64, labelIDs []int64) ([]*Label, error)
- func (label *Label) BelongsToOrg() bool
- func (label *Label) BelongsToRepo() bool
- func (label *Label) CalOpenIssues()
- func (label *Label) CalOpenOrgIssues(repoID, labelID int64)
- func (label *Label) ForegroundColor() template.CSS
- func (label *Label) LoadSelectedLabelsAfterClick(currentSelectedLabels []int64)
- type LanguageStat
- type LanguageStatList
- type ListAccessTokensOptions
- type ListOptions
- type LoginSource
- func ActiveLoginSources(loginType LoginType) ([]*LoginSource, error)
- func GetActiveOAuth2LoginSourceByName(name string) (*LoginSource, error)
- func GetActiveOAuth2ProviderLoginSources() ([]*LoginSource, error)
- func GetLoginSourceByID(id int64) (*LoginSource, error)
- func LoginSources() ([]*LoginSource, error)
- func LoginSourcesByType(loginType LoginType) ([]*LoginSource, error)
- func (source *LoginSource) BeforeSet(colName string, val xorm.Cell)
- func (source *LoginSource) HasTLS() bool
- func (source *LoginSource) IsDLDAP() bool
- func (source *LoginSource) IsLDAP() bool
- func (source *LoginSource) IsOAuth2() bool
- func (source *LoginSource) IsPAM() bool
- func (source *LoginSource) IsSMTP() bool
- func (source *LoginSource) IsSSPI() bool
- func (source *LoginSource) LDAP() *LDAPConfig
- func (source *LoginSource) OAuth2() *OAuth2Config
- func (source *LoginSource) PAM() *PAMConfig
- func (source *LoginSource) SMTP() *SMTPConfig
- func (source *LoginSource) SSPI() *SSPIConfig
- func (source *LoginSource) SkipVerify() bool
- func (source *LoginSource) TypeName() string
- func (source *LoginSource) UseTLS() bool
- type LoginType
- type MergeStyle
- type Milestone
- type MilestoneList
- type MilestonesStats
- type Mirror
- type MirrorRepositoryList
- type NewCommitStatusOptions
- type NewIssueOptions
- type Notice
- type NoticeType
- type Notification
- type NotificationList
- func (nl NotificationList) APIFormat() []*api.NotificationThread
- func (nl NotificationList) LoadAttributes() (err error)
- func (nl NotificationList) LoadComments() ([]int, error)
- func (nl NotificationList) LoadIssues() ([]int, error)
- func (nl NotificationList) LoadRepos() (RepositoryList, []int, error)
- func (nl NotificationList) Without(failures []int) NotificationList
- type NotificationSource
- type NotificationStatus
- type OAuth2Application
- func CreateOAuth2Application(opts CreateOAuth2ApplicationOptions) (*OAuth2Application, error)
- func GetOAuth2ApplicationByClientID(clientID string) (app *OAuth2Application, err error)
- func GetOAuth2ApplicationByID(id int64) (app *OAuth2Application, err error)
- func GetOAuth2ApplicationsByUserID(userID int64) (apps []*OAuth2Application, err error)
- func ListOAuth2Applications(uid int64, listOptions ListOptions) ([]*OAuth2Application, error)
- func UpdateOAuth2Application(opts UpdateOAuth2ApplicationOptions) (*OAuth2Application, error)
- func (app *OAuth2Application) ContainsRedirectURI(redirectURI string) bool
- func (app *OAuth2Application) CreateGrant(userID int64) (*OAuth2Grant, error)
- func (app *OAuth2Application) GenerateClientSecret() (string, error)
- func (app *OAuth2Application) GetGrantByUserID(userID int64) (*OAuth2Grant, error)
- func (app *OAuth2Application) LoadUser() (err error)
- func (app *OAuth2Application) PrimaryRedirectURI() string
- func (app *OAuth2Application) TableName() string
- func (app *OAuth2Application) ValidateClientSecret(secret []byte) bool
- type OAuth2AuthorizationCode
- type OAuth2Config
- type OAuth2Grant
- type OAuth2Provider
- type OAuth2Token
- type OAuth2TokenType
- type OrgUser
- type PAMConfig
- type Permission
- func (p *Permission) CanAccess(mode AccessMode, unitType UnitType) bool
- func (p *Permission) CanAccessAny(mode AccessMode, unitTypes ...UnitType) bool
- func (p *Permission) CanRead(unitType UnitType) bool
- func (p *Permission) CanReadAny(unitTypes ...UnitType) bool
- func (p *Permission) CanReadIssuesOrPulls(isPull bool) bool
- func (p *Permission) CanWrite(unitType UnitType) bool
- func (p *Permission) CanWriteIssuesOrPulls(isPull bool) bool
- func (p *Permission) ColorFormat(s fmt.State)
- func (p *Permission) HasAccess() bool
- func (p *Permission) IsAdmin() bool
- func (p *Permission) IsOwner() bool
- func (p *Permission) UnitAccessMode(unitType UnitType) AccessMode
- type Project
- type ProjectBoard
- type ProjectBoardList
- type ProjectBoardType
- type ProjectIssue
- type ProjectSearchOptions
- type ProjectType
- type ProjectsConfig
- type ProtectedBranch
- func (protectBranch *ProtectedBranch) CanUserPush(userID int64) bool
- func (protectBranch *ProtectedBranch) GetGrantedApprovalsCount(pr *PullRequest) int64
- func (protectBranch *ProtectedBranch) GetProtectedFilePatterns() []glob.Glob
- func (protectBranch *ProtectedBranch) HasEnoughApprovals(pr *PullRequest) bool
- func (protectBranch *ProtectedBranch) IsProtected() bool
- func (protectBranch *ProtectedBranch) IsProtectedFile(patterns []glob.Glob, path string) bool
- func (protectBranch *ProtectedBranch) IsUserMergeWhitelisted(userID int64, permissionInRepo Permission) bool
- func (protectBranch *ProtectedBranch) IsUserOfficialReviewer(user *User) (bool, error)
- func (protectBranch *ProtectedBranch) MergeBlockedByOutdatedBranch(pr *PullRequest) bool
- func (protectBranch *ProtectedBranch) MergeBlockedByProtectedFiles(pr *PullRequest) bool
- func (protectBranch *ProtectedBranch) MergeBlockedByRejectedReview(pr *PullRequest) bool
- type PublicKey
- func AddPrincipalKey(ownerID int64, content string, loginSourceID int64) (*PublicKey, error)
- func AddPublicKey(ownerID int64, name, content string, loginSourceID int64) (*PublicKey, error)
- func GetPublicKeyByID(keyID int64) (*PublicKey, error)
- func ListPrincipalKeys(uid int64, listOptions ListOptions) ([]*PublicKey, error)
- func ListPublicKeys(uid int64, listOptions ListOptions) ([]*PublicKey, error)
- func ListPublicLdapSSHKeys(uid int64, loginSourceID int64) ([]*PublicKey, error)
- func SearchPublicKey(uid int64, fingerprint string) ([]*PublicKey, error)
- func SearchPublicKeyByContent(content string) (*PublicKey, error)
- func SearchPublicKeyByContentExact(content string) (*PublicKey, error)
- type PullRequest
- func GetLatestPullRequestByHeadInfo(repoID int64, branch string) (*PullRequest, error)
- func GetPullRequestByID(id int64) (*PullRequest, error)
- func GetPullRequestByIndex(repoID int64, index int64) (*PullRequest, error)
- func GetPullRequestByIssueID(issueID int64) (*PullRequest, error)
- func GetPullRequestByIssueIDWithNoAttributes(issueID int64) (*PullRequest, error)
- func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch string) (*PullRequest, error)
- func GetUnmergedPullRequestsByBaseInfo(repoID int64, branch string) ([]*PullRequest, error)
- func GetUnmergedPullRequestsByHeadInfo(repoID int64, branch string) ([]*PullRequest, error)
- func PullRequests(baseRepoID int64, opts *PullRequestsOptions) ([]*PullRequest, int64, error)
- func (pr *PullRequest) CanAutoMerge() bool
- func (pr *PullRequest) GetApprovalCounts() ([]*ReviewCount, error)
- func (pr *PullRequest) GetApprovers() string
- func (pr *PullRequest) GetDefaultMergeMessage() string
- func (pr *PullRequest) GetDefaultSquashMessage() string
- func (pr *PullRequest) GetGitRefName() string
- func (pr *PullRequest) GetWorkInProgressPrefix() string
- func (pr *PullRequest) IsChecking() bool
- func (pr *PullRequest) IsFilesConflicted() bool
- func (pr *PullRequest) IsSameRepo() bool
- func (pr *PullRequest) IsWorkInProgress() bool
- func (pr *PullRequest) LoadAttributes() error
- func (pr *PullRequest) LoadBaseRepo() error
- func (pr *PullRequest) LoadHeadRepo() error
- func (pr *PullRequest) LoadIssue() (err error)
- func (pr *PullRequest) LoadProtectedBranch() (err error)
- func (pr *PullRequest) MustHeadUserName() string
- func (pr *PullRequest) ResolveCrossReferences() ([]*Comment, error)
- func (pr *PullRequest) SetMerged() (bool, error)
- func (pr *PullRequest) SignMerge(u *User, tmpBasePath, baseCommit, headCommit string) (bool, string, *git.Signature, error)
- func (pr *PullRequest) Update() error
- func (pr *PullRequest) UpdateCols(cols ...string) error
- func (pr *PullRequest) UpdateColsIfNotMerged(cols ...string) error
- func (pr *PullRequest) UpdateCommitDivergence(ahead, behind int) error
- type PullRequestList
- type PullRequestStatus
- type PullRequestType
- type PullRequestsConfig
- type PullRequestsOptions
- type PushActionContent
- type Reaction
- type ReactionList
- type ReactionOptions
- type Release
- func GetLatestReleaseByRepoID(repoID int64) (*Release, error)
- func GetRelease(repoID int64, tagName string) (*Release, error)
- func GetReleaseByID(id int64) (*Release, error)
- func GetReleasesByRepoID(repoID int64, opts FindReleasesOptions) ([]*Release, error)
- func GetReleasesByRepoIDAndNames(ctx DBContext, repoID int64, tagNames []string) (rels []*Release, err error)
- type RepoIndexerStatus
- type RepoIndexerType
- type RepoRedirect
- type RepoTopic
- type RepoUnit
- func (r *RepoUnit) BeforeSet(colName string, val xorm.Cell)
- func (r *RepoUnit) CodeConfig() *UnitConfig
- func (r *RepoUnit) ExternalTrackerConfig() *ExternalTrackerConfig
- func (r *RepoUnit) ExternalWikiConfig() *ExternalWikiConfig
- func (r *RepoUnit) IssuesConfig() *IssuesConfig
- func (r *RepoUnit) PullRequestsConfig() *PullRequestsConfig
- func (r *RepoUnit) ReleasesConfig() *UnitConfig
- func (r *RepoUnit) Unit() Unit
- type RepoWatchMode
- type Repository
- func GetRepositoriesByForkID(forkID int64) ([]*Repository, error)
- func GetRepositoryByID(id int64) (*Repository, error)
- func GetRepositoryByIDCtx(ctx DBContext, id int64) (*Repository, error)
- func GetRepositoryByName(ownerID int64, name string) (*Repository, error)
- func GetRepositoryByOwnerAndName(ownerName, repoName string) (*Repository, error)
- func GetRepositoryFromMatch(ownerName string, repoName string) (*Repository, error)
- func GetStarredRepos(userID int64, private bool, listOptions ListOptions) ([]*Repository, error)
- func GetUserMirrorRepositories(userID int64) ([]*Repository, error)
- func GetUserRepositories(opts *SearchRepoOptions) ([]*Repository, int64, error)
- func GetWatchedRepos(userID int64, private bool, listOptions ListOptions) ([]*Repository, error)
- func HasForkedRepo(ownerID, repoID int64) (*Repository, bool)
- func (repo *Repository) APIFormat(mode AccessMode) *api.Repository
- func (repo *Repository) APIURL() string
- func (repo *Repository) AddCollaborator(u *User) error
- func (repo *Repository) AddDeletedBranch(branchName, commit string, deletedByID int64) error
- func (repo *Repository) AfterLoad()
- func (repo *Repository) AllowOnlyContributorsToTrackTime() bool
- func (repo *Repository) AllowsPulls() bool
- func (repo *Repository) AvatarLink() string
- func (repo *Repository) CanCreateBranch() bool
- func (repo *Repository) CanEnableEditor() bool
- func (repo *Repository) CanEnablePulls() bool
- func (repo *Repository) CanEnableTimetracker() bool
- func (repo *Repository) CanUserDelete(user *User) (bool, error)
- func (repo *Repository) CanUserFork(user *User) (bool, error)
- func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode) error
- func (repo *Repository) CheckUnitUser(user *User, unitType UnitType) bool
- func (repo *Repository) CloneLink() (cl *CloneLink)
- func (repo *Repository) ColorFormat(s fmt.State)
- func (repo *Repository) CommitLink(commitID string) (result string)
- func (repo *Repository) ComposeCompareURL(oldCommitID, newCommitID string) string
- func (repo *Repository) ComposeDocumentMetas() map[string]string
- func (repo *Repository) ComposeMetas() map[string]string
- func (repo *Repository) CountLFSMetaObjects() (int64, error)
- func (repo *Repository) CustomAvatarRelativePath() string
- func (repo *Repository) DeleteAvatar() error
- func (repo *Repository) DeleteCollaboration(uid int64) (err error)
- func (repo *Repository) DeleteProtectedBranch(id int64) (err error)
- func (repo *Repository) DeleteWiki() error
- func (repo *Repository) DescriptionHTML() template.HTML
- func (repo *Repository) FullName() string
- func (repo *Repository) GetAssignees() (_ []*User, err error)
- func (repo *Repository) GetBaseRepo() (err error)
- func (repo *Repository) GetBranchProtection(branchName string) (*ProtectedBranch, error)
- func (repo *Repository) GetCollaborators(listOptions ListOptions) ([]*Collaborator, error)
- func (repo *Repository) GetCommitsCountCacheKey(contextName string, isRef bool) string
- func (repo *Repository) GetDeletedBranchByID(id int64) (*DeletedBranch, error)
- func (repo *Repository) GetDeletedBranches() ([]*DeletedBranch, error)
- func (repo *Repository) GetForks(listOptions ListOptions) ([]*Repository, error)
- func (repo *Repository) GetIndexerStatus(indexerType RepoIndexerType) (*RepoIndexerStatus, error)
- func (repo *Repository) GetLFSMetaObjectByOid(oid string) (*LFSMetaObject, error)
- func (repo *Repository) GetLFSMetaObjects(page, pageSize int) ([]*LFSMetaObject, error)
- func (repo *Repository) GetLanguageStats() (LanguageStatList, error)
- func (repo *Repository) GetMilestoneByID(milestoneID int64) (*Milestone, error)
- func (repo *Repository) GetMirror() (err error)
- func (repo *Repository) GetOriginalURLHostname() string
- func (repo *Repository) GetOwner() error
- func (repo *Repository) GetProtectedBranches() ([]*ProtectedBranch, error)
- func (repo *Repository) GetReaders() (_ []*User, err error)
- func (repo *Repository) GetRepoTeams() ([]*Team, error)
- func (repo *Repository) GetReviewerTeams() ([]*Team, error)
- func (repo *Repository) GetReviewers(doerID, posterID int64) ([]*User, error)
- func (repo *Repository) GetStargazers(opts ListOptions) ([]*User, error)
- func (repo *Repository) GetTemplateRepo() (err error)
- func (repo *Repository) GetTopLanguageStats(limit int) (LanguageStatList, error)
- func (repo *Repository) GetTreePathLock(treePath string) (*LFSLock, error)
- func (repo *Repository) GetTrustModel() TrustModelType
- func (repo *Repository) GetUnit(tp UnitType) (*RepoUnit, error)
- func (repo *Repository) GetUserFork(userID int64) (*Repository, error)
- func (repo *Repository) GetWatchers(opts ListOptions) ([]*User, error)
- func (repo *Repository) GetWriters() (_ []*User, err error)
- func (repo *Repository) GitConfigPath() string
- func (repo *Repository) HTMLURL() string
- func (repo *Repository) HasWiki() bool
- func (repo *Repository) IsBeingCreated() bool
- func (repo *Repository) IsBeingMigrated() bool
- func (repo *Repository) IsCollaborator(userID int64) (bool, error)
- func (repo *Repository) IsDependenciesEnabled() bool
- func (repo *Repository) IsGenerated() bool
- func (repo *Repository) IsOwnedBy(userID int64) bool
- func (repo *Repository) IsOwnerMemberCollaborator(userID int64) (bool, error)
- func (repo *Repository) IsProtectedBranch(branchName string, doer *User) (bool, error)
- func (repo *Repository) IsProtectedBranchForPush(branchName string, doer *User) (bool, error)
- func (repo *Repository) IsReader(userID int64) (bool, error)
- func (repo *Repository) IsTimetrackerEnabled() bool
- func (repo *Repository) IssueStats(uid int64, filterMode int, isPull bool) (int64, int64)
- func (repo *Repository) Link() string
- func (repo *Repository) MustGetUnit(tp UnitType) *RepoUnit
- func (repo *Repository) MustOwner() *User
- func (repo *Repository) RecalculateAccesses() error
- func (repo *Repository) RelAvatarLink() string
- func (repo *Repository) RelLink() string
- func (repo *Repository) RemoveDeletedBranch(id int64) (err error)
- func (repo *Repository) RemoveLFSMetaObjectByOid(oid string) (int64, error)
- func (repo *Repository) RepoPath() string
- func (repo *Repository) SanitizedOriginalURL() string
- func (repo *Repository) SetArchiveRepoState(isArchived bool) (err error)
- func (repo *Repository) SignCRUDAction(u *User, tmpBasePath, parentCommit string) (bool, string, *git.Signature, error)
- func (repo *Repository) SignWikiCommit(u *User) (bool, string, *git.Signature, error)
- func (repo *Repository) UnitEnabled(tp UnitType) bool
- func (repo *Repository) UpdateDefaultBranch() error
- func (repo *Repository) UpdateIndexerStatus(indexerType RepoIndexerType, sha string) error
- func (repo *Repository) UpdateLanguageStats(commitID string, stats map[string]int64) error
- func (repo *Repository) UpdateSize(ctx DBContext) error
- func (repo *Repository) UploadAvatar(data []byte) error
- func (repo *Repository) WikiCloneLink() *CloneLink
- func (repo *Repository) WikiPath() string
- type RepositoryList
- func RepositoryListOfMap(repoMap map[int64]*Repository) RepositoryList
- func SearchRepository(opts *SearchRepoOptions) (RepositoryList, int64, error)
- func SearchRepositoryByCondition(opts *SearchRepoOptions, cond builder.Cond, loadAttributes bool) (RepositoryList, int64, error)
- func SearchRepositoryByName(opts *SearchRepoOptions) (RepositoryList, int64, error)
- type RepositoryStatus
- type Review
- func CreateReview(opts CreateReviewOptions) (*Review, error)
- func FindReviews(opts FindReviewOptions) ([]*Review, error)
- func GetCurrentReview(reviewer *User, issue *Issue) (*Review, error)
- func GetReviewByID(id int64) (*Review, error)
- func GetReviewByIssueIDAndUserID(issueID, userID int64) (*Review, error)
- func GetReviewersByIssueID(issueID int64) ([]*Review, error)
- func GetReviewersFromOriginalAuthorsByIssueID(issueID int64) ([]*Review, error)
- func GetTeamReviewerByIssueIDAndTeamID(issueID, teamID int64) (review *Review, err error)
- type ReviewCount
- type ReviewType
- type SMTPConfig
- type SSPIConfig
- type SearchEmailOptions
- type SearchEmailOrderBy
- type SearchEmailResult
- type SearchMembersOptions
- type SearchOrderBy
- type SearchOrganizationsOptions
- type SearchRepoOptions
- type SearchTeamOptions
- type SearchUserOptions
- type SignCommit
- type SignCommitWithStatuses
- type Star
- type Statistic
- type Stopwatch
- type Task
- type Team
- func GetTeam(orgID int64, name string) (*Team, error)
- func GetTeamByID(teamID int64) (*Team, error)
- func GetTeamsWithAccessToRepo(orgID, repoID int64, mode AccessMode) ([]*Team, error)
- func GetUserOrgTeams(orgID, userID int64) ([]*Team, error)
- func GetUserTeams(userID int64, listOptions ListOptions) ([]*Team, error)
- func SearchTeam(opts *SearchTeamOptions) ([]*Team, int64, error)
- func (t *Team) AddAllRepositories() (err error)
- func (t *Team) AddMember(userID int64) error
- func (t *Team) AddRepository(repo *Repository) (err error)
- func (t *Team) ColorFormat(s fmt.State)
- func (t *Team) GetMembers(opts *SearchMembersOptions) (err error)
- func (t *Team) GetRepositories(opts *SearchTeamOptions) error
- func (t *Team) GetUnitNames() (res []string)
- func (t *Team) GetUnits() error
- func (t *Team) HasRepository(repoID int64) bool
- func (t *Team) HasWriteAccess() bool
- func (t *Team) IsMember(userID int64) bool
- func (t *Team) IsOwnerTeam() bool
- func (t *Team) RemoveAllRepositories() (err error)
- func (t *Team) RemoveMember(userID int64) error
- func (t *Team) RemoveRepository(repoID int64) error
- func (t *Team) UnitEnabled(tp UnitType) bool
- type TeamRepo
- type TeamUnit
- type TeamUser
- type Topic
- func AddTopic(repoID int64, topicName string) (*Topic, error)
- func DeleteTopic(repoID int64, topicName string) (*Topic, error)
- func FindTopics(opts *FindTopicOptions) (topics []*Topic, err error)
- func GetRepoTopicByName(repoID int64, topicName string) (*Topic, error)
- func GetTopicByName(name string) (*Topic, error)
- type TrackedTime
- type TrackedTimeList
- type TrustModelType
- type TwoFactor
- type U2FRegistration
- type U2FRegistrationList
- type Unit
- type UnitConfig
- type UnitType
- type UpdateOAuth2ApplicationOptions
- type Upload
- type User
- func ExternalUserLogin(user *User, login, password string, source *LoginSource) (*User, error)
- func GetAssigneesByIssue(issue *Issue) (assignees []*User, err error)
- func GetMaileableUsersByIDs(ids []int64, isMention bool) ([]*User, error)
- func GetOrgByName(name string) (*User, error)
- func GetOrgsByUserID(userID int64, showAll bool) ([]*User, error)
- func GetOrgsCanCreateRepoByUserID(userID int64) ([]*User, error)
- func GetOwnedOrgsByUserID(userID int64) ([]*User, error)
- func GetOwnedOrgsByUserIDDesc(userID int64, desc string) ([]*User, error)
- func GetTeamMembers(teamID int64) ([]*User, error)
- func GetUserByEmail(email string) (*User, error)
- func GetUserByEmailContext(ctx DBContext, email string) (*User, error)
- func GetUserByID(id int64) (*User, error)
- func GetUserByName(name string) (*User, error)
- func GetUserByOpenID(uri string) (*User, error)
- func LoginViaLDAP(user *User, login, password string, source *LoginSource) (*User, error)
- func LoginViaPAM(user *User, login, password string, sourceID int64, cfg *PAMConfig) (*User, error)
- func LoginViaSMTP(user *User, login, password string, sourceID int64, cfg *SMTPConfig) (*User, error)
- func NewGhostUser() *User
- func NewReplaceUser(name string) *User
- func SearchUsers(opts *SearchUserOptions) (users []*User, _ int64, _ error)
- func UserSignIn(username, password string) (*User, error)
- func ValidateCommitWithEmail(c *git.Commit) *User
- func VerifyUserActiveCode(code string) (user *User)
- func (u *User) APIFormat() *api.User
- func (org *User) AccessibleReposEnv(userID int64) (AccessibleReposEnvironment, error)
- func (org *User) AddMember(uid int64) error
- func (u *User) AfterLoad()
- func (u *User) AvatarLink() string
- func (u *User) BeforeUpdate()
- func (org *User) CanCreateOrgRepo(uid int64) (bool, error)
- func (u *User) CanCreateOrganization() bool
- func (u *User) CanCreateRepo() bool
- func (u *User) CanEditGitHook() bool
- func (u *User) CanImportLocal() bool
- func (u *User) ColorFormat(s fmt.State)
- func (u *User) CustomAvatarRelativePath() string
- func (u *User) DashboardLink() string
- func (u *User) DeleteAvatar() error
- func (u *User) DisplayName() string
- func (u *User) EmailNotifications() string
- func (u *User) GenerateActivateCode() string
- func (u *User) GenerateEmailActivateCode(email string) string
- func (u *User) GenerateRandomAvatar() error
- func (u *User) GetAccessRepoIDs(units ...UnitType) ([]int64, error)
- func (user *User) GetAccessibleRepositories(limit int) (repos []*Repository, _ error)
- func (u *User) GetDisplayName() string
- func (u *User) GetEmail() string
- func (u *User) GetFollowers(listOptions ListOptions) ([]*User, error)
- func (u *User) GetFollowing(listOptions ListOptions) ([]*User, error)
- func (org *User) GetMembers() (err error)
- func (u *User) GetMirrorRepositories() ([]*Repository, error)
- func (u *User) GetOrgRepositoryIDs(units ...UnitType) ([]int64, error)
- func (u *User) GetOrganizationCount() (int64, error)
- func (u *User) GetOrganizations(opts *SearchOrganizationsOptions) error
- func (u *User) GetOwnedOrganizations() (err error)
- func (org *User) GetOwnerTeam() (*Team, error)
- func (u *User) GetRepositories(listOpts ListOptions, names ...string) (err error)
- func (user *User) GetRepositoryAccesses() (map[*Repository]AccessMode, error)
- func (u *User) GetRepositoryIDs(units ...UnitType) ([]int64, error)
- func (u *User) GetStarredRepoCount(private bool) (int64, error)
- func (u *User) GetStarredRepos(private bool, page, pageSize int, orderBy string) (repos RepositoryList, err error)
- func (org *User) GetTeam(name string) (*Team, error)
- func (org *User) GetTeams(opts *SearchTeamOptions) error
- func (org *User) GetUserTeamIDs(userID int64) ([]int64, error)
- func (org *User) GetUserTeams(userID int64) ([]*Team, error)
- func (u *User) GitName() string
- func (u *User) HTMLURL() string
- func (u *User) HasForkedRepo(repoID int64) bool
- func (u *User) HasMemberWithUserID(userID int64) bool
- func (u *User) HashPassword(passwd string)
- func (u *User) HomeLink() string
- func (u *User) IsFollowing(followID int64) bool
- func (u *User) IsGhost() bool
- func (u *User) IsLocal() bool
- func (u *User) IsMailable() bool
- func (u *User) IsOAuth2() bool
- func (org *User) IsOrgMember(uid int64) (bool, error)
- func (u *User) IsOrganization() bool
- func (org *User) IsOwnedBy(uid int64) (bool, error)
- func (u *User) IsPasswordSet() bool
- func (u *User) IsPublicMember(orgID int64) bool
- func (u *User) IsUserOrgOwner(orgID int64) bool
- func (u *User) MaxCreationLimit() int
- func (u *User) NewGitSig() *git.Signature
- func (u *User) RealSizedAvatarLink(size int) string
- func (u *User) RelAvatarLink() string
- func (org *User) RemoveMember(uid int64) error
- func (org *User) RemoveOrgRepo(repoID int64) error
- func (u *User) SetEmailNotifications(set string) error
- func (u *User) SetLastLogin()
- func (u *User) ShortName(length int) string
- func (u *User) SizedRelAvatarLink(size int) string
- func (org *User) TeamsWithAccessToRepo(repoID int64, mode AccessMode) ([]*Team, error)
- func (u *User) UpdateDiffViewStyle(style string) error
- func (u *User) UpdateTheme(themeName string) error
- func (u *User) UploadAvatar(data []byte) error
- func (u *User) ValidatePassword(passwd string) bool
- type UserCommit
- type UserHeatmapData
- type UserIDCount
- type UserIssueStatsOptions
- type UserList
- type UserOpenID
- type UserType
- type Watch
- type Webhook
- func GetActiveWebhooksByOrgID(orgID int64) (ws []*Webhook, err error)
- func GetActiveWebhooksByRepoID(repoID int64) ([]*Webhook, error)
- func GetDefaultWebhook(id int64) (*Webhook, error)
- func GetDefaultWebhooks() ([]*Webhook, error)
- func GetSystemWebhook(id int64) (*Webhook, error)
- func GetSystemWebhooks() ([]*Webhook, error)
- func GetWebhookByID(id int64) (*Webhook, error)
- func GetWebhookByOrgID(orgID, id int64) (*Webhook, error)
- func GetWebhookByRepoID(repoID, id int64) (*Webhook, error)
- func GetWebhooksByOrgID(orgID int64, listOptions ListOptions) ([]*Webhook, error)
- func GetWebhooksByRepoID(repoID int64, listOptions ListOptions) ([]*Webhook, error)
- func (w *Webhook) AfterLoad()
- func (w *Webhook) EventCheckers() []struct{ ... }
- func (w *Webhook) EventsArray() []string
- func (w *Webhook) HasCreateEvent() bool
- func (w *Webhook) HasDeleteEvent() bool
- func (w *Webhook) HasForkEvent() bool
- func (w *Webhook) HasIssueCommentEvent() bool
- func (w *Webhook) HasIssuesAssignEvent() bool
- func (w *Webhook) HasIssuesEvent() bool
- func (w *Webhook) HasIssuesLabelEvent() bool
- func (w *Webhook) HasIssuesMilestoneEvent() bool
- func (w *Webhook) HasPullRequestApprovedEvent() bool
- func (w *Webhook) HasPullRequestAssignEvent() bool
- func (w *Webhook) HasPullRequestCommentEvent() bool
- func (w *Webhook) HasPullRequestEvent() bool
- func (w *Webhook) HasPullRequestLabelEvent() bool
- func (w *Webhook) HasPullRequestMilestoneEvent() bool
- func (w *Webhook) HasPullRequestRejectedEvent() bool
- func (w *Webhook) HasPullRequestReviewCommentEvent() bool
- func (w *Webhook) HasPullRequestSyncEvent() bool
- func (w *Webhook) HasPushEvent() bool
- func (w *Webhook) HasReleaseEvent() bool
- func (w *Webhook) HasRepositoryEvent() bool
- func (w *Webhook) History(page int) ([]*HookTask, error)
- func (w *Webhook) UpdateEvent() error
- type WhitelistOptions
- type XORMLogBridge
- func (l *XORMLogBridge) Debug(v ...interface{})
- func (l *XORMLogBridge) Debugf(format string, v ...interface{})
- func (l *XORMLogBridge) Error(v ...interface{})
- func (l *XORMLogBridge) Errorf(format string, v ...interface{})
- func (l *XORMLogBridge) Info(v ...interface{})
- func (l *XORMLogBridge) Infof(format string, v ...interface{})
- func (l *XORMLogBridge) IsShowSQL() bool
- func (l *XORMLogBridge) Level() xormlog.LogLevel
- func (l *XORMLogBridge) Log(skip int, level log.Level, format string, v ...interface{}) error
- func (l *XORMLogBridge) SetLevel(lvl xormlog.LogLevel)
- func (l *XORMLogBridge) ShowSQL(show ...bool)
- func (l *XORMLogBridge) Warn(v ...interface{})
- func (l *XORMLogBridge) Warnf(format string, v ...interface{})
Constants ¶
const ( // BadSignature is used as the reason when the signature has a KeyID that is in the db // but no key that has that ID verifies the signature. This is a suspicious failure. BadSignature = "gpg.error.probable_bad_signature" // BadDefaultSignature is used as the reason when the signature has a KeyID that matches the // default Key but is not verified by the default key. This is a suspicious failure. BadDefaultSignature = "gpg.error.probable_bad_default_signature" // NoKeyFound is used as the reason when no key can be found to verify the signature. NoKeyFound = "gpg.error.no_gpg_keys_found" )
const ( EnvRepoName = "GITEA_REPO_NAME" EnvRepoUsername = "GITEA_REPO_USER_NAME" EnvRepoID = "GITEA_REPO_ID" EnvRepoIsWiki = "GITEA_REPO_IS_WIKI" EnvPusherName = "GITEA_PUSHER_NAME" EnvPusherEmail = "GITEA_PUSHER_EMAIL" EnvPusherID = "GITEA_PUSHER_ID" EnvKeyID = "GITEA_KEY_ID" EnvIsDeployKey = "GITEA_IS_DEPLOY_KEY" EnvPRID = "GITEA_PR_ID" EnvIsInternal = "GITEA_INTERNAL_PUSH" EnvAppURL = "GITEA_ROOT_URL" )
env keys for git hooks need
const ( FilterModeAll = iota FilterModeAssign FilterModeCreate FilterModeMention )
Filter modes.
const ( // LFSMetaFileIdentifier is the string appearing at the first line of LFS pointer files. // https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md LFSMetaFileIdentifier = "version https://git-lfs.github.com/spec/v1" // LFSMetaFileOidPrefix appears in LFS pointer files on a line before the sha256 hash. LFSMetaFileOidPrefix = "oid sha256:" )
const ( SMTPPlain = "PLAIN" SMTPLogin = "LOGIN" )
SMTP authentication type names.
const ( // KeyTypeUser specifies the user key KeyTypeUser = iota + 1 // KeyTypeDeploy specifies the deploy key KeyTypeDeploy // KeyTypePrincipal specifies the authorized principal key KeyTypePrincipal )
const ( // EmailNotificationsEnabled indicates that the user would like to receive all email notifications EmailNotificationsEnabled = "enabled" // EmailNotificationsOnMention indicates that the user would like to be notified via email when mentioned. EmailNotificationsOnMention = "onmention" // EmailNotificationsDisabled indicates that the user would not like to be notified via email. EmailNotificationsDisabled = "disabled" )
const ( HookStatusNone = iota HookStatusSucceed HookStatusFail )
Possible statuses of a web hook
const NonexistentID = int64(math.MaxInt64)
NonexistentID an ID that will never exist
const RepositoryListDefaultPageSize = 64
RepositoryListDefaultPageSize is the default number of repositories to load in memory when running administrative tasks on all (or almost all) of them. The number should be low enough to avoid filling up all RAM with repository data...
Variables ¶
var ( // ErrMirrorNotExist mirror does not exist error ErrMirrorNotExist = errors.New("Mirror does not exist") // ErrNameEmpty name is empty error ErrNameEmpty = errors.New("Name is empty") )
var ( // Gitignores contains the gitiginore files Gitignores []string // Licenses contains the license files Licenses []string // Readmes contains the readme files Readmes []string // LabelTemplates contains the label template files and the list of labels for each file LabelTemplates map[string]string // ItemsPerPage maximum items per page in forks, watchers and stars of a repo ItemsPerPage = 40 )
var ( // AllRepoUnitTypes contains all the unit types AllRepoUnitTypes = []UnitType{ UnitTypeCode, UnitTypeIssues, UnitTypePullRequests, UnitTypeReleases, UnitTypeWiki, UnitTypeExternalWiki, UnitTypeExternalTracker, UnitTypeProjects, } // DefaultRepoUnits contains the default unit types DefaultRepoUnits = []UnitType{ UnitTypeCode, UnitTypeIssues, UnitTypePullRequests, UnitTypeReleases, UnitTypeWiki, UnitTypeProjects, } // NotAllowedDefaultRepoUnits contains units that can't be default NotAllowedDefaultRepoUnits = []UnitType{ UnitTypeExternalWiki, UnitTypeExternalTracker, } // MustRepoUnits contains the units could not be disabled currently MustRepoUnits = []UnitType{ UnitTypeCode, UnitTypeReleases, } // DisabledRepoUnits contains the units that have been globally disabled DisabledRepoUnits = []UnitType{} )
var ( UnitCode = Unit{ UnitTypeCode, "repo.code", "/", "repo.code.desc", 0, } UnitIssues = Unit{ UnitTypeIssues, "repo.issues", "/issues", "repo.issues.desc", 1, } UnitExternalTracker = Unit{ UnitTypeExternalTracker, "repo.ext_issues", "/issues", "repo.ext_issues.desc", 1, } UnitPullRequests = Unit{ UnitTypePullRequests, "repo.pulls", "/pulls", "repo.pulls.desc", 2, } UnitReleases = Unit{ UnitTypeReleases, "repo.releases", "/releases", "repo.releases.desc", 3, } UnitWiki = Unit{ UnitTypeWiki, "repo.wiki", "/wiki", "repo.wiki.desc", 4, } UnitExternalWiki = Unit{ UnitTypeExternalWiki, "repo.ext_wiki", "/wiki", "repo.ext_wiki.desc", 4, } UnitProjects = Unit{ UnitTypeProjects, "repo.projects", "/projects", "repo.projects.desc", 5, } // Units contains all the units Units = map[UnitType]Unit{ UnitTypeCode: UnitCode, UnitTypeIssues: UnitIssues, UnitTypeExternalTracker: UnitExternalTracker, UnitTypePullRequests: UnitPullRequests, UnitTypeReleases: UnitReleases, UnitTypeWiki: UnitWiki, UnitTypeExternalWiki: UnitExternalWiki, UnitTypeProjects: UnitProjects, } )
Enumerate all the units
var ( // ErrUserNotKeyOwner user does not own this key error ErrUserNotKeyOwner = errors.New("User does not own this public key") // ErrEmailNotExist e-mail does not exist error ErrEmailNotExist = errors.New("E-mail does not exist") // ErrEmailNotActivated e-mail address has not been activated error ErrEmailNotActivated = errors.New("E-mail address has not been activated") // ErrUserNameIllegal user name contains illegal characters error ErrUserNameIllegal = errors.New("User name contains illegal characters") // ErrLoginSourceNotActived login source is not actived error ErrLoginSourceNotActived = errors.New("Login source is not actived") // ErrUnsupportedLoginType login source is unknown error ErrUnsupportedLoginType = errors.New("Login source is unknown") )
var ( // ErrEmailAddressNotExist email address not exist ErrEmailAddressNotExist = errors.New("Email address does not exist") )
var ( // ErrLFSObjectNotExist is returned from lfs models functions in order // to differentiate between database and missing object errors. ErrLFSObjectNotExist = errors.New("LFS Meta object does not exist") )
var ( // ErrOpenIDNotExist openid is not known ErrOpenIDNotExist = errors.New("OpenID is unknown") )
var ( // HasEngine specifies if we have a xorm.Engine HasEngine bool )
var LabelColorPattern = regexp.MustCompile("^#[0-9a-fA-F]{6}$")
LabelColorPattern is a regexp witch can validate LabelColor
var LoginNames = map[LoginType]string{ LoginLDAP: "LDAP (via BindDN)", LoginDLDAP: "LDAP (simple auth)", LoginSMTP: "SMTP", LoginPAM: "PAM", LoginOAuth2: "OAuth2", LoginSSPI: "SPNEGO with SSPI", }
LoginNames contains the name of LoginType values.
var OAuth2DefaultCustomURLMappings = map[string]*oauth2.CustomURLMapping{ "github": OAuth2Providers["github"].CustomURLMapping, "gitlab": OAuth2Providers["gitlab"].CustomURLMapping, "gitea": OAuth2Providers["gitea"].CustomURLMapping, "nextcloud": OAuth2Providers["nextcloud"].CustomURLMapping, }
OAuth2DefaultCustomURLMappings contains the map of default URL's for OAuth2 providers that are allowed to have custom urls key is used to map the OAuth2Provider value is the mapping as defined for the OAuth2Provider
var OAuth2Providers = map[string]OAuth2Provider{ "bitbucket": {Name: "bitbucket", DisplayName: "Bitbucket", Image: "/img/auth/bitbucket.png"}, "dropbox": {Name: "dropbox", DisplayName: "Dropbox", Image: "/img/auth/dropbox.png"}, "facebook": {Name: "facebook", DisplayName: "Facebook", Image: "/img/auth/facebook.png"}, "github": {Name: "github", DisplayName: "GitHub", Image: "/img/auth/github.png", CustomURLMapping: &oauth2.CustomURLMapping{ TokenURL: oauth2.GetDefaultTokenURL("github"), AuthURL: oauth2.GetDefaultAuthURL("github"), ProfileURL: oauth2.GetDefaultProfileURL("github"), EmailURL: oauth2.GetDefaultEmailURL("github"), }, }, "gitlab": {Name: "gitlab", DisplayName: "GitLab", Image: "/img/auth/gitlab.png", CustomURLMapping: &oauth2.CustomURLMapping{ TokenURL: oauth2.GetDefaultTokenURL("gitlab"), AuthURL: oauth2.GetDefaultAuthURL("gitlab"), ProfileURL: oauth2.GetDefaultProfileURL("gitlab"), }, }, "gplus": {Name: "gplus", DisplayName: "Google", Image: "/img/auth/google.png"}, "openidConnect": {Name: "openidConnect", DisplayName: "OpenID Connect", Image: "/img/auth/openid_connect.svg"}, "twitter": {Name: "twitter", DisplayName: "Twitter", Image: "/img/auth/twitter.png"}, "discord": {Name: "discord", DisplayName: "Discord", Image: "/img/auth/discord.png"}, "gitea": {Name: "gitea", DisplayName: "Gitea", Image: "/img/auth/gitea.png", CustomURLMapping: &oauth2.CustomURLMapping{ TokenURL: oauth2.GetDefaultTokenURL("gitea"), AuthURL: oauth2.GetDefaultAuthURL("gitea"), ProfileURL: oauth2.GetDefaultProfileURL("gitea"), }, }, "nextcloud": {Name: "nextcloud", DisplayName: "Nextcloud", Image: "/img/auth/nextcloud.png", CustomURLMapping: &oauth2.CustomURLMapping{ TokenURL: oauth2.GetDefaultTokenURL("nextcloud"), AuthURL: oauth2.GetDefaultAuthURL("nextcloud"), ProfileURL: oauth2.GetDefaultProfileURL("nextcloud"), }, }, "yandex": {Name: "yandex", DisplayName: "Yandex", Image: "/img/auth/yandex.png"}, }
OAuth2Providers contains the map of registered OAuth2 providers in Gitea (based on goth) key is used to map the OAuth2Provider with the goth provider type (also in LoginSource.OAuth2Config.Provider) value is used to store display data
var SMTPAuths = []string{SMTPPlain, SMTPLogin}
SMTPAuths contains available SMTP authentication type names.
var SecurityProtocolNames = map[ldap.SecurityProtocol]string{ ldap.SecurityProtocolUnencrypted: "Unencrypted", ldap.SecurityProtocolLDAPS: "LDAPS", ldap.SecurityProtocolStartTLS: "StartTLS", }
SecurityProtocolNames contains the name of SecurityProtocol values.
Functions ¶
func AccessTokenByNameExists ¶
func AccessTokenByNameExists(token *AccessToken) (bool, error)
AccessTokenByNameExists checks if a token name has been used already by a user.
func AccessibleRepoIDsQuery ¶
AccessibleRepoIDsQuery queries accessible repository ids. Usable as a subquery wherever repo ids need to be filtered.
func ActivateUserEmail ¶
ActivateUserEmail will change the activated state of an email address, either primary (in the user table) or secondary (in the email_address table)
func AddDeletePRBranchComment ¶
func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branchName string) error
AddDeletePRBranchComment adds delete branch comment for pull request issue
func AddEmailAddress ¶
func AddEmailAddress(email *EmailAddress) error
AddEmailAddress adds an email address to given user.
func AddEmailAddresses ¶
func AddEmailAddresses(emails []*EmailAddress) error
AddEmailAddresses adds an email address to given user.
func AddOrgUser ¶
AddOrgUser adds new user to given organization.
func AddReleaseAttachments ¶
AddReleaseAttachments adds a release attachments
func AddTeamMember ¶
AddTeamMember adds new membership of given team to given organization, the user will have membership to given organization automatically when needed.
func AddUserOpenID ¶
func AddUserOpenID(openid *UserOpenID) error
AddUserOpenID adds an pre-verified/normalized OpenID URI to given user.
func AssertCount ¶
AssertCount assert the count of a bean
func AssertExistsAndLoadBean ¶
AssertExistsAndLoadBean assert that a bean exists and load it from the test database
func AssertExistsIf ¶
AssertExistsIf asserts that a bean exists or does not exist, depending on what is expected.
func AssertInt64InRange ¶
AssertInt64InRange assert value is in range [low, high]
func AssertNotExistsBean ¶
AssertNotExistsBean assert that a bean does not exist in the test database
func AssertSuccessfulInsert ¶
AssertSuccessfulInsert assert that beans is successfully inserted
func AttachmentRelativePath ¶
AttachmentRelativePath returns the relative path
func AvatarLink ¶
AvatarLink returns an avatar link for a provided email
func BeanExists ¶
BeanExists for testing, check if a bean exists
func BuildLabelNamesIssueIDsCondition ¶
BuildLabelNamesIssueIDsCondition returns a builder where get issue ids match label names
func CalculateTrustStatus ¶
func CalculateTrustStatus(verification *CommitVerification, repository *Repository, keyMap *map[string]bool) (err error)
CalculateTrustStatus will calculate the TrustStatus for a commit verification within a repository
func CanBeAssigned ¶
func CanBeAssigned(user *User, repo *Repository, isPull bool) (bool, error)
CanBeAssigned return true if user can be assigned to issue or pull requests in repo Currently any write access (code, issues or pr's) is assignable, to match assignee list in user interface. FIXME: user could send PullRequest also could be assigned???
func CanCreateOrgRepo ¶
CanCreateOrgRepo returns true if user can create repo in organization
func CanMarkConversation ¶
CanMarkConversation Add or remove Conversation mark for a code comment permission check the PR writer , offfcial reviewer and poster can do it
func CancelStopwatch ¶
CancelStopwatch removes the given stopwatch and logs it into issue's timeline.
func Cell2Int64 ¶
Cell2Int64 converts a xorm.Cell type to int64, and handles possible irregular cases.
func ChangeMilestoneAssign ¶
ChangeMilestoneAssign changes assignment of milestone for issue.
func ChangeMilestoneStatus ¶
ChangeMilestoneStatus changes the milestone open/closed status.
func ChangeMilestoneStatusByRepoIDAndID ¶
ChangeMilestoneStatusByRepoIDAndID changes a milestone open/closed status if the milestone ID is in the repo.
func ChangeOrgUserStatus ¶
ChangeOrgUserStatus changes public or private membership status.
func ChangeProjectAssign ¶
ChangeProjectAssign changes the project associated with an issue
func ChangeProjectStatus ¶
ChangeProjectStatus toggle a project between opened and closed
func ChangeProjectStatusByRepoIDAndID ¶
ChangeProjectStatusByRepoIDAndID toggles a project between opened and closed
func ChangeRepositoryName ¶
func ChangeRepositoryName(doer *User, repo *Repository, newRepoName string) (err error)
ChangeRepositoryName changes all corresponding setting from old repository name to new one.
func ChangeUserName ¶
ChangeUserName changes all corresponding setting from old user name to new one.
func CheckConsistencyFor ¶
CheckConsistencyFor test that all matching database entries are consistent
func CheckConsistencyForAll ¶
CheckConsistencyForAll test that the entire database is consistent
func CheckCreateRepository ¶
CheckCreateRepository check if could created a repository
func CheckIssueWatch ¶
CheckIssueWatch check if an user is watching an issue it takes participants and repo watch into account
func CheckLFSAccessForRepo ¶
func CheckLFSAccessForRepo(u *User, repo *Repository, mode AccessMode) error
CheckLFSAccessForRepo check needed access mode base on action
func CheckPrincipalKeyString ¶
CheckPrincipalKeyString strips spaces and returns an error if the given principal contains newlines
func CheckPublicKeyString ¶
CheckPublicKeyString checks if the given public key string is recognized by SSH. It returns the actual public key line on success.
func CheckRepoStats ¶
CheckRepoStats checks the repository stats
func CommentHashTag ¶
CommentHashTag returns unique hash tag for comment id.
func CommentTypeIsRef ¶
func CommentTypeIsRef(t CommentType) bool
CommentTypeIsRef returns true if CommentType is a reference from another issue
func ComposeHTTPSCloneURL ¶
ComposeHTTPSCloneURL returns HTTPS clone URL based on given owner and repository name.
func Cond ¶
func Cond(query interface{}, args ...interface{}) interface{}
Cond create a condition with arguments for a test
func ConvertUtf8ToUtf8mb4 ¶
func ConvertUtf8ToUtf8mb4() error
ConvertUtf8ToUtf8mb4 converts database and tables from utf8 to utf8mb4 if it's mysql and set ROW_FORMAT=dynamic
func CopyLFS ¶
func CopyLFS(ctx DBContext, newRepo, oldRepo *Repository) error
CopyLFS copies LFS data from one repo to another
func CopyLanguageStat ¶
func CopyLanguageStat(originalRepo, destRepo *Repository) error
CopyLanguageStat Copy originalRepo language stat information to destRepo (use for forked repo)
func CountIssues ¶
func CountIssues(opts *IssuesOptions) (int64, error)
CountIssues number return of issues by given conditions.
func CountIssuesByRepo ¶
func CountIssuesByRepo(opts *IssuesOptions) (map[int64]int64, error)
CountIssuesByRepo map from repoID to number of issues matching the options
func CountLFSLockByRepoID ¶
CountLFSLockByRepoID returns a count of all LFSLocks associated with a repository.
func CountLoginSources ¶
func CountLoginSources() int64
CountLoginSources returns number of login sources.
func CountMilestonesByRepoCond ¶
CountMilestonesByRepoCond map from repo conditions to number of milestones matching the options`
func CountNullArchivedRepository ¶
CountNullArchivedRepository counts the number of repositories with is_archived is null
func CountOrgMembers ¶
func CountOrgMembers(opts FindOrgMembersOpts) (int64, error)
CountOrgMembers counts the organization's members
func CountOrganizations ¶
func CountOrganizations() int64
CountOrganizations returns number of organizations.
func CountOrphanedIssues ¶
CountOrphanedIssues count issues without a repo
func CountOrphanedLabels ¶
CountOrphanedLabels return count of labels witch are broken and not accessible via ui anymore
func CountOrphanedObjects ¶
CountOrphanedObjects count subjects with have no existing refobject anymore
func CountRepoClosedMilestones ¶
CountRepoClosedMilestones returns number of closed milestones in given repository.
func CountRepositories ¶
CountRepositories returns number of repositories. Argument private only takes effect when it is false, set it true to count all repositories.
func CountUnread ¶
CountUnread count unread notifications for a user
func CountUserRepositories ¶
CountUserRepositories returns number of repositories user owns. Argument private only takes effect when it is false, set it true to count all repositories.
func CreateHookTask ¶
CreateHookTask creates a new hook task, it handles conversion from Payload to PayloadContent.
func CreateIssueDependency ¶
CreateIssueDependency creates a new dependency for an issue
func CreateLoginSource ¶
func CreateLoginSource(source *LoginSource) error
CreateLoginSource inserts a LoginSource in the DB if not already existing with the given name.
func CreateNotice ¶
func CreateNotice(tp NoticeType, desc string, args ...interface{}) error
CreateNotice creates new system notice.
func CreateOrStopIssueStopwatch ¶
CreateOrStopIssueStopwatch will create or remove a stopwatch and will log it into issue's timeline.
func CreateOrUpdateIssueNotifications ¶
func CreateOrUpdateIssueNotifications(issueID, commentID, notificationAuthorID, receiverID int64) error
CreateOrUpdateIssueNotifications creates an issue notification for each watcher, or updates it if already exists receiverID > 0 just send to reciver, else send to all watcher