Documentation ¶
Index ¶
- Variables
- func Action(ctx *context.Context)
- func Activity(ctx *context.Context)
- func AddDependency(ctx *context.Context)
- func AddTimeManually(c *context.Context, form auth.AddTimeManuallyForm)
- func Branches(ctx *context.Context)
- func CancelStopwatch(c *context.Context)
- func ChangeCollaborationAccessMode(ctx *context.Context)
- func ChangeCommentReaction(ctx *context.Context, form auth.ReactionForm)
- func ChangeIssueReaction(ctx *context.Context, form auth.ReactionForm)
- func ChangeMilestonStatus(ctx *context.Context)
- func CleanUpPullRequest(ctx *context.Context)
- func Collaboration(ctx *context.Context)
- func CollaborationPost(ctx *context.Context)
- func Commits(ctx *context.Context)
- func CompareAndPullRequest(ctx *context.Context)
- func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
- func CompareDiff(ctx *context.Context)
- func Create(ctx *context.Context)
- func CreateBranch(ctx *context.Context, form auth.NewBranchForm)
- func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm)
- func CreatePost(ctx *context.Context, form auth.CreateRepoForm)
- func DeleteBranchPost(ctx *context.Context)
- func DeleteCollaboration(ctx *context.Context)
- func DeleteComment(ctx *context.Context)
- func DeleteDeployKey(ctx *context.Context)
- func DeleteFile(ctx *context.Context)
- func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm)
- func DeleteLabel(ctx *context.Context)
- func DeleteMilestone(ctx *context.Context)
- func DeleteRelease(ctx *context.Context)
- func DeleteWebhook(ctx *context.Context)
- func DeleteWikiPagePost(ctx *context.Context)
- func DeployKeys(ctx *context.Context)
- func DeployKeysPost(ctx *context.Context, form auth.AddKeyForm)
- func Diff(ctx *context.Context)
- func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm)
- func DingtalkHooksEditPost(ctx *context.Context, form auth.NewDingtalkHookForm)
- func DingtalkHooksNewPost(ctx *context.Context, form auth.NewDingtalkHookForm)
- func DiscordHooksEditPost(ctx *context.Context, form auth.NewDiscordHookForm)
- func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm)
- func Download(ctx *context.Context)
- func DownloadByID(ctx *context.Context)
- func DownloadPullDiff(ctx *context.Context)
- func DownloadPullPatch(ctx *context.Context)
- func EditFile(ctx *context.Context)
- func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm)
- func EditMilestone(ctx *context.Context)
- func EditMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
- func EditRelease(ctx *context.Context)
- func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm)
- func EditWiki(ctx *context.Context)
- func EditWikiPost(ctx *context.Context, form auth.NewWikiForm)
- func FileHistory(ctx *context.Context)
- func Fork(ctx *context.Context)
- func ForkPost(ctx *context.Context, form auth.CreateRepoForm)
- func Forks(ctx *context.Context)
- func GetActionIssue(ctx *context.Context) *models.Issue
- func GitHooks(ctx *context.Context)
- func GitHooksEdit(ctx *context.Context)
- func GitHooksEditPost(ctx *context.Context)
- func GogsHooksEditPost(ctx *context.Context, form auth.NewGogshookForm)
- func GogsHooksNewPost(ctx *context.Context, form auth.NewGogshookForm)
- func Graph(ctx *context.Context)
- func HTTP(ctx *context.Context)
- func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc
- func Home(ctx *context.Context)
- func InitializeLabels(ctx *context.Context, form auth.InitializeLabelsForm)
- func IssueStopwatch(c *context.Context)
- func IssueWatch(ctx *context.Context)
- func Issues(ctx *context.Context)
- func Labels(ctx *context.Context)
- func MergePullRequest(ctx *context.Context, form auth.MergePullRequestForm)
- func Migrate(ctx *context.Context)
- func MigratePost(ctx *context.Context, form auth.MigrateRepoForm)
- func MilestoneIssuesAndPulls(ctx *context.Context)
- func Milestones(ctx *context.Context)
- func MustAllowPulls(ctx *context.Context)
- func MustBeAbleToUpload(ctx *context.Context)
- func MustBeEditable(ctx *context.Context)
- func MustBeNotBare(ctx *context.Context)
- func MustEnableIssues(ctx *context.Context)
- func MustEnableWiki(ctx *context.Context)
- func NewComment(ctx *context.Context, form auth.CreateCommentForm)
- func NewFile(ctx *context.Context)
- func NewFilePost(ctx *context.Context, form auth.EditRepoFileForm)
- func NewIssue(ctx *context.Context)
- func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm)
- func NewLabel(ctx *context.Context, form auth.CreateLabelForm)
- func NewMilestone(ctx *context.Context)
- func NewMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
- func NewRelease(ctx *context.Context)
- func NewReleasePost(ctx *context.Context, form auth.NewReleaseForm)
- func NewWiki(ctx *context.Context)
- func NewWikiPost(ctx *context.Context, form auth.NewWikiForm)
- func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, *git.Repository, *git.PullRequestInfo, ...)
- func ParseHookEvent(form auth.WebhookForm) *models.HookEvent
- func PrepareCompareDiff(ctx *context.Context, headUser *models.User, headRepo *models.Repository, ...) bool
- func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullRequestInfo
- func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.PullRequestInfo
- func ProtectedBranch(ctx *context.Context)
- func ProtectedBranchPost(ctx *context.Context)
- func RawDiff(ctx *context.Context)
- func RefCommits(ctx *context.Context)
- func Releases(ctx *context.Context)
- func RemoveDependency(ctx *context.Context)
- func RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm)
- func RenderUserCards(ctx *context.Context, total int, getter func(page int) ([]*models.User, error), ...)
- func RestoreBranchPost(ctx *context.Context)
- func RetrieveLabels(ctx *context.Context)
- func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository) []*models.Label
- func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)
- func Search(ctx *context.Context)
- func SearchCommits(ctx *context.Context)
- func ServeBlob(ctx *context.Context, blob *git.Blob) error
- func ServeData(ctx *context.Context, name string, reader io.Reader) error
- func SetDiffViewStyle(ctx *context.Context)
- func SetEditorconfigIfExists(ctx *context.Context)
- func SetWhitespaceBehavior(ctx *context.Context)
- func Settings(ctx *context.Context)
- func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)
- func SettingsProtectedBranch(c *context.Context)
- func SettingsProtectedBranchPost(ctx *context.Context, f auth.ProtectBranchForm)
- func SingleDownload(ctx *context.Context)
- func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm)
- func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm)
- func Stars(ctx *context.Context)
- func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm)
- func TestWebhook(ctx *context.Context)
- func TopicsPost(ctx *context.Context)
- func TriggerTask(ctx *context.Context)
- func UpdateCommentContent(ctx *context.Context)
- func UpdateIssueAssignee(ctx *context.Context)
- func UpdateIssueContent(ctx *context.Context)
- func UpdateIssueLabel(ctx *context.Context)
- func UpdateIssueMilestone(ctx *context.Context)
- func UpdateIssueStatus(ctx *context.Context)
- func UpdateIssueTitle(ctx *context.Context)
- func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm)
- func UploadAttachment(ctx *context.Context)
- func UploadFile(ctx *context.Context)
- func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm)
- func UploadFileToServer(ctx *context.Context)
- func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm, isPull bool) ([]int64, []int64, int64)
- func ViewIssue(ctx *context.Context)
- func ViewPullCommits(ctx *context.Context)
- func ViewPullFiles(ctx *context.Context)
- func Watchers(ctx *context.Context)
- func WebHooksEdit(ctx *context.Context)
- func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm)
- func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm)
- func Webhooks(ctx *context.Context)
- func WebhooksNew(ctx *context.Context)
- func Wiki(ctx *context.Context)
- func WikiPages(ctx *context.Context)
- func WikiRaw(ctx *context.Context)
- type Branch
- type PageMeta
Constants ¶
This section is empty.
Variables ¶
var ( // ErrFileTypeForbidden not allowed file type error ErrFileTypeForbidden = errors.New("File type is not allowed") // ErrTooManyFiles upload too many files ErrTooManyFiles = errors.New("Maximum number of files to upload exceeded") // IssueTemplateCandidates issue templates IssueTemplateCandidates = []string{ "ISSUE_TEMPLATE.md", "issue_template.md", ".gitea/ISSUE_TEMPLATE.md", ".gitea/issue_template.md", ".github/ISSUE_TEMPLATE.md", ".github/issue_template.md", } )
Functions ¶
func AddTimeManually ¶ added in v1.3.0
func AddTimeManually(c *context.Context, form auth.AddTimeManuallyForm)
AddTimeManually tracks time manually
func CancelStopwatch ¶ added in v1.3.0
CancelStopwatch cancel the stopwatch
func ChangeCollaborationAccessMode ¶
ChangeCollaborationAccessMode response for changing access of a collaboration
func ChangeCommentReaction ¶ added in v1.4.0
func ChangeCommentReaction(ctx *context.Context, form auth.ReactionForm)
ChangeCommentReaction create a reaction for comment
func ChangeIssueReaction ¶ added in v1.4.0
func ChangeIssueReaction(ctx *context.Context, form auth.ReactionForm)
ChangeIssueReaction create a reaction for issue
func ChangeMilestonStatus ¶
ChangeMilestonStatus response for change a milestone's status
func CleanUpPullRequest ¶ added in v1.2.0
CleanUpPullRequest responses for delete merged branch when PR has been merged
func Collaboration ¶
Collaboration render a repository's collaboration page
func CollaborationPost ¶
CollaborationPost response for actions for a collaboration of a repository
func CompareAndPullRequest ¶
CompareAndPullRequest render pull request preview page
func CompareAndPullRequestPost ¶
func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
CompareAndPullRequestPost response for creating pull request
func CompareDiff ¶
CompareDiff show different from one commit to another commit
func CreateBranch ¶ added in v1.3.0
func CreateBranch(ctx *context.Context, form auth.NewBranchForm)
CreateBranch creates new branch in repository
func CreateCodeComment ¶
func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm)
CreateCodeComment will create a code comment including an pending review if required
func CreatePost ¶
func CreatePost(ctx *context.Context, form auth.CreateRepoForm)
CreatePost response for creating repository
func DeleteBranchPost ¶ added in v1.1.0
DeleteBranchPost responses for delete merged branch
func DeleteCollaboration ¶
DeleteCollaboration delete a collaboration for a repository
func DeleteDeployKey ¶
DeleteDeployKey response for deleting a deploy key
func DeleteFilePost ¶
func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm)
DeleteFilePost response for deleting file
func DeleteMilestone ¶
DeleteMilestone delete a milestone
func DeleteWikiPagePost ¶
DeleteWikiPagePost delete wiki page
func DeployKeys ¶
DeployKeys render the deploy keys list of a repository page
func DeployKeysPost ¶
func DeployKeysPost(ctx *context.Context, form auth.AddKeyForm)
DeployKeysPost response for adding a deploy key of a repository
func DiffPreviewPost ¶
func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm)
DiffPreviewPost render preview diff page
func DingtalkHooksEditPost ¶ added in v1.4.0
func DingtalkHooksEditPost(ctx *context.Context, form auth.NewDingtalkHookForm)
DingtalkHooksEditPost response for editing discord hook
func DingtalkHooksNewPost ¶ added in v1.4.0
func DingtalkHooksNewPost(ctx *context.Context, form auth.NewDingtalkHookForm)
DingtalkHooksNewPost response for creating dingtalk hook
func DiscordHooksEditPost ¶ added in v1.3.0
func DiscordHooksEditPost(ctx *context.Context, form auth.NewDiscordHookForm)
DiscordHooksEditPost response for editing discord hook
func DiscordHooksNewPost ¶ added in v1.3.0
func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm)
DiscordHooksNewPost response for creating discord hook
func DownloadPullDiff ¶ added in v1.4.0
DownloadPullDiff render a pull's raw diff
func DownloadPullPatch ¶ added in v1.4.0
DownloadPullPatch render a pull's raw patch
func EditFilePost ¶
func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm)
EditFilePost response for editing file
func EditMilestone ¶
EditMilestone render edting milestone page
func EditMilestonePost ¶
func EditMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
EditMilestonePost response for edting milestone
func EditReleasePost ¶
func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm)
EditReleasePost response for edit release
func EditWikiPost ¶
func EditWikiPost(ctx *context.Context, form auth.NewWikiForm)
EditWikiPost response for wiki modify request
func ForkPost ¶
func ForkPost(ctx *context.Context, form auth.CreateRepoForm)
ForkPost response for forking a repository
func GetActionIssue ¶ added in v1.3.0
GetActionIssue will return the issue which is used in the context.
func GitHooksEdit ¶
GitHooksEdit render for editing a hook of repository page
func GitHooksEditPost ¶
GitHooksEditPost response for editing a git hook of a repository
func GogsHooksEditPost ¶ added in v1.2.0
func GogsHooksEditPost(ctx *context.Context, form auth.NewGogshookForm)
GogsHooksEditPost response for editing gogs hook
func GogsHooksNewPost ¶ added in v1.2.0
func GogsHooksNewPost(ctx *context.Context, form auth.NewGogshookForm)
GogsHooksNewPost response for creating webhook
func HTTPBackend ¶
func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc
HTTPBackend middleware for git smart HTTP protocol
func InitializeLabels ¶
func InitializeLabels(ctx *context.Context, form auth.InitializeLabelsForm)
InitializeLabels init labels for a repository
func IssueStopwatch ¶ added in v1.3.0
IssueStopwatch creates or stops a stopwatch for the given issue.
func IssueWatch ¶ added in v1.2.0
IssueWatch sets issue watching
func MergePullRequest ¶
func MergePullRequest(ctx *context.Context, form auth.MergePullRequestForm)
MergePullRequest response for merging pull request
func MigratePost ¶
func MigratePost(ctx *context.Context, form auth.MigrateRepoForm)
MigratePost response for migrating from external git repository
func MilestoneIssuesAndPulls ¶
MilestoneIssuesAndPulls lists all the issues and pull requests of the milestone
func MustAllowPulls ¶
MustAllowPulls check if repository enable pull requests and user have right to do that
func MustBeAbleToUpload ¶ added in v1.3.0
MustBeAbleToUpload check that repo can be uploaded to
func MustBeEditable ¶ added in v1.3.0
MustBeEditable check that repo can be edited
func MustBeNotBare ¶
MustBeNotBare render when a repo is a bare git dir
func MustEnableIssues ¶
MustEnableIssues check if repository enable internal issues
func MustEnableWiki ¶
MustEnableWiki check if wiki is enabled, if external then redirect
func NewComment ¶
func NewComment(ctx *context.Context, form auth.CreateCommentForm)
NewComment create a comment for issue
func NewFilePost ¶
func NewFilePost(ctx *context.Context, form auth.EditRepoFileForm)
NewFilePost response for creating file
func NewIssuePost ¶
func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm)
NewIssuePost response for creating new issue
func NewLabel ¶
func NewLabel(ctx *context.Context, form auth.CreateLabelForm)
NewLabel create new label for repository
func NewMilestone ¶
NewMilestone render creating milestone page
func NewMilestonePost ¶
func NewMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
NewMilestonePost response for creating milestone
func NewReleasePost ¶
func NewReleasePost(ctx *context.Context, form auth.NewReleaseForm)
NewReleasePost response for creating a release
func NewWikiPost ¶
func NewWikiPost(ctx *context.Context, form auth.NewWikiForm)
NewWikiPost response for wiki create request
func ParseCompareInfo ¶
func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, *git.Repository, *git.PullRequestInfo, string, string)
ParseCompareInfo parse compare info between two commit for preparing pull request
func ParseHookEvent ¶
func ParseHookEvent(form auth.WebhookForm) *models.HookEvent
ParseHookEvent convert web form content to models.HookEvent
func PrepareCompareDiff ¶
func PrepareCompareDiff( ctx *context.Context, headUser *models.User, headRepo *models.Repository, headGitRepo *git.Repository, prInfo *git.PullRequestInfo, baseBranch, headBranch string) bool
PrepareCompareDiff render pull request preview diff page
func PrepareMergedViewPullInfo ¶
PrepareMergedViewPullInfo show meta information for a merged pull request view page
func PrepareViewPullInfo ¶
PrepareViewPullInfo show meta information for a pull request preview page
func ProtectedBranch ¶ added in v1.1.0
ProtectedBranch render the page to protect the repository
func ProtectedBranchPost ¶ added in v1.1.0
ProtectedBranchPost response for protect for a branch of a repository
func RemoveDependency ¶
RemoveDependency removes the dependency
func RemoveUploadFileFromServer ¶
func RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm)
RemoveUploadFileFromServer remove file from server file dir
func RenderUserCards ¶
func RenderUserCards(ctx *context.Context, total int, getter func(page int) ([]*models.User, error), tpl base.TplName)
RenderUserCards render a page show users according the input templaet
func RestoreBranchPost ¶ added in v1.3.0
RestoreBranchPost responses for delete merged branch
func RetrieveLabels ¶
RetrieveLabels find all the labels of a repository
func RetrieveRepoMetas ¶
RetrieveRepoMetas find all the meta information of a repository
func RetrieveRepoMilestonesAndAssignees ¶
func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)
RetrieveRepoMilestonesAndAssignees find all the milestones and assignees of a repository
func SearchCommits ¶
SearchCommits render commits filtered by keyword
func SetDiffViewStyle ¶ added in v1.0.0
SetDiffViewStyle set diff style as render variable
func SetEditorconfigIfExists ¶ added in v1.0.0
SetEditorconfigIfExists set editor config as render variable
func SetWhitespaceBehavior ¶
SetWhitespaceBehavior set whitespace behavior as render variable
func SettingsPost ¶
func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)
SettingsPost response for changes of a repository
func SettingsProtectedBranch ¶ added in v1.3.0
SettingsProtectedBranch renders the protected branch setting page
func SettingsProtectedBranchPost ¶ added in v1.3.0
func SettingsProtectedBranchPost(ctx *context.Context, f auth.ProtectBranchForm)
SettingsProtectedBranchPost updates the protected branch settings
func SingleDownload ¶
SingleDownload download a file by repos path
func SlackHooksEditPost ¶
func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm)
SlackHooksEditPost response for editing slack hook
func SlackHooksNewPost ¶
func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm)
SlackHooksNewPost response for creating slack hook
func SubmitReview ¶
func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm)
SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist
func TriggerTask ¶
TriggerTask response for a trigger task request
func UpdateCommentContent ¶
UpdateCommentContent change comment of issue's content
func UpdateIssueAssignee ¶
UpdateIssueAssignee change issue's assignee
func UpdateIssueContent ¶
UpdateIssueContent change issue's content
func UpdateIssueLabel ¶
UpdateIssueLabel change issue's labels
func UpdateIssueMilestone ¶
UpdateIssueMilestone change issue's milestone
func UpdateIssueStatus ¶ added in v1.2.0
UpdateIssueStatus change issue's status
func UpdateIssueTitle ¶
UpdateIssueTitle change issue's title
func UpdateLabel ¶
func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm)
UpdateLabel update a label's name and color
func UploadAttachment ¶ added in v1.1.0
UploadAttachment response for uploading issue's attachment
func UploadFilePost ¶
func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm)
UploadFilePost response for uploading file
func UploadFileToServer ¶
UploadFileToServer upload file to server file dir not git
func ValidateRepoMetas ¶
func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm, isPull bool) ([]int64, []int64, int64)
ValidateRepoMetas check and returns repository's meta informations
func ViewPullCommits ¶
ViewPullCommits show commits for a pull request
func ViewPullFiles ¶
ViewPullFiles render pull request changed files list page
func WebHooksEdit ¶
WebHooksEdit render editing web hook page
func WebHooksEditPost ¶
func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm)
WebHooksEditPost response for editing web hook
func WebHooksNewPost ¶
func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm)
WebHooksNewPost response for creating webhook
Types ¶
Source Files ¶
- activity.go
- attachment.go
- branch.go
- commit.go
- download.go
- editor.go
- http.go
- issue.go
- issue_dependency.go
- issue_label.go
- issue_stopwatch.go
- issue_timetrack.go
- issue_watch.go
- middlewares.go
- milestone.go
- pull.go
- pull_review.go
- release.go
- repo.go
- search.go
- setting.go
- setting_protected_branch.go
- topic.go
- view.go
- webhook.go
- wiki.go