# Packages
No description provided by the author
# Functions
AccessLevel returns the Access a user has to a repository.
AddDeletePRBranchComment adds delete branch comment for pull request issue.
AddDeployKey add new deploy key to database and authorized_keys file.
AddEmailAddress adds an email address to given user.
AddEmailAddresses adds an email address to given user.
AddGPGKey adds new public key to database.
AddOrgUser adds new user to given organization.
AddPublicKey adds new public key to database and authorized_keys file.
AddTeamMember adds new membership of given team to given organization, the user will have membership to given organization automatically when needed.
AddTestPullRequestTask adds new test tasks by given head/base repository and head/base branch, and generate new patch for testing as needed.
AddUserOpenID adds an pre-verified/normalized OpenID URI to given user.
AssertCount assert the count of a bean.
AssertExistsAndLoadBean assert that a bean exists and load it from the test database.
AssertInt64InRange assert value is in range [low, high].
AssertNotExistsBean assert that a bean does not exist in the test database.
AssertSuccessfulInsert assert that beans is successfully inserted.
AttachmentLocalPath returns where attachment is stored in local file system based on given UUID.
BeanExists for testing, check if a bean exists.
Cell2Int64 converts a xorm.Cell type to int64, and handles possible irregular cases.
ChangeMilestoneAssign changes assignment of milestone for issue.
ChangeMilestoneStatus changes the milestone open/closed status.
ChangeOrgUserStatus changes public or private membership status.
ChangeRepositoryName changes all corresponding setting from old repository name to new one.
ChangeUserName changes all corresponding setting from old user name to new one.
ChangeUsernameInPullRequests changes the name of head_user_name.
CheckConsistencyFor test that all matching database entries are consistent.
CheckConsistencyForAll test that the entire database is consistent.
CheckPublicKeyString checks if the given public key string is recognized by SSH.
CheckRepoStats checks the repository stats.
CleanUpMigrateInfo finishes migrating repository and/or wiki with things that don't need to be done for mirrors.
CommitRepoAction adds new commit action to the repository, and prepare corresponding webhooks.
CommitToPushCommit transforms a git.Commit to PushCommit type.
ComposeHTTPSCloneURL returns HTTPS clone URL based on given owner and repository name.
Cond create a condition with arguments for a test.
CountIssuesByRepo map from repoID to number of issues matching the options.
CountLoginSources returns number of login sources.
CountNotices returns number of notices.
CountOrganizations returns number of organizations.
CountRepoClosedMilestones returns number of closed milestones in given repository.
CountRepositories returns number of repositories.
CountUserRepositories returns number of repositories user owns.
CountUsers returns number of users.
CreateComment creates comment of issue or commit.
CreateHookTask creates a new hook task, it handles conversion from Payload to PayloadContent.
CreateIssueComment creates a plain issue comment.
CreateLoginSource inserts a LoginSource in the DB if not already existing with the given name.
CreateNotice creates new system notice.
CreateOrganization creates record of a new organization.
CreateOrUpdateIssueNotifications creates an issue notification for each watcher, or updates it if already exists.
CreateOrUpdateIssueWatch set watching for a user and issue.
CreateRefComment creates a commit reference comment to issue.
CreateRelease creates a new release of repository.
CreateRepository creates a repository for given user or organization.
CreateRepositoryNotice creates new system notice with type NoticeRepository.
CreateTestEngine create in-memory sqlite database for unit tests Any package that calls this must import github.com/mattn/go-sqlite3.
CreateUser creates record of a new user.
CreateWebhook creates a new web hook.
DeleteAccessTokenByID deletes access token by given ID.
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.
DeleteComment deletes the comment.
DeleteDeployKey deletes deploy key from its repository authorized_keys file if needed.
DeleteEmailAddress deletes an email address of given user.
DeleteEmailAddresses deletes multiple email addresses.
DeleteGPGKey deletes GPG key information in database.
DeleteInactivateUsers deletes all inactivate users and email addresses.
DeleteIssueLabel deletes issue-label relation.
DeleteLabel delete a label of given repository.
DeleteMilestoneByRepoID deletes a milestone from a repository.
DeleteMirrorByRepoID deletes a mirror by repoID.
DeleteMissingRepositories deletes all repository records that lost Git files.
DeleteNotice deletes a system notice by given ID.
DeleteNotices deletes all notices with ID from start to end (inclusive).
DeleteNoticesByIDs deletes notices by given IDs.
DeleteOldRepositoryArchives deletes old repository archives.
DeleteOrganization completely and permanently deletes everything of organization.
DeletePublicKey deletes SSH key information both in database and authorized_keys file.
DeleteReleaseByID deletes a release and corresponding Git tag by given ID.
DeleteRepository deletes a repository for a user or organization.
DeleteRepositoryArchives deletes all repositories' archives.
DeleteSource deletes a LoginSource record in DB.
DeleteTeam deletes given team.
DeleteTwoFactorByID deletes two-factor authentication token by given ID.
DeleteUpload delete a upload.
DeleteUploadByUUID deletes a upload by UUID.
DeleteUploads deletes multiple uploads.
DeleteUser completely and permanently deletes everything of a user, but issues/comments/pulls will be kept and shown as someone has been deleted.
DeleteUserOpenID deletes an openid address of given user.
DeleteWebhookByOrgID deletes webhook of organization by given ID.
DeleteWebhookByRepoID deletes webhook of repository by given ID.
DeliverHooks checks and delivers undelivered hooks.
DumpDatabase dumps all data from database according the special database SQL syntax to file system.
ExternalUserLogin attempts a login using external source types.
FindComments returns all comments according options.
FollowUser marks someone be another's follower.
ForkRepository forks a repository.
GetAccessTokenBySHA returns access token by given sha1.
GetActiveOAuth2LoginSourceByName returns a OAuth2 LoginSource based on the given name.
GetActiveOAuth2ProviderLoginSources returns all actived LoginOAuth2 sources.
GetActiveOAuth2Providers returns the map of configured active OAuth2 providers key is used as technical name (like in the callbackURL) values to display.
GetActiveWebhooksByOrgID returns all active webhooks for an organization.
GetActiveWebhooksByRepoID returns all active webhooks of repository.
GetAssigneeByID returns the user with write access of repository by given ID.
GetAttachmentByUUID returns attachment by given UUID.
GetAttachmentsByCommentID returns all attachments if comment by given ID.
GetAttachmentsByIssueID returns all attachments of an issue.
GetBranchesByPath returns a branch by it's path.
GetCommentByID returns the comment by given ID.
GetCommentsByIssueID returns all comments of an issue.
GetCommentsByIssueIDSince returns a list of comments of an issue since a given time point.
GetCommentsByRepoIDSince returns a list of comments for all issues in a repo since a given time point.
GetCommitGraph return a list of commit (GraphItems) from all branches.
GetCommitStatus populates a given status for a given commit.
GetCommitStatuses returns all statuses for a given commit.
GetCount get the count of a bean.
GetDeployKeyByID returns deploy key by given ID.
GetDeployKeyByRepo returns deploy key by given public key ID and repository ID.
GetDiffCommit builds a Diff representing the given commitID.
GetDiffRange builds a Diff between two commits of a repository.
GetEmailAddresses returns all email addresses belongs to given user.
GetExternalLogin checks if a externalID in loginSourceID scope already exists.
GetFeeds returns actions according to the provided options.
GetGPGKeyByID returns public key by given ID.
GetIssueByID returns an issue by given ID.
GetIssueByIndex returns issue by index in a repository.
GetIssueByRef returns an Issue specified by a GFM reference.
GetIssuesByIDs return issues with the given IDs.
GetIssueStats returns issue statistic information by given conditions.
GetIssueWatch returns an issue watch by user and issue.
GetIssueWatchers returns watchers/unwatchers of a given issue.
GetLabelByID returns a label by given ID.
GetLabelInRepoByID returns a label by ID in given repository.
GetLabelInRepoByName returns a label by name in given repository.
GetLabelsByIssueID returns all labels that belong to given issue by ID.
GetLabelsByRepoID returns all labels that belong to given repository by ID.
GetLabelsInRepoByIDs returns a list of labels by IDs in given repository, it silently ignores label IDs that are not belong to the repository.
GetLabelTemplateFile loads the label template file by given name, then parses and returns a list of name-color pairs.
GetLatestCommitStatus returns all statuses with a unique context for a given commit.
GetLFSMetaObjectByOid selects a LFSMetaObject entry from database by its OID.
GetLoginSourceByID returns login source by given ID.
GetMilestoneByRepoID returns the milestone in a repository.
GetMilestones returns a list of milestones of given repository and status.
GetMilestonesByRepoID returns all milestones of a repository.
GetMirrorByRepoID returns mirror information of a repository.
GetNotificationCount returns the notification count for user.
GetOrgByName returns organization by given name.
GetOrgsByUserID returns a list of organizations that the given user ID has joined.
GetOrgUsersByOrgID returns all organization-user relations by organization ID.
GetOrgUsersByUserID returns all organization-user relations by user ID.
GetOwnedOrgsByUserID returns a list of organizations are owned by given user ID.
GetOwnedOrgsByUserIDDesc returns a list of organizations are owned by given user ID, ordered descending by the given condition.
GetParticipantsByIssueID returns all users who are participated in comments of an issue.
GetPrivateRepositoryCount returns the total number of private repositories of user.
GetProtectedBranchBy getting protected branch by ID/Name.
GetProtectedBranchByRepoID getting protected branch by repo ID.
GetPublicKeyByID returns public key by given ID.
GetPublicRepositoryCount returns the total number of public repositories of user.
GetPullRequestByID returns a pull request by given ID.
GetPullRequestByIndex returns a pull request by the given index.
GetPullRequestByIssueID returns pull request by given issue ID.
GetRawDiff dumps diff results of repository in given commit ID to io.Writer.
GetRawIssueByIndex returns raw issue without loading attributes by index in a repository.
GetRecentUpdatedRepositories returns the list of repositories that are recently updated.
GetRelease returns release by given ID.
GetReleaseAttachments retrieves the attachments for releases.
GetReleaseByID returns release with given ID.
GetReleaseCountByRepoID returns the count of releases of repository.
GetReleasesByRepoID returns a list of releases of repository.
GetRepoIssueStats returns number of open and closed repository issues by given filter mode.
GetRepositoriesByForkID returns all repositories with given fork ID.
GetRepositoryByID returns the repository by given id if exists.
GetRepositoryByName returns the repository by given name under user if exists.
GetRepositoryByRef returns a Repository specified by a GFM reference.
GetRepositoryCount returns the total number of repositories of user.
GetSlackPayload converts a slack webhook into a SlackPayload.
GetStarredRepos returns the repos starred by a particular user.
GetStatistic returns the database statistics.
GetTeam returns team by given team name and organization.
GetTeamByID returns team by given ID.
GetTeamMembers returns all members in given team of organization.
GetTwoFactorByUID returns the two-factor authentication token associated with the user, if any.
GetUnmergedPullRequest returns a pull request that is open and has not been merged by given head/base and repo/branch.
GetUnmergedPullRequestsByBaseInfo returns all pull requests that are open and has not been merged by given base information (repo and branch).
GetUnmergedPullRequestsByHeadInfo returns all pull requests that are open and has not been merged by given head information (repo and branch).
GetUploadByUUID returns the Upload by UUID.
GetUploadsByUUIDs returns multiple uploads by UUIDS.
GetUser checks if a user already exists.
GetUserByEmail returns the user object by given e-mail if exists.
GetUserByID returns the user object by given ID if exists.
GetUserByKeyID get user information by user's public key id.
GetUserByName returns user by given name.
GetUserByOpenID returns the user object by given OpenID if exists.
GetUserEmailsByNames returns a list of e-mails corresponds to names.
GetUserIDsByNames returns a slice of ids corresponds to names.
GetUserIssueStats returns issue statistic information for dashboard by given conditions.
GetUserMirrorRepositories returns a list of mirror repositories of given user.
GetUserOpenIDs returns all openid addresses that belongs to given user.
GetUserRepositories returns a list of repositories of given user.
GetUserSalt returns a random user salt token.
GetUsersByIDs returns all resolved users from a list of Ids.
GetUserTeams returns all teams that user belongs to in given organization.
GetWatchedRepos returns the repos watched by a particular user.
GetWatchers returns all watchers of given repository.
GetWebhookByOrgID returns webhook of organization by given ID.
GetWebhookByRepoID returns webhook of repository by given ID.
GetWebhooksByOrgID returns all webhooks for an organization.
GetWebhooksByRepoID returns all webhooks of a repository.
GitFsck calls 'git fsck' to check repository health.
GitGcRepos calls 'git gc' to remove unnecessary files and optimize the local repository.
HandleCloneUserCredentials replaces user credentials from HTTP/HTTPS URL with placeholder <credentials>.
HasAccess returns true if user has access to repo.
HasDeployKey returns true if public key is a deploy key of given repository.
HasForkedRepo checks if given user has already forked a repository with given ID.
HasIssueLabel returns true if issue has been labeled.
HasTeamRepo returns true if given repository belongs to team.
HookTasks returns a list of hook tasks by given conditions.
InitDeliverHooks starts the hooks delivery thread.
InitFixtures initialize test fixtures for a test database.
InitIssueIndexer initialize issue indexer.
InitMailRender initializes the macaron mail renderer.
InitOAuth2 initialize the OAuth2 lib and register all active OAuth2 providers in the library.
InitSyncMirrors initializes a go routine to sync the mirrors.
InitTestPullRequests runs the task to test all the checking status pull requests.
IsEmailUsed returns true if the email has been used.
IsErrAccessTokenEmpty checks if an error is a ErrAccessTokenEmpty.
IsErrAccessTokenNotExist checks if an error is a ErrAccessTokenNotExist.
IsErrAttachmentNotExist checks if an error is a ErrAttachmentNotExist.
IsErrBranchNotExist checks if an error is a ErrBranchNotExist.
IsErrCommentNotExist checks if an error is a ErrCommentNotExist.
IsErrDeployKeyAlreadyExist checks if an error is a ErrDeployKeyAlreadyExist.
IsErrDeployKeyNameAlreadyUsed checks if an error is a ErrDeployKeyNameAlreadyUsed.
IsErrDeployKeyNotExist checks if an error is a ErrDeployKeyNotExist.
IsErrEmailAlreadyUsed checks if an error is a ErrEmailAlreadyUsed.
IsErrExternalLoginUserAlreadyExist checks if an error is a ExternalLoginUserAlreadyExist.
IsErrExternalLoginUserNotExist checks if an error is a ExternalLoginUserNotExist.
IsErrGPGEmailNotFound checks if an error is a ErrGPGEmailNotFound.
IsErrGPGKeyAccessDenied checks if an error is a ErrGPGKeyAccessDenied.
IsErrGPGKeyIDAlreadyUsed checks if an error is a ErrKeyNameAlreadyUsed.
IsErrGPGKeyNotExist checks if an error is a ErrGPGKeyNotExist.
IsErrGPGKeyParsing checks if an error is a ErrGPGKeyParsing.
IsErrInvalidCloneAddr checks if an error is a ErrInvalidCloneAddr.
IsErrInvalidTagName checks if an error is a ErrInvalidTagName.
IsErrIssueNotExist checks if an error is a ErrIssueNotExist.
IsErrKeyAccessDenied checks if an error is a ErrKeyAccessDenied.
IsErrKeyAlreadyExist checks if an error is a ErrKeyAlreadyExist.
IsErrKeyNameAlreadyUsed checks if an error is a ErrKeyNameAlreadyUsed.
IsErrKeyNotExist checks if an error is a ErrKeyNotExist.
IsErrKeyUnableVerify checks if an error is a ErrKeyUnableVerify.
IsErrLabelNotExist checks if an error is a ErrLabelNotExist.
IsErrLastOrgOwner checks if an error is a ErrLastOrgOwner.
IsErrLoginSourceAlreadyExist checks if an error is a ErrLoginSourceAlreadyExist.
IsErrLoginSourceInUse checks if an error is a ErrLoginSourceInUse.
IsErrLoginSourceNotExist checks if an error is a ErrLoginSourceNotExist.
IsErrMilestoneNotExist checks if an error is a ErrMilestoneNotExist.
IsErrNamePatternNotAllowed checks if an error is an ErrNamePatternNotAllowed.
IsErrNameReserved checks if an error is a ErrNameReserved.
IsErrOpenIDAlreadyUsed checks if an error is a ErrOpenIDAlreadyUsed.
IsErrOpenIDConnectInitialize checks if an error is a ExternalLoginUserAlreadyExist.
IsErrOrgNotExist checks if an error is a ErrOrgNotExist.
IsErrPullRequestAlreadyExists checks if an error is a ErrPullRequestAlreadyExists.
IsErrPullRequestNotExist checks if an error is a ErrPullRequestNotExist.
IsErrReachLimitOfRepo checks if an error is a ErrReachLimitOfRepo.
IsErrReleaseAlreadyExist checks if an error is a ErrReleaseAlreadyExist.
IsErrReleaseNotExist checks if an error is a ErrReleaseNotExist.
IsErrRepoAlreadyExist checks if an error is a ErrRepoAlreadyExist.
IsErrRepoFileAlreadyExist checks if an error is a ErrRepoFileAlreadyExist.
IsErrRepoNotExist checks if an error is a ErrRepoNotExist.
IsErrRepoRedirectNotExist check if an error is an ErrRepoRedirectNotExist.
IsErrTeamAlreadyExist checks if an error is a ErrTeamAlreadyExist.
IsErrTwoFactorNotEnrolled checks if an error is a ErrTwoFactorNotEnrolled.
IsErrUpdateTaskNotExist checks if an error is a ErrUpdateTaskNotExist.
IsErrUploadNotExist checks if an error is a ErrUploadNotExist.
IsErrUserAlreadyExist checks if an error is a ErrUserAlreadyExists.
IsErrUserHasOrgs checks if an error is a ErrUserHasOrgs.
IsErrUserNotAllowedCreateOrg checks if an error is an ErrUserNotAllowedCreateOrg.
IsErrUserNotExist checks if an error is a ErrUserNotExist.
IsErrUserOwnRepos checks if an error is a ErrUserOwnRepos.
IsErrWebhookNotExist checks if an error is a ErrWebhookNotExist.
IsErrWikiAlreadyExist checks if an error is a ErrWikiAlreadyExist.
IsFollowing returns true if user is following followID.
IsOpenIDUsed returns true if the openid has been used.
IsOrganizationMember returns true if given user is member of organization.
IsOrganizationOwner returns true if given user is in the owner team.
IsPublicMembership returns true if given user public his/her membership.
IsReleaseExist returns true if release with given tag name already exists.
IsRepositoryExist returns true if the repository with given name under user has already existed.
IsStaring checks if user has starred given repository.
Issues returns a list of issues by given conditions.
IsTeamMember returns true if given user is a member of team.
IsUsableRepoName returns true when repository is usable.
IsUsableTeamName tests if a name could be as team name.
IsUsableUsername returns an error when a username is reserved.
IsUserExist checks if given user name exist, the user name should be noncased unique.
IsValidHookContentType returns true if given name is a valid hook content type.
IsValidHookTaskType returns true if given name is a valid hook task type.
IsWatching checks if user has watched given repository.
LinkAccountToUser link the gothUser to the user.
ListAccessTokens returns a list of access tokens belongs to given user.
ListAccountLinks returns a map with the ExternalLoginUser and its LoginSource.
ListDeployKeys returns all deploy keys by given repository ID.
ListGPGKeys returns a list of public keys belongs to given user.
ListPublicKeys returns a list of public keys belongs to given user.
ListToPushCommits transforms a list.List to PushCommits type.
LoadConfigs loads the database settings.
LoadFixtures load fixtures for a test database.
LoadRepoConfig loads the repository config.
LoginSources returns a slice of all login sources found in DB.
LoginViaLDAP queries if login/password is valid against the LDAP directory pool, and create a local user if success when enabled.
LoginViaPAM queries if login/password is valid against the PAM, and create a local user if success when enabled.
LoginViaSMTP queries if login/password is valid against the SMTP, and create a local user if success when enabled.
LookupRepoRedirect look up if a repository has a redirect name.
MakeEmailPrimary sets primary email address of given user.
MergePullRequestAction adds new action for merging pull request.
MigrateRepository migrates a existing repository from other project hosting.
MilestoneStats returns number of open and closed milestones of given repository.
MirrorUpdate checks and updates mirror repositories.
NewAccessToken creates new access token.
NewAttachment creates a new attachment object.
NewCommitStatus creates a new CommitStatus given a bunch of parameters NOTE: All text-values will be trimmed from whitespaces.
NewEngine initializes a new xorm.Engine.
NewGhostUser creates and returns a fake user for someone has deleted his/her account.
NewIssue creates new issue with labels for repository.
NewIssueLabel creates a new issue-label relation.
NewIssueLabels creates a list of issue-label relations.
NewLabel creates a new label for a repository.
NewLabels creates new labels for a repository.
NewLFSMetaObject stores a given populated LFSMetaObject structure in the database if it is not already present.
NewMilestone creates new milestone of repository.
NewPullRequest creates new pull request with labels for repository.
NewPushCommits creates a new PushCommits object.
NewRepoAction adds new action for creating repository.
NewRepoContext creates a new repository context.
NewRepoRedirect create a new repo redirect.
NewTeam creates a record of new team.
NewTestEngine sets a new test xorm.Engine.
NewTwoFactor creates a new two-factor authentication token.
NewUpload creates a new upload object.
Notices returns notices in given page.
NotificationsForUser returns notifications for a given user and status.
NotifyWatchers creates batch of actions for every watcher.
Organizations returns number of organizations in given page.
ParseAccessMode returns corresponding access mode to given permission string.
ParseCommitsWithSignature checks if signaute of commits are corresponding to users gpg keys.
ParseCommitsWithStatus checks commits latest statuses and calculates its worst status state.
ParseCommitWithSignature check if signature is good against keystore.
ParsePatch builds a Diff object from a io.Reader and some parameters.
Ping tests if database is alive.
PrepareTestDatabase load test fixtures into test database.
PrepareWebhooks adds new webhooks to task queue for given payload.
PullRequests returns all pull requests for a base Repo by the given conditions.
PushUpdate must be called for any push actions in order to generates necessary push action history feeds.
ReinitMissingRepositories reinitializes all repository records that lost Git files.
RemoveAccountLink will remove all external login sources for the given user.
RemoveAllWithNotice removes all directories in given path and creates a system notice when error occurs.
RemoveLFSMetaObjectByOid removes a LFSMetaObject entry from database by its OID.
RemoveOrgUser removes user from given organization.
RemoveTeamMember removes member from given team of given organization.
RenameRepoAction adds new action for renaming a repository.
RepoPath returns repository path by given user and repository name.
Repositories returns all repositories.
RepositoryListOfMap make list from values of map.
RewriteAllPublicKeys removes any authorized key and rewrite all keys from database again.
SearchIssuesByKeyword searches for issues by given conditions.
SearchPublicKeyByContent searches content as prefix (leak e-mail part) and returns public key found.
SearchRepositoryByName takes keyword and part of repository name to search, it returns results in given range and number of total results.
SearchUserByName takes keyword and part of user name to search, it returns results in given range and number of total results.
SendActivateAccountMail sends an activation mail to the user (new user registration).
SendActivateEmailMail sends confirmation email to confirm new email address.
SendCollaboratorMail sends mail notification to new collaborator.
SendIssueCommentMail composes and sends issue comment emails to target receivers.
SendIssueMentionMail composes and sends issue mention emails to target receivers.
SendRegisterNotifyMail triggers a notify e-mail by admin created a account.
SendResetPasswordMail sends a password reset mail to the user.
SendTestMail sends a test mail.
SendUserMail sends a mail to the user.
SetEngine sets the xorm.Engine.
SetNotificationStatus change the notification status.
SlackLinkFormatter creates a link compatible with slack.
SlackShortTextFormatter replaces &, <, > with HTML characters.
SlackTextFormatter replaces &, <, > with HTML characters see: https://api.slack.com/docs/formatting.
SMTPAuth performs an SMTP authentication.
SortReleases sorts releases by number of commits and created time.
SSHKeyGenParsePublicKey extracts key type and length using ssh-keygen.
SSHNativeParsePublicKey extracts the key type and length using the golang SSH library.
StarRepo or unstar repository.
SyncExternalUsers is used to synchronize users with external authorization source.
SyncMirrors checks and syncs mirrors.
SyncRepositoryHooks rewrites all repositories' pre-receive, update and post-receive hooks to make sure the binary and custom conf path are up-to-date.
TestPullRequests checks and tests untested patches of pull requests.
ToggleUserOpenIDVisibility toggles visibility of an openid address of given user.
ToHookContentType returns HookContentType by given name.
ToHookTaskType returns HookTaskType by given name.
ToWikiPageName formats a URL back to corresponding wiki page name, and removes leading characters './' to prevent changing files that are not belong to wiki repository.
ToWikiPageURL formats a string to corresponding wiki URL name.
TransferOwnership transfers all corresponding setting from old user to new one.
TransferRepoAction adds new action for transferring repository, the Owner field of repository is assumed to be new owner.
UnfollowUser unmarks someone as another's follower.
UpdateAccessToken updates information of access token.
UpdateComment updates information of comment.
UpdateDeployKey updates deploy key information.
UpdateHookTask updates information of hook task.
UpdateIssue updates all fields of given issue.
UpdateIssueCols only updates values of specific columns for given issue.
UpdateIssueIndexer add/update an issue to the issue indexer.
UpdateIssueMentions extracts mentioned people from content and updates issue-user relations for them.
UpdateIssuesCommit checks if issues are manipulated by commit message.
UpdateIssueUserByAssignee updates issue-user relation for assignee.
UpdateIssueUserByRead updates issue-user relation for reading.
UpdateIssueUsersByMentions updates issue-user pairs by mentioning.
UpdateLabel updates label information.
UpdateLocalCopyBranch pulls latest changes of given branch from repoPath to localPath.
UpdateMilestone updates information of given milestone.
UpdateMirror updates the mirror.
UpdateProtectedBranch update queue.
UpdatePublicKey updates given public key.
UpdatePublicKeyUpdated updates public key use time.
UpdateRelease updates information of a release.
UpdateRepository updates a repository.
UpdateRepositoryUnits updates a repository's units.
UpdateSource updates a LoginSource record in DB.
UpdateTeam updates information of team.
UpdateTwoFactor updates a two-factor authentication token.
UpdateUser updates user's information.
UpdateUserCols update user according special columns.
UpdateUserSetting updates user's settings.
UpdateWebhook updates information of webhook.
UploadLocalPath returns where uploads is stored in local file system based on given UUID.
UserPath returns the path absolute path of user repositories.
Users returns number of users in given page.
UserSignIn validates user name and password.
ValidateCommitsWithEmails checks if authors' e-mails of commits are corresponding to users.
ValidateCommitWithEmail check if author's e-mail of commit is corresponding to a user.
VerifyActiveEmailCode verifies active email code when active account.
VerifyUserActiveCode verifies active code when active account.
WatchRepo watch or unwatch repository.
WikiPath returns wiki data path by given user and repository name.
# Constants
3.
0.
4.
1.
2.
12.
14.
10.
5.
6.
7.
1.
11.
9.
2.
13.
15.
3.
8.
4.
Enumerate all the comment tag types.
Enumerate all the comment tag types.
Enumerate all the comment tag types.
Enumerate all the comment tag types.
Assignees changed.
Change Title.
Enumerate all the comment types.
Plain comment, can be associated with a commit (CommitID > 0) and a line (LineNum > 0).
Reference from a comment.
Reference from a commit (not part of a pull request).
Delete Branch.
References.
Labels changed.
Milestone changed.
Reference from a pull request.
Enumerate all the comment types.
define unknown comment type.
CommitStatusError is for when the Status is Error.
CommitStatusFailure is for when the Status is Failure.
CommitStatusPending is for when the Status is Pending.
CommitStatusSuccess is for when the Status is Success.
CommitStatusWarning is for when the Status is Warning.
ContentTypeForm is an url-encoded form payload for web hook.
ContentTypeJSON is a JSON payload for web hooks.
DiffFileType possible values.
DiffFileType possible values.
DiffFileType possible values.
DiffFileType possible values.
DiffLineType possible values.
DiffLineType possible values.
DiffLineType possible values.
DiffLineType possible values.
env keys for git hooks need.
env keys for git hooks need.
env keys for git hooks need.
env keys for git hooks need.
env keys for git hooks need.
Filter modes.
Filter modes.
Filter modes.
Filter modes.
Types of hook tasks.
Types of hook tasks.
Types of hook events.
Types of hook events.
Types of hook events.
Possible statuses of a web hook.
Possible statuses of a web hook.
Possible statuses of a web hook.
KeyTypeDeploy specifies the deploy key.
KeyTypeUser specifies the user key.
LFSMetaFileIdentifier is the string appearing at the first line of LFS pointer files.
LFSMetaFileOidPrefix appears in LFS pointer files on a line before the sha256 hash.
5.
2.
Note: new type must append to the end of list to maintain compatibility.
6.
4.
1.
3.
NonexistentID an ID that will never exist.
NoticeRepository type.
NotificationSourceCommit is a notification of a commit.
NotificationSourceIssue is a notification of an issue.
NotificationSourcePullRequest is a notification of a pull request.
NotificationStatusPinned represents a pinned notification.
NotificationStatusRead represents a read notification.
NotificationStatusUnread represents an unread notification.
ProtectedBranchRepoID protected Repo ID.
Enumerate all the pull request types.
Enumerate all the pull request types.
Enumerate all the pull request status.
Enumerate all the pull request status.
Enumerate all the pull request status.
Enumerate all the pull request status.
RawDiffType possible values.
RawDiffType possible values.
Types of hook tasks.
SMTP authentication type names.
SMTP authentication type names.
1 code.
7 ExternalTracker.
6 ExternalWiki.
2 issues.
3 PRs.
4 Releases.
5 Wiki.
Historic reason to make it starts at 0.
UserTypeOrganization defines an organization.
# Variables
DbCfg holds the database settings.
EnableSQLite3 use SQLite3.
EnableTiDB enable TiDB.
ErrEmailAddressNotExist email address not exist.
ErrEmailNotActivated e-mail address has not been activated error.
ErrEmailNotExist e-mail does not exist error.
ErrInvalidReference invalid reference specified error.
ErrLFSObjectNotExist is returned from lfs models functions in order to differentiate between database and missing object errors.
ErrLoginSourceNotActived login source is not actived error.
ErrMirrorNotExist mirror does not exist error.
ErrNameEmpty name is empty error.
ErrOpenIDNotExist openid is not known.
ErrRepoFileNotExist repository file does not exist error.
ErrRepoFileNotLoaded repository file not loaded error.
ErrTeamNotExist team does not exist.
ErrUnitNotExist organization does not exist.
ErrUnsupportedLoginType login source is unknown error.
ErrUserNameIllegal user name contains illegal characters error.
ErrUserNotKeyOwner user does not own this key error.
Gitignores contains the gitiginore files.
HasEngine specifies if we have a xorm.Engine.
HookQueue is a global queue of web hooks.
ItemsPerPage maximum items per page in forks, watchers and stars of a repo.
LabelTemplates contains the label template files.
Licenses contains the license files.
LoginNames contains the name of LoginType values.
MirrorQueue holds an UniqueQueue object of the mirror.
MustRepoUnits contains the units could not be disabled currently.
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.
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.
Readmes contains the readme files.
SecurityProtocolNames contains the name of SecurityProtocol values.
SMTPAuths contains available SMTP authentication type names.
Enumerate all the units.
Enumerate all the units.
Enumerate all the units.
Enumerate all the units.
Enumerate all the units.
Enumerate all the units.
Units contains all the units.
Enumerate all the units.
# Structs
Access represents the highest access level of a user to the repository.
AccessToken represents a personal access token.
Action represents user operation type and other information to repository.
Attachment represent a attachment of issue/comment/release.
Branch holds the branch information.
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.
Comment represents a comment in commit and issue page.
CommitRepoActionOptions represent options of a new commit action.
CommitStatus holds a single Status of a single Commit.
CommitVerification represents a commit validation of signature.
CreateCommentOptions defines options for creating comment.
CreateRepoOptions contains the create repository options.
DeleteRepoFileOptions holds the repository delete file options.
DeployKey represents deploy key information and its relation with repository.
Diff represents a difference between two git trees.
DiffFile represents a file diff.
DiffLine represents a line difference in a DiffSection.
DiffSection represents a section of a DiffFile.
EmailAddress is the list of all email addresses of a user.
ErrAccessTokenEmpty represents a "AccessTokenEmpty" kind of error.
ErrAccessTokenNotExist represents a "AccessTokenNotExist" kind of error.
ErrAttachmentNotExist represents a "AttachmentNotExist" kind of error.
ErrBranchNotExist represents a "BranchNotExist" kind of error.
ErrCommentNotExist represents a "CommentNotExist" kind of error.
ErrDeployKeyAlreadyExist represents a "DeployKeyAlreadyExist" kind of error.
ErrDeployKeyNameAlreadyUsed represents a "DeployKeyNameAlreadyUsed" kind of error.
ErrDeployKeyNotExist represents a "DeployKeyNotExist" kind of error.
ErrEmailAlreadyUsed represents a "EmailAlreadyUsed" kind of error.
ErrExternalLoginUserAlreadyExist represents a "ExternalLoginUserAlreadyExist" kind of error.
ErrExternalLoginUserNotExist represents a "ExternalLoginUserNotExist" kind of error.
ErrGPGEmailNotFound represents a "ErrGPGEmailNotFound" kind of error.
ErrGPGKeyAccessDenied represents a "GPGKeyAccessDenied" kind of Error.
ErrGPGKeyIDAlreadyUsed represents a "GPGKeyIDAlreadyUsed" kind of error.
ErrGPGKeyNotExist represents a "GPGKeyNotExist" kind of error.
ErrGPGKeyParsing represents a "ErrGPGKeyParsing" kind of error.
ErrInvalidCloneAddr represents a "InvalidCloneAddr" kind of error.
ErrInvalidTagName represents a "InvalidTagName" kind of error.
ErrIssueNotExist represents a "IssueNotExist" kind of error.
ErrKeyAccessDenied represents a "KeyAccessDenied" kind of error.
ErrKeyAlreadyExist represents a "KeyAlreadyExist" kind of error.
ErrKeyNameAlreadyUsed represents a "KeyNameAlreadyUsed" kind of error.
ErrKeyNotExist represents a "KeyNotExist" kind of error.
ErrKeyUnableVerify represents a "KeyUnableVerify" kind of error.
ErrLabelNotExist represents a "LabelNotExist" kind of error.
ErrLastOrgOwner represents a "LastOrgOwner" kind of error.
ErrLoginSourceAlreadyExist represents a "LoginSourceAlreadyExist" kind of error.
ErrLoginSourceInUse represents a "LoginSourceInUse" kind of error.
ErrLoginSourceNotExist represents a "LoginSourceNotExist" kind of error.
ErrMilestoneNotExist represents a "MilestoneNotExist" kind of error.
ErrNamePatternNotAllowed represents a "pattern not allowed" error.
ErrNameReserved represents a "reserved name" error.
ErrOpenIDAlreadyUsed represents a "OpenIDAlreadyUsed" kind of error.
ErrOpenIDConnectInitialize represents a "OpenIDConnectInitialize" kind of error.
ErrOrgNotExist represents a "OrgNotExist" kind of error.
ErrPullRequestAlreadyExists represents a "PullRequestAlreadyExists"-error.
ErrPullRequestNotExist represents a "PullRequestNotExist" kind of error.
ErrReachLimitOfRepo represents a "ReachLimitOfRepo" kind of error.
ErrReleaseAlreadyExist represents a "ReleaseAlreadyExist" kind of error.
ErrReleaseNotExist represents a "ReleaseNotExist" kind of error.
ErrRepoAlreadyExist represents a "RepoAlreadyExist" kind of error.
ErrRepoFileAlreadyExist represents a "RepoFileAlreadyExist" kind of error.
ErrRepoNotExist represents a "RepoNotExist" kind of error.
ErrRepoRedirectNotExist represents a "RepoRedirectNotExist" kind of error.
ErrTeamAlreadyExist represents a "TeamAlreadyExist" kind of error.
ErrTwoFactorNotEnrolled indicates that a user is not enrolled in two-factor authentication.
ErrUpdateTaskNotExist represents a "UpdateTaskNotExist" kind of error.
ErrUploadNotExist represents a "UploadNotExist" kind of error.
ErrUserAlreadyExist represents a "user already exists" error.
ErrUserHasOrgs represents a "UserHasOrgs" kind of error.
ErrUserNotAllowedCreateOrg represents a "UserNotAllowedCreateOrg" kind of error.
ErrUserNotExist represents a "UserNotExist" kind of error.
ErrUserOwnRepos represents a "UserOwnRepos" kind of error.
ErrWebhookNotExist represents a "WebhookNotExist" kind of error.
ErrWikiAlreadyExist represents a "WikiAlreadyExist" kind of error.
ExternalLoginUser makes the connecting between some existing user and additional external login sources.
ExternalTrackerConfig describes external tracker config.
ExternalWikiConfig describes external wiki config.
FindCommentsOptions describes the conditions to Find comments.
FindReleasesOptions describes the conditions to Find releases.
Follow represents relations of user and his/her followers.
GetFeedsOptions options for retrieving feeds.
GPGKey represents a GPG key.
GraphItem represent one commit, or one relation in timeline.
HookEvent represents events that will delivery hook.
HookEvents is a set of web hook events.
HookRequest represents hook task request information.
HookResponse represents hook task response information.
HookTask represents a hook task.
Issue represents an issue or pull request of repository.
IssueLabel represents an issue-label relation.
IssuesOptions represents options of an issue.
IssueStats represents issue statistic information.
IssueStatsOptions contains parameters accepted by GetIssueStats.
IssueUser represents an issue-user relation.
IssueWatch is connection request for receiving issue notification.
Label represents a label of repository for issues.
LDAPConfig holds configuration for LDAP login source.
LFSMetaObject stores metadata for LFS tracked files.
LFSTokenResponse defines the JSON structure in which the JWT token is stored.
LoginSource represents an external way for authorizing users.
MigrateRepoOptions contains the repository migrate options.
Milestone represents a milestone of repository.
Mirror represents mirror information of a repository.
NewCommitStatusOptions holds options for creating a CommitStatus.
NewIssueOptions represents the options of a new issue.
Notice represents a system notice for admin.
Notification represents a notification.
OAuth2Config holds configuration for the OAuth2 login source.
OAuth2Provider describes the display values of a single OAuth2 provider.
OrgUser represents an organization-user relation.
PAMConfig holds configuration for the PAM login source.
ProtectedBranch struct.
PublicKey represents a user or deploy SSH public key.
PullRequest represents relation between pull request and repositories.
PullRequestsOptions holds the options for PRs.
PushCommit represents a commit in a push operation.
PushCommits represents list of commits in a push operation.
PushUpdateOptions defines the push update options.
Release represents a release of repository.
RepoRedirect represents that a repo name should be redirected to another.
Repository represents a git repository.
RepoUnit describes all units of a repository.
SearchRepoOptions holds the search options swagger:parameters repoSearch.
SearchUserOptions contains the options for searching.
SignCommit represents a commit with validation of signature.
SignCommitWithStatuses represents a commit with validation of signature and status state.
SlackAttachment contains the slack message.
SlackMeta contains the slack metadata.
SlackPayload contains the information about the slack channel.
SMTPConfig holds configuration for the SMTP login source.
Star represents a starred repo by an user.
Statistic contains the database statistics.
Team represents a organization team.
TeamRepo represents an team-repository relation.
TeamUser represents an team-user relation.
TwoFactor represents a two-factor authentication token.
Unit is a section of one repository.
UnitConfig describes common unit config.
UpdateRepoFileOptions holds the repository file update options.
Upload represent a uploaded file to a repo to be deleted when moved.
UploadRepoFileOptions contains the uploaded repository file options.
User represents the object of individual and member of organization.
UserCommit represents a commit with validation of user.
UserOpenID is the list of all OpenID identities of a user.
Watch is connection request for receiving repository notification.
Webhook represents a web hook object.
# Interfaces
AccessibleReposEnvironment operations involving the repositories that are accessible to a particular user.
Engine represents a xorm engine or session.
# Type aliases
AccessMode specifies the users access mode.
ActionType represents the type of an action.
CommentTag defines comment tag type.
CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
CommitStatusState holds the state of a Status It can be "pending", "success", "error", "failure", and "warning".
DiffFileType represents the type of a DiffFile.
DiffLineType represents the type of a DiffLine.
GraphItems is a list of commits from all branches.
HookContentType is the content type of a web hook.
HookEventType is the type of an hook event.
HookStatus is the status of a web hook.
HookTaskType is the type of an hook task.
IssueList defines a list of issues.
KeyType specifies the key type.
LoginType represents an login type.
MirrorRepositoryList contains the mirror repositories.
NoticeType describes the notice type.
No description provided by the author
No description provided by the author
PullRequestList defines a list of pull requests.
PullRequestStatus defines pull request status.
PullRequestType defines pull request type.
RawDiffType type of a raw diff.
RepositoryList contains a list of repositories.
UnitType is Unit's Type.
UserType defines the user type.