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 ComposeHookEnvs(opts ComposeHookEnvsOptions) []string
- 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 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 SettingsBranches(c *context.Context)
- func SettingsCollaboration(c *context.Context)
- func SettingsCollaborationPost(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 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 ComposeHookEnvsOptions
- 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 ( ENV_AUTH_USER_ID = "GOGS_AUTH_USER_ID" ENV_AUTH_USER_NAME = "GOGS_AUTH_USER_NAME" ENV_AUTH_USER_EMAIL = "GOGS_AUTH_USER_EMAIL" 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 = "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_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 ¶ added in v0.10.18
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 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(c *context.Context, f form.CreateRepo)
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(c *context.Context, f form.DeleteRepoFile)
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(c *context.Context, f form.EditPreviewDiff)
func DiscordHooksEditPost ¶ added in v0.10.1
func DiscordHooksEditPost(c *context.Context, f form.NewDiscordHook)
FIXME: merge logic to Slack
func DiscordHooksNewPost ¶ added in v0.10.1
func DiscordHooksNewPost(c *context.Context, f form.NewDiscordHook)
FIXME: merge logic to Slack
func EditFilePost ¶ added in v0.9.97
func EditFilePost(c *context.Context, f form.EditRepoFile)
func EditMilestone ¶ added in v0.6.5
func EditMilestonePost ¶ added in v0.6.5
func EditMilestonePost(c *context.Context, f form.CreateMilestone)
func EditRelease ¶ added in v0.5.0
func EditReleasePost ¶ added in v0.5.0
func EditReleasePost(c *context.Context, f form.EditRelease)
func FileHistory ¶ added in v0.4.0
func HTTP ¶ added in v0.7.0
func HTTP(c *HTTPContext)
func HTTPContexter ¶ added in v0.10.1
func HTTPContexter() macaron.Handler
func InitializeLabels ¶ added in v0.9.97
func InitializeLabels(c *context.Context, f form.InitializeLabels)
func MergePullRequest ¶ added in v0.6.9
func MigratePost ¶ added in v0.3.0
func MigratePost(c *context.Context, f form.MigrateRepo)
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(c *context.Context, f form.CreateComment)
func NewFilePost ¶ added in v0.9.97
func NewFilePost(c *context.Context, f form.EditRepoFile)
func NewMilestone ¶ added in v0.4.0
func NewMilestonePost ¶ added in v0.4.0
func NewMilestonePost(c *context.Context, f form.CreateMilestone)
func NewRelease ¶ added in v0.5.0
func NewReleasePost ¶ added in v0.5.0
func NewReleasePost(c *context.Context, f form.NewRelease)
func ParseCompareInfo ¶ added in v0.6.9
func PrepareCompareDiff ¶ added in v0.6.9
func PrepareMergedViewPullInfo ¶ added in v0.6.9
func PrepareViewPullInfo ¶ added in v0.6.9
func RedeliveryWebhook ¶ added in v0.11.4
func RefCommits ¶ added in v0.5.8
func RemoveUploadFileFromServer ¶ added in v0.9.97
func RemoveUploadFileFromServer(c *context.Context, f form.RemoveUploadFile)
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(c *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 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(c *context.Context, f form.RepoSetting)
func SettingsProtectedBranch ¶ added in v0.10.1
func SettingsProtectedBranchPost ¶ added in v0.10.1
func SettingsProtectedBranchPost(c *context.Context, f form.ProtectBranch)
func SingleDownload ¶
func SlackHooksEditPost ¶ added in v0.5.0
func SlackHooksEditPost(c *context.Context, f form.NewSlackHook)
func SlackHooksNewPost ¶ added in v0.5.0
func SlackHooksNewPost(c *context.Context, f form.NewSlackHook)
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(c *context.Context, f form.CreateLabel)
func UploadFile ¶ added in v0.9.97
func UploadFilePost ¶ added in v0.9.97
func UploadFilePost(c *context.Context, f form.UploadRepoFile)
func UploadFileToServer ¶ added in v0.9.97
func UploadIssueAttachment ¶ added in v0.6.5
func UploadReleaseAttachment ¶ added in v0.10.18
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(c *context.Context, f form.NewWebhook)
func WebHooksNewPost ¶ added in v0.5.0
func WebHooksNewPost(c *context.Context, f form.NewWebhook)
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.