package
0.9.99
Repository: https://github.com/go-gitea/gitea.git
Documentation: pkg.go.dev

# Packages

# Functions

AccessLevel returns the Access a user has to a repository.
AddDeployKey add new deploy key to database and authorized_keys file.
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.
AddTeamRepo adds new repository relation to team.
AddTestPullRequestTask adds new test tasks by given head/base repository and head/base branch, and generate new patch for testing as needed.
AttachmentLocalPath returns where attachment is stored in local file system based on given UUID.
Cell2Int64 converts a xorm.Cell type to int64, and handles possible irregular cases.
ChangeMilestoneAssign changes assignment of milestone for issue.
ChangeMilestoneIssueStats updates the open/closed issues counter and progress for the milestone associated with the given 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.
CheckPublicKeyString checks if the given public key string is recognized by SSH.
Finish migrating repository and/or wiki with things that don't need to be done for mirrors.
CommitRepoAction adds new commit actio 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.
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.
CountRepoMilestones returns number of 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.
CreateNotice creates new system notice.
CreateOrganization creates record of a new organization.
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 NOTICE_REPOSITORY.
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.
DeleteCommentByID deletes the comment by given ID.
DeleteDeployKey deletes deploy key from its repository authorized_keys file if needed.
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.
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.
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.
DeleteTeam deletes given team.
DeleteUser completely and permanently deletes everything of a user, but issues/comments/pulls will be kept and shown as someone has been deleted.
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 to file system.
FollowUser marks someone be another's follower.
GetAccessTokenBySHA returns access token by given sha1.
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.
GetCommentByID returns the comment by given ID.
GetCommentsByIssueID returns all comments of an issue.
GetCommentsByIssueID returns a list of comments of an issue since a given time point.
GetDeployKeyByID returns deploy key by given ID.
GetDeployKeyByRepo returns deploy key by given public key ID and repository ID.
GetEmailAddresses returns all email addresses belongs to given user.
GetFeeds returns action list of given user in given context.
GetIssueByID returns an issue by given ID.
GetIssueByIndex returns issue by index in a repository.
GetIssueByRef returns an Issue specified by a GFM reference.
GetIssueLabels returns all issue-label relations of given issue by ID.
GetIssueStats returns issue statistic information by given conditions.
GetIssueUserPairsByMode returns issue-user pairs by given repository and user.
GetIssueUserPairsByRepoIds returns issue-user pairs by given repository IDs.
GetIssueUsers returns issue-user pairs by given repository and user.
GetLabelByID returns a label by given ID.
GetLabelInRepoByID returns a label by ID 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.
GetLoginSourceByID returns login source by given ID.
GetWebhookByRepoID 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.
GetOrgByName returns organization by given name.
GetOrgsByUserID returns a list of organizations that the given user ID has joined.
GetOrgsByUserIDDesc returns a list of organizations that the given user ID has joined, ordered descending by the given condition.
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.
GetOwnedOrganizationsByUserIDDesc returns a list of organizations are owned by given user ID, ordered descending by the given condition.
GetPublicKeyByID returns public key by given ID.
GetPullRequestByID returns a pull request by given ID.
GetPullRequestByIssueID returns pull request by given issue ID.
GetRawDiff dumps diff results of repository in given commit ID to io.Writer.
GetIssueByIndex 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.
GetReleaseByID returns release with given ID.
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.
GetTeam returns team by given team name and organization.
GetTeamByID returns team by given ID.
GetTeamMembers returns all members in given team of organization.
GetUnmergedPullRequest returnss a pull request that is open and has not been merged by given head/base and repo/branch.
GetUnmergedPullRequestsByBaseInfo returnss all pull requests that are open and has not been merged by given base information (repo and branch).
GetUnmergedPullRequestsByHeadInfo returnss all pull requests that are open and has not been merged by given head information (repo and branch).
GetUpdateTaskByUUID returns update task by given UUID.
GetUserByEmail returns the user object by given e-mail if exists.
GetUserByID returns the user object by given ID if exists.
GetUserByName returns user by given name.
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.
GetUserRepositories returns a list of mirror repositories of given user.
GetUserRepositories returns a list of repositories of given user.
GetUserSalt returns a ramdom user salt token.
GetUserTeams returns all teams that user belongs to in given organization.
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.
HandleCloneUserCredentials replaces user credentials from HTTP/HTTPS URL with placeholder <credentials>.
HasAccess returns true if someone has the request access level.
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.
IsEmailUsed returns true if the email 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.
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.
ListAccessTokens returns a list of access tokens belongs to given user.
ListDeployKeys returns all deploy keys by given repository ID.
ListPublicKeys returns a list of public keys belongs to given user.
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.
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.
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.
NewIssueUsers adds new issue-user relations for new issue of repository.
NewLabels creates new label(s) for a repository.
NewMilestone creates new milestone of repository.
NewPullRequest creates new pull request with labels for repository.
NewRepoAction adds new action for creating repository.
NewTeam creates a record of new team.
NewUpload creates a new upload object.
Notices returns number of notices in given page.
NotifyWatchers creates batch of actions for every watcher.
Organizations returns number of organizations in given page.
PairsContains returns true when pairs list contains given issue.
ParseAccessMode returns corresponding access mode to given permission string.
TODO: move this function to gogits/git-module.
PrepareWebhooks adds new webhooks to task queue for given payload.
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.
RemoveAllWithNotice removes all directories in given path and creates a system notice when error occurs.
RemoveOrgRepo removes all team-repository relations of given organization.
RemoveOrgUser removes user from given organization.
RemoveTeamMember removes member from given team of given organization.
RemoveTeamRepo deletes repository relation to team.
RenameRepoAction adds new action for renaming a repository.
RepoPath returns repository path by given user and repository name.
RepositoriesWithUsers returns number of repos in given page.
RewriteAllPublicKeys removes any authorized key and rewrite all keys from database again.
RewriteRepositoryUpdateHook rewrites all repositories' update hook.
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 confirmation email.
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.
see: https://api.slack.com/docs/formatting.
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.
Star or unstar repository.
SyncMirrors checks and syncs mirrors.
TestPullRequests checks and tests untested patches of pull requests.
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 be 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.
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.
UpdateIssueUsersByStatus updates issue-user relations by issue status.
UpdateLabel updates label information.
UpdateLocalCopy pulls latest changes of given branch from repoPath to localPath.
UpdateMilestone updates information of given milestone.
UpdatePublicKey updates given public key.
UpdateRelease updates information of a release.
UpdateTeam updates information of team.
UpdateUser updates user's information.
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 chceck if author's e-mail of commit is corresponsind to a user.
verify active code when active account.
verify active code when active account.
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.
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).
References.
Reference from a pull request.
Filter modes.
Filter modes.
Filter modes.
Filter modes.
5.
2.
Note: new type must append to the end of list to maintain compatibility.
4.
1.
3.
Historic reason to make it starts at 0.

# Variables

# 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., it implemented interface base.Actioner so that can be used in template render.
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.
Comment represents a comment in commit and issue page.
DeployKey represents deploy key information and its relation with repository.
EmailAdresses is the list of all email addresses of a user.
Follow represents relations of user and his/her followers.
HookEvent represents events that will delivery hook.
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 represetns an issue-lable relation.
IssueStats represents issue statistic information.
IssueUser represents an issue-user relation.
Label represents a label of repository for issues.
LoginSource represents an external way for authorizing users.
Milestone represents a milestone of repository.
Mirror represents mirror information of a repository.
Notice represents a system notice for admin.
OrgUser represents an organization-user relation.
PublicKey represents a user or deploy SSH public key.
PullRequest represents relation between pull request and repositories.
Release represents a release of repository.
Repository represents a git repository.
Team represents a organization team.
TeamRepo represents an team-repository relation.
TeamUser represents an team-user relation.
Upload represent a uploaded file to a repo to be deleted when moved.
User represents the object of individual and member of organization.
UserCommit represents a commit with validation of user.
Watch is connection request for receiving repository notification.
Webhook represents a web hook object.

# Interfaces

Engine represents a xorm engine or session.

# Type aliases