# Functions
AccessibleRepoIDsQuery queries accessible repository ids.
AccessibleRepositoryCondition takes a user a returns a condition for checking if a repository is accessible.
AddReleaseAttachments adds a release attachments.
AddTopic adds a topic name to a repository (if it does not already have it).
AttachmentRelativePath returns the relative path.
ChangeCollaborationAccessMode sets new access mode for the collaboration.
CheckCreateRepository check if could created a repository.
CleanRepoLicenses will remove all license record of the repo.
ClearRepoStars clears all stars for a repository and from the user that starred it.
ComposeHTTPSCloneURL returns HTTPS clone URL based on given owner and repository name.
CopyLanguageStat Copy originalRepo language stat information to destRepo (use for forked repo).
CopyLicense Copy originalRepo license information to destRepo (use for forked repo).
CountNullArchivedRepository counts the number of repositories with is_archived is null.
CountOrphanedAttachments returns the number of bad attachments.
CountOrphanedAttachments returns the number of topics that don't belong to any repository.
CountRepositories returns number of repositories.
CountRepository counts repositories based on search options,.
DecrementRepoForkNum decrement repository fork number.
DeleteAllRepoArchives deletes all repo archives records.
DeleteAttachment deletes the given attachment and optionally the associated file.
DeleteAttachments deletes the given attachments and optionally the associated files.
DeleteAttachmentsByComment deletes all attachments associated with the given comment.
DeleteAttachmentsByIssue deletes all attachments associated with the given issue.
DeleteAttachmentsByRelease deletes all attachments associated with the given release.
DeleteMirrorByRepoID deletes a mirror by repoID.
DeleteOrphanedAttachments delete all bad attachments.
DeleteOrphanedAttachments delete all topics that don't belong to any repository.
DeleteRedirect delete any redirect from the specified repo name to anything else.
DeleteTopic removes a topic name from a repository (if it has it).
DeleteUploadByUUID deletes a upload by UUID.
DeleteUploads deletes multiple uploads.
ExistAttachmentsByUUID returns true if attachment exists with the given UUID.
ExistsRepoArchiverWithStoragePath checks if there is a RepoArchiver for a given storage path.
ExistsWithAvatarAtStoragePath returns true if there is a user with this Avatar.
FindReposMapByIDs find repos as map.
FindUserCodeAccessibleOwnerRepoIDs finds all repository IDs for the given owner whose code the user can see.
FindUserCodeAccessibleRepoIDs finds all at Code level accessible repositories' ID by the user's id.
FindUserOrgForks returns the forked repositories for one user from a repository.
FixNullArchivedRepository sets is_archived to false where it is null.
GenerateTopics generates topics from a template repository.
GetAttachmentByID returns attachment by given id.
GetAttachmentByReleaseIDFileName returns attachment by given releaseId and fileName.
GetAttachmentByUUID returns attachment by given UUID.
GetAttachmentsByCommentID returns all attachments if comment by given ID.
GetAttachmentsByIssueID returns all attachments of an issue.
GetAttachmentsByIssueIDImagesLatest returns the latest image attachments of an issue.
GetAttachmentsByUUIDs returns attachment by given UUID list.
GetCollaboration get collaboration for a repository id with a user id.
GetCollaborators returns the collaborators for a repository.
GetForkedRepo checks if given user has already forked a repository with given ID.
GetForksByUserAndOrgs return forked repos of the user and owned orgs.
GetIndexerStatus loads repo codes indxer status.
GetIssuePostersWithSearch returns users with limit of 30 whose username started with prefix that have authored an issue/pull request for the given repository If isShowFullName is set to true, also include full name prefix search.
GetLanguageStats returns the language statistics for a repository.
GetLatestReleaseByRepoID returns the latest release for a repository.
GetMirrorByRepoID returns mirror information of a repository.
GetPushMirrorsByRepoID returns push-mirror information of a repository.
GetPushMirrorsSyncedOnCommit returns push-mirrors for this repo that should be updated by new commits.
GetRelease returns release by given ID.
GetReleaseAttachments retrieves the attachments for releases.
GetReleaseByID returns release with given ID.
GetReleaseForRepoByID returns release with given ID.
GetRepoArchiver get an archiver.
GetRepoAssignees returns all users that have write access and can be assigned to issues of the repository,.
GetRepoLicenses returns the license statistics for a repository.
GetRepositoriesByForkID returns all repositories with given fork ID.
GetRepositoriesMapByIDs returns the repositories by given id slice.
GetRepositoryByID returns the repository by given id if exists.
GetRepositoryByName returns the repository by given name under user if exists.
GetRepositoryByOwnerAndName returns the repository by given owner name and repo name.
GetRepositoryByURL returns the repository by given url.
GetRepoTopicByName retrieves topic from name for a repo if it exist.
GetRepoWatchers returns range of users watching given repository.
GetRepoWatchersIDs returns IDs of watchers for a given repo ID but avoids joining with `user` for performance reasons User permissions must be verified elsewhere if required.
GetStargazers returns the users that starred the repo.
GetStarredRepos returns the repos starred by a particular user.
GetTagNamesByRepoID returns a list of release tag names of repository.
GetTemplateRepo populates repo.TemplateRepo for a generated repository and returns an error on failure (NOTE: no error is returned for non-generated repositories, and TemplateRepo will be left untouched).
GetTopicByName retrieves topic by name.
GetTopLanguageStats returns the top language statistics for a repository.
GetUnindexedRepos returns repos which do not have an indexer status.
GetUploadByUUID returns the Upload by UUID.
GetUploadsByUUIDs returns multiple uploads by UUIDS.
GetUserFork return user forked repository from this repository, if not forked return nil.
GetUserRepositories returns a list of repositories of given user.
GetWatch gets what kind of subscription a user has on a given repository; returns dummy record if none found.
GetWatchedRepos returns the repos watched by a particular user.
GetWatchers returns all watchers of given repository.
HasForkedRepo checks if given user has already forked a repository with given ID.
IncrementRepoForkNum increment repository fork number.
InsertMirror inserts a mirror to database.
InsertReleases migrates release.
IsCollaborator check if a user is a collaborator of a repository.
IsErrAttachmentNotExist checks if an error is a ErrAttachmentNotExist.
IsErrReachLimitOfRepo checks if an error is a ErrReachLimitOfRepo.
IsErrRedirectNotExist check if an error is an ErrRepoRedirectNotExist.
IsErrReleaseAlreadyExist checks if an error is a ErrReleaseAlreadyExist.
IsErrReleaseNotExist checks if an error is a ErrReleaseNotExist.
IsErrRepoAlreadyExist checks if an error is a ErrRepoAlreadyExist.
IsErrRepoFilesAlreadyExist checks if an error is a ErrRepoAlreadyExist.
IsErrRepoNotExist checks if an error is a ErrRepoNotExist.
IsErrTopicNotExist checks if an error is an ErrTopicNotExist.
IsErrUnitTypeNotExist checks if an error is a ErrUnitNotExist.
IsErrUploadNotExist checks if an error is a ErrUploadNotExist.
IsErrUserDoesNotHaveAccessToRepo checks if an error is a ErrRepoFileAlreadyExists.
IsErrWikiAlreadyExist checks if an error is an ErrWikiAlreadyExist.
IsErrWikiInvalidFileName checks if an error is an ErrWikiInvalidFileName.
IsErrWikiReservedName checks if an error is an ErrWikiReservedName.
IsOwnerMemberCollaborator checks if a provided user is the owner, a collaborator or a member of a team in a repository.
IsReleaseExist returns true if release with given tag name already exists.
IsRepositoryModelOrDirExist returns true if the repository with given name under user has already existed.
IsStaring checks if user has starred given repository.
IsUsableRepoName returns true when repository is usable.
IsWatching checks if user has watched given repository.
IsWatchMode Decodes watchability of WatchMode.
LookupRedirect look up if a repository has a redirect name.
MirrorsIterate iterates all mirror repositories.
NewRedirect create a new repo redirect.
NewUpload creates a new upload object.
PushMirrorsIterate iterates all push-mirror repositories.
PushUpdateDeleteTag must be called for any push actions to delete tag.
PushUpdateDeleteTagsContext updates a number of delete tags with context.
RemoveTopicsFromRepo remove all topics from the repo and decrements respective topics repo count.
RepoPath returns repository path by given user and repository name.
RepositoryListOfMap make list from values of map.
SanitizeAndValidateTopics sanitizes and checks an array or topics.
SaveOrUpdateTag must be called for any push actions to add tag.
SaveTopics save topics to a repository.
SearchRepository returns repositories based on search options, it returns results in given range and number of total results.
SearchRepositoryByCondition search repositories by condition.
SearchRepositoryByName takes keyword and part of repository name to search, it returns results in given range and number of total results.
SearchRepositoryCondition creates a query condition according search repository options.
SearchRepositoryIDs takes keyword and part of repository name to search, it returns results in given range and number of total results.
SearchRepositoryIDsByCondition search repository IDs by given condition.
SetArchiveRepoState sets if a repo is archived.
StarRepo or unstar repository.
ToTrustModel converts a string to a TrustModelType.
TouchMirror updates the mirror updatedUnix.
UpdateAttachment updates the given attachment in database.
UpdateAttachmentByUUID Updates attachment via uuid.
UpdateDefaultBranch updates the default branch.
UpdateIndexerStatus updates indexer status.
UpdateLanguageStats updates the language statistics for repository.
UpdateMirror updates the mirror.
UpdatePushMirror updates the push-mirror.
UpdatePushMirrorInterval updates the push-mirror.
UpdateRelease updates all columns of a release.
UpdateReleasesMigrationsByType updates all migrated repositories' releases from gitServiceType to replace originalAuthorID to posterID.
UpdateRepoArchiverStatus updates archiver's status.
UpdateRepoIssueNumbers updates one of a repositories amount of (open|closed) (issues|PRs) with the current count.
UpdateRepoLicenses updates the license statistics for repository.
UpdateRepositoryCols updates repository's columns.
UpdateRepositoryOwnerName updates the owner name of all repositories owned by the user.
UpdateRepositoryOwnerNames updates repository owner_names (this should only be used when the ownerName has changed case).
UpdateRepositoryUpdatedTime updates a repository's updated time.
UpdateRepoSize updates the repository size, calculating it using getDirectorySize.
UpdateRepoUnit updates the provided repo unit.
UploadLocalPath returns where uploads is stored in local file system based on given UUID.
UserAccessRepoCond returns a condition for selecting all repositories a user has unit independent access to.
UserAssignedRepoCond return user as assignee repositories list.
userCollaborationRepoCond returns a condition for selecting all repositories a user is collaborator in.
UserCreateIssueRepoCond return user created issues repositories list.
UserMentionedRepoCond return user metinoed repositories list.
UserOrgPublicUnitRepoCond returns the condition that one user could access all public repositories in the special organization.
UserOrgTeamRepoCond selects repos that the given user has access to through team membership.
UserOrgUnitRepoCond selects repos that the given user has access to through org and the special unit.
UserOwnedRepoCond returns user ownered repositories.
ValidateTopic checks a topic by length and match pattern rules.
ValuesRepository converts a repository map to a list FIXME: Remove in favor of maps.values when MIN_GO_VERSION >= 1.18.
WatchIfAuto subscribes to repo if AutoWatchOnChanges is set.
WatchRepo watch or unwatch repository.
WikiPath returns wiki data path by given user and repository name.
# Constants
the archiver is generating.
it's ready.
kinds of TrustModel.
kinds of TrustModel.
kinds of TrustModel.
default trust model.
MergeStyleFastForwardOnly fast-forward merge if possible, otherwise fail.
MergeStyleManuallyMerged pr has been merged manually, just mark it as merged directly.
MergeStyleMerge create merge commit.
MergeStyleRebase rebase before merging, and fast-forward.
MergeStyleRebaseMerge rebase before merging with merge commit (--no-ff).
MergeStyleRebaseUpdate not a merge style, used to update pull head by rebase.
MergeStyleSquash squash commits into single commit before merging.
ProjectsModeAll allows both kinds of projects.
ProjectsModeNone doesn't allow projects.
ProjectsModeOwner allows only owner-level projects.
ProjectsModeRepo allows only repo-level projects.
0.
1.
repository is migrating.
repository is in a permanently broken state.
RepositoryListDefaultPageSize is the default number of repositories to load in memory when running administrative tasks on all (or almost all) of them.
repository pending in ownership transfer state.
a normal repository.
text representations to be returned in SizeDetail.Name.
text representations to be returned in SizeDetail.Name.
3.
2.
0.
1.
# Variables
ErrMirrorNotExist mirror does not exist error.
OrderByFlatMap is similar to OrderByMap but use human language keywords to decide between asc and desc.
OrderByMap represents all possible search order.
# Structs
Attachment represent a attachment of issue/comment/release.
CloneLink represents different types of clone URLs of repository.
Collaboration represent the relation between an individual and a repository.
Collaborator represents a user with collaboration details.
ErrAttachmentNotExist represents a "AttachmentNotExist" kind of error.
ErrReachLimitOfRepo represents a "ReachLimitOfRepo" kind of error.
ErrRedirectNotExist represents a "RedirectNotExist" kind of error.
ErrReleaseAlreadyExist represents a "ReleaseAlreadyExist" kind of error.
ErrReleaseNotExist represents a "ReleaseNotExist" kind of error.
ErrRepoAlreadyExist represents a "RepoAlreadyExist" kind of error.
ErrRepoFilesAlreadyExist represents a "RepoFilesAlreadyExist" kind of error.
ErrRepoNotExist represents a "RepoNotExist" kind of error.
ErrTopicNotExist represents an error that a topic is not exist.
ErrUnitTypeNotExist represents a "UnitTypeNotExist" kind of error.
ErrUploadNotExist represents a "UploadNotExist" kind of error.
ErrUserDoesNotHaveAccessToRepo represents an error where the user doesn't has access to a given repo.
ErrWikiAlreadyExist represents a "WikiAlreadyExist" kind of error.
ErrWikiInvalidFileName represents an invalid wiki file name.
ErrWikiReservedName represents a reserved name error.
ExternalTrackerConfig describes external tracker config.
ExternalWikiConfig describes external wiki config.
FindReleasesOptions describes the conditions to Find releases.
FindRepoArchiversOption represents an archiver options.
FindTopicOptions represents the options when fdin topics.
IssuesConfig describes issues config.
LanguageStat describes language statistics of a repository.
Mirror represents mirror information of a repository.
ProjectsConfig describes projects config.
PullRequestsConfig describes pull requests config.
PushMirror represents mirror information of a repository.
Redirect represents that a repo name should be redirected to another.
Release represents a release of repository.
RepoArchiver represents all archivers.
RepoIndexerStatus status of a repo's entry in the repo indexer For now, implicitly refers to default branch.
Repository represents a git repository.
RepoTopic represents associated repositories and topics.
RepoUnit describes all units of a repository.
SearchRepoOptions holds the search options.
Star represents a starred repo by an user.
Topic represents a topic of repositories.
UnitConfig describes common unit config.
Upload represent a uploaded file to a repo to be deleted when moved.
Watch is connection request for receiving repository notification.
# Type aliases
ArchiverStatus represents repo archive status.
LanguageStatList defines a list of language statistics.
MergeStyle represents the approach to merge commits into base branch.
ProjectsMode represents the projects enabled for a repository.
RepoIndexerType specifies the repository indexer type.
RepoLicenseList defines a list of repo licenses.
RepositoryList contains a list of repositories.
RepositoryStatus defines the status of repository.
TrustModelType defines the types of trust model for this repository.
WatchMode specifies what kind of watch the user has on a repository.