Documentation ¶
Index ¶
- Constants
- Variables
- func Action(c *context.Context)
- func AllBranches(c *context.Context)
- func Branches(c *context.Context)
- func ChangeCollaborationAccessMode(c *context.Context)
- func ChangeMilestonStatus(c *context.Context)
- func Commits(c *context.Context)
- func CompareAndPullRequest(c *context.Context)
- func CompareAndPullRequestPost(c *context.Context, f form.NewIssue)
- func CompareDiff(c *context.Context)
- func Create(c *context.Context)
- func CreatePost(c *context.Context, f form.CreateRepo)
- func DeleteBranchPost(c *context.Context)
- func DeleteCollaboration(c *context.Context)
- func DeleteComment(c *context.Context)
- func DeleteDeployKey(c *context.Context)
- func DeleteFile(c *context.Context)
- func DeleteFilePost(c *context.Context, f form.DeleteRepoFile)
- func DeleteLabel(c *context.Context)
- func DeleteMilestone(c *context.Context)
- func DeleteRelease(c *context.Context)
- func DeleteWebhook(c *context.Context)
- func DeleteWikiPagePost(c *context.Context)
- func Diff(c *context.Context)
- func DiffPreviewPost(c *context.Context, f form.EditPreviewDiff)
- func DingtalkHooksEditPost(c *context.Context, f form.NewDingtalkHook)
- func DingtalkHooksNewPost(c *context.Context, f form.NewDingtalkHook)
- func DiscordHooksEditPost(c *context.Context, f form.NewDiscordHook)
- func DiscordHooksNewPost(c *context.Context, f form.NewDiscordHook)
- func Download(c *context.Context)
- func EditFile(c *context.Context)
- func EditFilePost(c *context.Context, f form.EditRepoFile)
- func EditMilestone(c *context.Context)
- func EditMilestonePost(c *context.Context, f form.CreateMilestone)
- func EditRelease(c *context.Context)
- func EditReleasePost(c *context.Context, f form.EditRelease)
- func EditWiki(c *context.Context)
- func EditWikiPost(c *context.Context, f form.NewWiki)
- func FileHistory(c *context.Context)
- func Fork(c *context.Context)
- func ForkPost(c *context.Context, f form.CreateRepo)
- func Forks(c *context.Context)
- func HTTP(c *HTTPContext)
- func HTTPContexter() macaron.Handler
- func Home(c *context.Context)
- func InitializeLabels(c *context.Context, f form.InitializeLabels)
- func Issues(c *context.Context)
- func Labels(c *context.Context)
- func MergePullRequest(c *context.Context)
- func Migrate(c *context.Context)
- func MigratePost(c *context.Context, f form.MigrateRepo)
- func Milestones(c *context.Context)
- func MustAllowPulls(c *context.Context)
- func MustBeNotBare(c *context.Context)
- func MustEnableIssues(c *context.Context)
- func MustEnableWiki(c *context.Context)
- func NewComment(c *context.Context, f form.CreateComment)
- func NewFile(c *context.Context)
- func NewFilePost(c *context.Context, f form.EditRepoFile)
- func NewIssue(c *context.Context)
- func NewIssuePost(c *context.Context, f form.NewIssue)
- func NewLabel(c *context.Context, f form.CreateLabel)
- func NewMilestone(c *context.Context)
- func NewMilestonePost(c *context.Context, f form.CreateMilestone)
- func NewRelease(c *context.Context)
- func NewReleasePost(c *context.Context, f form.NewRelease)
- func NewWiki(c *context.Context)
- func NewWikiPost(c *context.Context, f form.NewWiki)
- func ParseCompareInfo(c *context.Context) (*models.User, *models.Repository, *git.Repository, *git.PullRequestInfo, ...)
- func ParseHookEvent(f form.Webhook) *models.HookEvent
- func PrepareCompareDiff(c *context.Context, headUser *models.User, headRepo *models.Repository, ...) bool
- func PrepareMergedViewPullInfo(c *context.Context, issue *models.Issue)
- func PrepareViewPullInfo(c *context.Context, issue *models.Issue) *git.PullRequestInfo
- func Pulls(c *context.Context)
- func RawDiff(c *context.Context)
- func RedeliveryWebhook(c *context.Context)
- func RefCommits(c *context.Context)
- func Releases(c *context.Context)
- func RemoveUploadFileFromServer(c *context.Context, f form.RemoveUploadFile)
- func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List
- func RenderUserCards(c *context.Context, total int, getter func(page int) ([]*models.User, error), ...)
- func RetrieveLabels(c *context.Context)
- func RetrieveRepoMetas(c *context.Context, repo *models.Repository) []*models.Label
- func RetrieveRepoMilestonesAndAssignees(c *context.Context, repo *models.Repository)
- func SearchCommits(c *context.Context)
- func ServeBlob(c *context.Context, blob *git.Blob) error
- func ServeData(c *context.Context, name string, reader io.Reader) error
- func Settings(c *context.Context)
- func SettingsAvatar(c *context.Context)
- func SettingsAvatarPost(c *context.Context, f form.Avatar)
- func SettingsBranches(c *context.Context)
- func SettingsCollaboration(c *context.Context)
- func SettingsCollaborationPost(c *context.Context)
- func SettingsDeleteAvatar(c *context.Context)
- func SettingsDeployKeys(c *context.Context)
- func SettingsDeployKeysPost(c *context.Context, f form.AddSSHKey)
- func SettingsGitHooks(c *context.Context)
- func SettingsGitHooksEdit(c *context.Context)
- func SettingsGitHooksEditPost(c *context.Context)
- func SettingsPost(c *context.Context, f form.RepoSetting)
- func SettingsProtectedBranch(c *context.Context)
- func SettingsProtectedBranchPost(c *context.Context, f form.ProtectBranch)
- func SingleDownload(c *context.Context)
- func SlackHooksEditPost(c *context.Context, f form.NewSlackHook)
- func SlackHooksNewPost(c *context.Context, f form.NewSlackHook)
- func Stars(c *context.Context)
- func TestWebhook(c *context.Context)
- func TriggerTask(c *context.Context)
- func UpdateAvatarSetting(c *context.Context, f form.Avatar, ctxRepo *models.Repository) error
- func UpdateCommentContent(c *context.Context)
- func UpdateDefaultBranch(c *context.Context)
- func UpdateIssueAssignee(c *context.Context)
- func UpdateIssueContent(c *context.Context)
- func UpdateIssueLabel(c *context.Context)
- func UpdateIssueMilestone(c *context.Context)
- func UpdateIssueTitle(c *context.Context)
- func UpdateLabel(c *context.Context, f form.CreateLabel)
- func UploadFile(c *context.Context)
- func UploadFilePost(c *context.Context, f form.UploadRepoFile)
- func UploadFileToServer(c *context.Context)
- func UploadIssueAttachment(c *context.Context)
- func UploadReleaseAttachment(c *context.Context)
- func ValidateRepoMetas(c *context.Context, f form.NewIssue) ([]int64, int64, int64)
- func ViewIssue(c *context.Context)
- func ViewPull(c *context.Context)
- func ViewPullCommits(c *context.Context)
- func ViewPullFiles(c *context.Context)
- func Watchers(c *context.Context)
- func WebHooksEdit(c *context.Context)
- func WebHooksEditPost(c *context.Context, f form.NewWebhook)
- func WebHooksNewPost(c *context.Context, f form.NewWebhook)
- func Webhooks(c *context.Context)
- func WebhooksNew(c *context.Context)
- func Wiki(c *context.Context)
- func WikiPages(c *context.Context)
- type Branch
- type HTTPContext
- type OrgRepoCtx
- type PageMeta
Constants ¶
View Source
const ( BRANCHES_OVERVIEW = "repo/branches/overview" BRANCHES_ALL = "repo/branches/all" )
View Source
const ( COMMITS = "repo/commits" DIFF = "repo/diff/page" )
View Source
const ( EDIT_FILE = "repo/editor/edit" EDIT_DIFF_PREVIEW = "repo/editor/diff_preview" DELETE_FILE = "repo/editor/delete" UPLOAD_FILE = "repo/editor/upload" )
View Source
const ( ISSUES = "repo/issue/list" ISSUE_NEW = "repo/issue/new" ISSUE_VIEW = "repo/issue/view" LABELS = "repo/issue/labels" MILESTONE = "repo/issue/milestones" MILESTONE_NEW = "repo/issue/milestone_new" MILESTONE_EDIT = "repo/issue/milestone_edit" ISSUE_TEMPLATE_KEY = "IssueTemplate" )
View Source
const ( FORK = "repo/pulls/fork" COMPARE_PULL = "repo/pulls/compare" PULL_COMMITS = "repo/pulls/commits" PULL_FILES = "repo/pulls/files" PULL_REQUEST_TEMPLATE_KEY = "PullRequestTemplate" )
View Source
const ( RELEASES = "repo/release/list" RELEASE_NEW = "repo/release/new" )
View Source
const ( CREATE = "repo/create" MIGRATE = "repo/migrate" )
View Source
const ( SETTINGS_OPTIONS = "repo/settings/options" SETTINGS_REPO_AVATAR = "repo/settings/avatar" SETTINGS_COLLABORATION = "repo/settings/collaboration" SETTINGS_BRANCHES = "repo/settings/branches" SETTINGS_PROTECTED_BRANCH = "repo/settings/protected_branch" SETTINGS_GITHOOKS = "repo/settings/githooks" SETTINGS_GITHOOK_EDIT = "repo/settings/githook_edit" SETTINGS_DEPLOY_KEYS = "repo/settings/deploy_keys" )
View Source
const ( BARE = "repo/bare" HOME = "repo/home" WATCHERS = "repo/watchers" FORKS = "repo/forks" )
View Source
const ( WEBHOOKS = "repo/settings/webhook/base" WEBHOOK_NEW = "repo/settings/webhook/new" ORG_WEBHOOK_NEW = "org/settings/webhook_new" )
View Source
const ( WIKI_START = "repo/wiki/start" WIKI_VIEW = "repo/wiki/view" WIKI_NEW = "repo/wiki/new" WIKI_PAGES = "repo/wiki/pages" )
Variables ¶
View Source
var ( ErrFileTypeForbidden = errors.New("File type is not allowed") ErrTooManyFiles = errors.New("Maximum number of files to upload exceeded") IssueTemplateCandidates = []string{ "ISSUE_TEMPLATE.md", ".gogs/ISSUE_TEMPLATE.md", ".github/ISSUE_TEMPLATE.md", } )
View Source
var (
PullRequestTemplateCandidates = []string{
"PULL_REQUEST.md",
".gogs/PULL_REQUEST.md",
".github/PULL_REQUEST.md",
}
)
Functions ¶
func AllBranches ¶
func ChangeMilestonStatus ¶
func CompareAndPullRequest ¶
func CompareDiff ¶
func CreatePost ¶
func CreatePost(c *context.Context, f form.CreateRepo)
func DeleteBranchPost ¶
func DeleteCollaboration ¶
func DeleteComment ¶
func DeleteDeployKey ¶
func DeleteFile ¶
func DeleteFilePost ¶
func DeleteFilePost(c *context.Context, f form.DeleteRepoFile)
func DeleteLabel ¶
func DeleteMilestone ¶
func DeleteRelease ¶
func DeleteWebhook ¶
func DeleteWikiPagePost ¶
func DiffPreviewPost ¶
func DiffPreviewPost(c *context.Context, f form.EditPreviewDiff)
func DingtalkHooksEditPost ¶ added in v0.11.33
func DingtalkHooksEditPost(c *context.Context, f form.NewDingtalkHook)
func DingtalkHooksNewPost ¶ added in v0.11.33
func DingtalkHooksNewPost(c *context.Context, f form.NewDingtalkHook)
func DiscordHooksEditPost ¶
func DiscordHooksEditPost(c *context.Context, f form.NewDiscordHook)
FIXME: merge logic to Slack
func DiscordHooksNewPost ¶
func DiscordHooksNewPost(c *context.Context, f form.NewDiscordHook)
FIXME: merge logic to Slack
func EditFilePost ¶
func EditFilePost(c *context.Context, f form.EditRepoFile)
func EditMilestone ¶
func EditMilestonePost ¶
func EditMilestonePost(c *context.Context, f form.CreateMilestone)
func EditRelease ¶
func EditReleasePost ¶
func EditReleasePost(c *context.Context, f form.EditRelease)
func FileHistory ¶
func HTTP ¶
func HTTP(c *HTTPContext)
func HTTPContexter ¶
func HTTPContexter() macaron.Handler
func InitializeLabels ¶
func InitializeLabels(c *context.Context, f form.InitializeLabels)
func MergePullRequest ¶
func MigratePost ¶
func MigratePost(c *context.Context, f form.MigrateRepo)
func Milestones ¶
func MustAllowPulls ¶
func MustBeNotBare ¶
func MustEnableIssues ¶
func MustEnableWiki ¶
func NewComment ¶
func NewComment(c *context.Context, f form.CreateComment)
func NewFilePost ¶
func NewFilePost(c *context.Context, f form.EditRepoFile)
func NewMilestone ¶
func NewMilestonePost ¶
func NewMilestonePost(c *context.Context, f form.CreateMilestone)
func NewRelease ¶
func NewReleasePost ¶
func NewReleasePost(c *context.Context, f form.NewRelease)
func ParseCompareInfo ¶
func PrepareCompareDiff ¶
func PrepareViewPullInfo ¶
func RedeliveryWebhook ¶
func RefCommits ¶
func RemoveUploadFileFromServer ¶
func RemoveUploadFileFromServer(c *context.Context, f form.RemoveUploadFile)
func RenderUserCards ¶
func RetrieveLabels ¶
func RetrieveRepoMetas ¶
func RetrieveRepoMilestonesAndAssignees ¶
func RetrieveRepoMilestonesAndAssignees(c *context.Context, repo *models.Repository)
func SearchCommits ¶
func SettingsAvatar ¶ added in v0.11.66
func SettingsAvatarPost ¶ added in v0.11.66
func SettingsBranches ¶
func SettingsCollaboration ¶
func SettingsDeleteAvatar ¶ added in v0.11.66
func SettingsDeployKeys ¶
func SettingsGitHooks ¶
func SettingsGitHooksEdit ¶
func SettingsPost ¶
func SettingsPost(c *context.Context, f form.RepoSetting)
func SettingsProtectedBranch ¶
func SettingsProtectedBranchPost ¶
func SettingsProtectedBranchPost(c *context.Context, f form.ProtectBranch)
func SingleDownload ¶
func SlackHooksEditPost ¶
func SlackHooksEditPost(c *context.Context, f form.NewSlackHook)
func SlackHooksNewPost ¶
func SlackHooksNewPost(c *context.Context, f form.NewSlackHook)
func TestWebhook ¶
func TriggerTask ¶
func UpdateAvatarSetting ¶ added in v0.11.66
FIXME: limit upload size
func UpdateCommentContent ¶
func UpdateDefaultBranch ¶
func UpdateIssueAssignee ¶
func UpdateIssueContent ¶
func UpdateIssueLabel ¶
func UpdateIssueMilestone ¶
func UpdateIssueTitle ¶
func UpdateLabel ¶
func UpdateLabel(c *context.Context, f form.CreateLabel)
func UploadFile ¶
func UploadFilePost ¶
func UploadFilePost(c *context.Context, f form.UploadRepoFile)
func UploadFileToServer ¶
func UploadIssueAttachment ¶
func UploadReleaseAttachment ¶
func ValidateRepoMetas ¶
func ViewPullCommits ¶
func ViewPullFiles ¶
func WebHooksEdit ¶
func WebHooksEditPost ¶
func WebHooksEditPost(c *context.Context, f form.NewWebhook)
func WebHooksNewPost ¶
func WebHooksNewPost(c *context.Context, f form.NewWebhook)
func WebhooksNew ¶
Types ¶
type HTTPContext ¶
type OrgRepoCtx ¶
Click to show internal directories.
Click to hide internal directories.