Documentation ¶
Index ¶
- Constants
- Variables
- func Action(ctx *context.Context)
- func Branches(ctx *context.Context)
- func ChangeCollaborationAccessMode(ctx *context.Context)
- func ChangeMilestonStatus(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 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.AddSSHKeyForm)
- 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 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 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 RawDiff(ctx *context.Context)
- func RefCommits(ctx *context.Context)
- func Releases(ctx *context.Context)
- func RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm)
- func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List
- 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 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 UpdateIssueTitle(ctx *context.Context)
- func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm)
- func UploadFile(ctx *context.Context)
- func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm)
- func UploadFileToServer(ctx *context.Context)
- func UploadIssueAttachment(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)
- type OrgRepoCtx
- type PageMeta
Constants ¶
View Source
const ( COMMITS base.TplName = "repo/commits" DIFF base.TplName = "repo/diff/page" )
View Source
const ( EDIT_FILE base.TplName = "repo/editor/edit" EDIT_DIFF_PREVIEW base.TplName = "repo/editor/diff_preview" DELETE_FILE base.TplName = "repo/editor/delete" UPLOAD_FILE base.TplName = "repo/editor/upload" )
View Source
const ( ISSUES base.TplName = "repo/issue/list" ISSUE_NEW base.TplName = "repo/issue/new" ISSUE_VIEW base.TplName = "repo/issue/view" LABELS base.TplName = "repo/issue/labels" MILESTONE base.TplName = "repo/issue/milestones" MILESTONE_NEW base.TplName = "repo/issue/milestone_new" MILESTONE_EDIT base.TplName = "repo/issue/milestone_edit" ISSUE_TEMPLATE_KEY = "IssueTemplate" )
View Source
const ( FORK base.TplName = "repo/pulls/fork" COMPARE_PULL base.TplName = "repo/pulls/compare" PULL_COMMITS base.TplName = "repo/pulls/commits" PULL_FILES base.TplName = "repo/pulls/files" PULL_REQUEST_TEMPLATE_KEY = "PullRequestTemplate" )
View Source
const ( RELEASES base.TplName = "repo/release/list" RELEASE_NEW base.TplName = "repo/release/new" )
View Source
const ( CREATE base.TplName = "repo/create" MIGRATE base.TplName = "repo/migrate" )
View Source
const ( SETTINGS_OPTIONS base.TplName = "repo/settings/options" COLLABORATION base.TplName = "repo/settings/collaboration" GITHOOKS base.TplName = "repo/settings/githooks" GITHOOK_EDIT base.TplName = "repo/settings/githook_edit" DEPLOY_KEYS base.TplName = "repo/settings/deploy_keys" )
View Source
const ( HOME base.TplName = "repo/home" WATCHERS base.TplName = "repo/watchers" FORKS base.TplName = "repo/forks" )
View Source
const ( HOOKS base.TplName = "repo/settings/hooks" HOOK_NEW base.TplName = "repo/settings/hook_new" ORG_HOOK_NEW base.TplName = "org/settings/hook_new" )
View Source
const ( WIKI_START base.TplName = "repo/wiki/start" WIKI_VIEW base.TplName = "repo/wiki/view" WIKI_NEW base.TplName = "repo/wiki/new" WIKI_PAGES base.TplName = "repo/wiki/pages" )
View Source
const (
BRANCH base.TplName = "repo/branch"
)
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 ChangeMilestonStatus ¶
func Collaboration ¶
func CollaborationPost ¶
func CompareAndPullRequest ¶
func CompareAndPullRequestPost ¶
func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
func CompareDiff ¶
func CreatePost ¶
func CreatePost(ctx *context.Context, form auth.CreateRepoForm)
func DeleteCollaboration ¶
func DeleteComment ¶
func DeleteDeployKey ¶
func DeleteFile ¶
func DeleteFilePost ¶
func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm)
func DeleteLabel ¶
func DeleteMilestone ¶
func DeleteRelease ¶
func DeleteWebhook ¶
func DeleteWikiPagePost ¶
func DeployKeys ¶
func DeployKeysPost ¶
func DeployKeysPost(ctx *context.Context, form auth.AddSSHKeyForm)
func DiffPreviewPost ¶
func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm)
func EditFilePost ¶
func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm)
func EditMilestone ¶
func EditMilestonePost ¶
func EditMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
func EditRelease ¶
func EditReleasePost ¶
func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm)
func EditWikiPost ¶
func EditWikiPost(ctx *context.Context, form auth.NewWikiForm)
func FileHistory ¶
func GitHooksEdit ¶
func GitHooksEditPost ¶
func HTTPBackend ¶
func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc
func InitializeLabels ¶
func InitializeLabels(ctx *context.Context, form auth.InitializeLabelsForm)
func MergePullRequest ¶
func MigratePost ¶
func MigratePost(ctx *context.Context, form auth.MigrateRepoForm)
func Milestones ¶
func MustAllowPulls ¶
func MustBeNotBare ¶
func MustEnableIssues ¶
func MustEnableWiki ¶
func NewComment ¶
func NewComment(ctx *context.Context, form auth.CreateCommentForm)
func NewFilePost ¶
func NewFilePost(ctx *context.Context, form auth.EditRepoFileForm)
func NewIssuePost ¶
func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm)
func NewMilestone ¶
func NewMilestonePost ¶
func NewMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
func NewRelease ¶
func NewReleasePost ¶
func NewReleasePost(ctx *context.Context, form auth.NewReleaseForm)
func NewWikiPost ¶
func NewWikiPost(ctx *context.Context, form auth.NewWikiForm)
func ParseCompareInfo ¶
func ParseHookEvent ¶
func ParseHookEvent(form auth.WebhookForm) *models.HookEvent
func PrepareCompareDiff ¶
func PrepareViewPullInfo ¶
func RefCommits ¶
func RemoveUploadFileFromServer ¶
func RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm)
func RenderUserCards ¶
func RetrieveLabels ¶
func RetrieveRepoMetas ¶
func RetrieveRepoMilestonesAndAssignees ¶
func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)
func SearchCommits ¶
func SettingsPost ¶
func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)
func SingleDownload ¶
func SlackHooksEditPost ¶
func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm)
func SlackHooksNewPost ¶
func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm)
func TestWebhook ¶
func TriggerTask ¶
func UpdateCommentContent ¶
func UpdateIssueAssignee ¶
func UpdateIssueContent ¶
func UpdateIssueLabel ¶
func UpdateIssueMilestone ¶
func UpdateIssueTitle ¶
func UpdateLabel ¶
func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm)
func UploadFile ¶
func UploadFilePost ¶
func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm)
func UploadFileToServer ¶
func UploadIssueAttachment ¶
func ValidateRepoMetas ¶
func ViewPullCommits ¶
func ViewPullFiles ¶
func WebHooksEdit ¶
func WebHooksEditPost ¶
func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm)
func WebHooksNewPost ¶
func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm)
func WebhooksNew ¶
Types ¶
type OrgRepoCtx ¶
Click to show internal directories.
Click to hide internal directories.