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 Commits(ctx *context.Context)
- func CompareAndPullRequest(ctx *context.Context)
- func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
- func CompareDiff(ctx *context.Context)
- func ComposeHookEnvs(opts ComposeHookEnvsOptions) []string
- func Create(ctx *context.Context)
- 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 Diff(ctx *context.Context)
- func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm)
- func DiscordHooksEditPost(ctx *context.Context, form auth.NewDiscordHookForm)
- func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm)
- 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 HTTP(ctx *HTTPContext)
- func HTTPContexter() macaron.Handler
- 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 SettingsBranches(ctx *context.Context)
- func SettingsCollaboration(ctx *context.Context)
- func SettingsCollaborationPost(ctx *context.Context)
- func SettingsDeployKeys(ctx *context.Context)
- func SettingsDeployKeysPost(ctx *context.Context, form auth.AddSSHKeyForm)
- func SettingsGitHooks(ctx *context.Context)
- func SettingsGitHooksEdit(ctx *context.Context)
- func SettingsGitHooksEditPost(ctx *context.Context)
- func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)
- func SettingsProtectedBranch(ctx *context.Context)
- func SettingsProtectedBranchPost(ctx *context.Context, form 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 TestWebhook(ctx *context.Context)
- func TriggerTask(ctx *context.Context)
- func UpdateCommentContent(ctx *context.Context)
- func UpdateDefaultBranch(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 ComposeHookEnvsOptions
- type HTTPContext
- 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 ( ENV_AUTH_USER_ID = "GOGS_AUTH_USER_ID" ENV_AUTH_USER_NAME = "GOGS_AUTH_USER_NAME" ENV_REPO_OWNER_NAME = "GOGS_REPO_OWNER_NAME" ENV_REPO_OWNER_SALT_MD5 = "GOGS_REPO_OWNER_SALT_MD5" ENV_REPO_ID = "GOGS_REPO_ID" ENV_REPO_NAME = "GOGS_REPO_NAME" ENV_REPO_CUSTOM_HOOKS_PATH = "GOGS_REPO_CUSTOM_HOOKS_PATH" )
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" SETTINGS_COLLABORATION base.TplName = "repo/settings/collaboration" SETTINGS_BRANCHES base.TplName = "repo/settings/branches" SETTINGS_PROTECTED_BRANCH base.TplName = "repo/settings/protected_branch" SETTINGS_GITHOOKS base.TplName = "repo/settings/githooks" SETTINGS_GITHOOK_EDIT base.TplName = "repo/settings/githook_edit" SETTINGS_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 ( WEBHOOKS base.TplName = "repo/settings/webhooks" WEBHOOK_NEW base.TplName = "repo/settings/webhook_new" ORG_WEBHOOK_NEW base.TplName = "org/settings/webhook_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 ChangeCollaborationAccessMode ¶ added in v0.9.0
func ChangeMilestonStatus ¶ added in v0.6.5
func CompareAndPullRequest ¶ added in v0.6.5
func CompareAndPullRequestPost ¶ added in v0.6.9
func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
func CompareDiff ¶ added in v0.5.0
func ComposeHookEnvs ¶ added in v0.10.1
func ComposeHookEnvs(opts ComposeHookEnvsOptions) []string
func CreatePost ¶ added in v0.3.0
func CreatePost(ctx *context.Context, form auth.CreateRepoForm)
func DeleteBranchPost ¶ added in v0.9.113
func DeleteCollaboration ¶ added in v0.9.0
func DeleteComment ¶ added in v0.9.60
func DeleteDeployKey ¶ added in v0.6.5
func DeleteFile ¶ added in v0.9.97
func DeleteFilePost ¶ added in v0.9.97
func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm)
func DeleteLabel ¶ added in v0.4.0
func DeleteMilestone ¶ added in v0.6.5
func DeleteRelease ¶ added in v0.7.19
func DeleteWebhook ¶ added in v0.6.9
func DeleteWikiPagePost ¶ added in v0.9.0
func DiffPreviewPost ¶ added in v0.9.97
func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm)
func DiscordHooksEditPost ¶ added in v0.10.1
func DiscordHooksEditPost(ctx *context.Context, form auth.NewDiscordHookForm)
FIXME: merge logic to Slack
func DiscordHooksNewPost ¶ added in v0.10.1
func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm)
FIXME: merge logic to Slack
func EditFilePost ¶ added in v0.9.97
func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm)
func EditMilestone ¶ added in v0.6.5
func EditMilestonePost ¶ added in v0.6.5
func EditMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
func EditRelease ¶ added in v0.5.0
func EditReleasePost ¶ added in v0.5.0
func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm)
func EditWikiPost ¶ added in v0.7.33
func EditWikiPost(ctx *context.Context, form auth.NewWikiForm)
func FileHistory ¶ added in v0.4.0
func HTTP ¶ added in v0.7.0
func HTTP(ctx *HTTPContext)
func HTTPContexter ¶ added in v0.10.1
func HTTPContexter() macaron.Handler
func InitializeLabels ¶ added in v0.9.97
func InitializeLabels(ctx *context.Context, form auth.InitializeLabelsForm)
func MergePullRequest ¶ added in v0.6.9
func MigratePost ¶ added in v0.3.0
func MigratePost(ctx *context.Context, form auth.MigrateRepoForm)
func Milestones ¶ added in v0.4.0
func MustAllowPulls ¶ added in v0.8.43
func MustBeNotBare ¶ added in v0.8.25
func MustEnableIssues ¶ added in v0.7.33
func MustEnableWiki ¶ added in v0.7.33
func NewComment ¶ added in v0.6.5
func NewComment(ctx *context.Context, form auth.CreateCommentForm)
func NewFilePost ¶ added in v0.9.97
func NewFilePost(ctx *context.Context, form auth.EditRepoFileForm)
func NewIssuePost ¶ added in v0.6.5
func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm)
func NewMilestone ¶ added in v0.4.0
func NewMilestonePost ¶ added in v0.4.0
func NewMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)
func NewRelease ¶ added in v0.5.0
func NewReleasePost ¶ added in v0.5.0
func NewReleasePost(ctx *context.Context, form auth.NewReleaseForm)
func NewWikiPost ¶ added in v0.7.33
func NewWikiPost(ctx *context.Context, form auth.NewWikiForm)
func ParseCompareInfo ¶ added in v0.6.9
func ParseHookEvent ¶ added in v0.6.9
func ParseHookEvent(form auth.WebhookForm) *models.HookEvent
func PrepareCompareDiff ¶ added in v0.6.9
func PrepareMergedViewPullInfo ¶ added in v0.6.9
func PrepareViewPullInfo ¶ added in v0.6.9
func RefCommits ¶ added in v0.5.8
func RemoveUploadFileFromServer ¶ added in v0.9.97
func RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm)
func RenderIssueLinks ¶ added in v0.5.9
func RenderUserCards ¶ added in v0.8.25
func RetrieveLabels ¶ added in v0.6.3
func RetrieveRepoMetas ¶ added in v0.6.9
func RetrieveRepoMilestonesAndAssignees ¶ added in v0.6.9
func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)
func SearchCommits ¶ added in v0.3.0
func SettingsBranches ¶ added in v0.10.1
func SettingsCollaboration ¶ added in v0.5.0
func SettingsCollaborationPost ¶ added in v0.10.1
func SettingsDeployKeys ¶ added in v0.6.5
func SettingsDeployKeysPost ¶ added in v0.6.5
func SettingsDeployKeysPost(ctx *context.Context, form auth.AddSSHKeyForm)
func SettingsGitHooks ¶ added in v0.10.1
func SettingsGitHooksEdit ¶ added in v0.10.1
func SettingsGitHooksEditPost ¶ added in v0.10.1
func SettingsPost ¶ added in v0.5.0
func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)
func SettingsProtectedBranch ¶ added in v0.10.1
func SettingsProtectedBranchPost ¶ added in v0.10.1
func SettingsProtectedBranchPost(ctx *context.Context, form auth.ProtectBranchForm)
func SingleDownload ¶
func SlackHooksEditPost ¶ added in v0.5.0
func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm)
func SlackHooksNewPost ¶ added in v0.5.0
func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm)
func TestWebhook ¶ added in v0.7.33
func TriggerTask ¶ added in v0.7.0
func UpdateCommentContent ¶ added in v0.6.9
func UpdateDefaultBranch ¶ added in v0.10.1
func UpdateIssueAssignee ¶ added in v0.6.5
func UpdateIssueContent ¶ added in v0.6.9
func UpdateIssueLabel ¶ added in v0.4.0
func UpdateIssueMilestone ¶ added in v0.4.0
func UpdateIssueTitle ¶ added in v0.6.9
func UpdateLabel ¶ added in v0.4.0
func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm)
func UploadFile ¶ added in v0.9.97
func UploadFilePost ¶ added in v0.9.97
func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm)
func UploadFileToServer ¶ added in v0.9.97
func UploadIssueAttachment ¶ added in v0.6.5
func ValidateRepoMetas ¶ added in v0.6.9
func ViewPullCommits ¶ added in v0.6.9
func ViewPullFiles ¶ added in v0.6.9
func WebHooksEdit ¶ added in v0.4.0
func WebHooksEditPost ¶ added in v0.4.0
func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm)
func WebHooksNewPost ¶ added in v0.5.0
func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm)
func WebhooksNew ¶ added in v0.6.9
Types ¶
type ComposeHookEnvsOptions ¶ added in v0.10.1
type HTTPContext ¶ added in v0.10.1
type OrgRepoCtx ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.