Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func Action(ctx *context.Context)
 - func Branches(ctx *context.Context)
 - func ChangeCollaborationAccessMode(ctx *context.Context)
 - func ChangeMilestonStatus(ctx *context.Context)
 - func ChangeProtectedBranch(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 CreatePost(ctx *context.Context, form auth.CreateRepoForm)
 - 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 DeleteProtectedBranch(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 Download(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 GitHooks(ctx *context.Context)
 - func GitHooksEdit(ctx *context.Context)
 - func GitHooksEditPost(ctx *context.Context)
 - func GogsHooksEditPost(ctx *context.Context, form auth.NewWebhookForm)
 - func GogsHooksNewPost(ctx *context.Context, form auth.NewWebhookForm)
 - 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 IssueWatch(c *context.Context)
 - func Issues(ctx *context.Context)
 - func Labels(ctx *context.Context)
 - func MergePullRequest(ctx *context.Context)
 - func Migrate(ctx *context.Context)
 - func MigratePost(ctx *context.Context, form auth.MigrateRepoForm)
 - func Milestones(ctx *context.Context)
 - func MustAllowPulls(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)
 - 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 RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm)
 - func RenderUserCards(ctx *context.Context, total int, getter func(page int) ([]*models.User, error), ...)
 - func RetrieveLabels(ctx *context.Context)
 - func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository) []*models.Label
 - func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)
 - 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 Settings(ctx *context.Context)
 - func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)
 - 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 TestWebhook(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) ([]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 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 ChangeCollaborationAccessMode ¶
ChangeCollaborationAccessMode response for changing access of a collaboration
func ChangeMilestonStatus ¶
ChangeMilestonStatus response for change a milestone's status
func ChangeProtectedBranch ¶ added in v1.1.0
ChangeProtectedBranch response for changing access of a protect branch
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 CreatePost ¶
func CreatePost(ctx *context.Context, form auth.CreateRepoForm)
CreatePost response for creating repository
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 DeleteProtectedBranch ¶ added in v1.1.0
DeleteProtectedBranch delete a protection for a branch of a repository
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 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 fro wiki modify request
func ForkPost ¶
func ForkPost(ctx *context.Context, form auth.CreateRepoForm)
ForkPost response for forking a repository
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.NewWebhookForm)
GogsHooksEditPost response for editing gogs hook
func GogsHooksNewPost ¶ added in v1.2.0
func GogsHooksNewPost(ctx *context.Context, form auth.NewWebhookForm)
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 IssueWatch ¶ added in v1.2.0
IssueWatch sets issue watching
func MergePullRequest ¶
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 MustAllowPulls ¶
MustAllowPulls check if repository enable pull requests
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 fro 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 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 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 SettingsPost ¶
func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)
SettingsPost response for changes of a repository
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 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 ¶
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