repo

package
v0.9.71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2016 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COMMITS base.TplName = "repo/commits"
	DIFF    base.TplName = "repo/diff"
)
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 Action

func Action(ctx *context.Context)

func Branches

func Branches(ctx *context.Context)

func ChangeCollaborationAccessMode added in v0.9.0

func ChangeCollaborationAccessMode(ctx *context.Context)

func ChangeMilestonStatus added in v0.6.5

func ChangeMilestonStatus(ctx *context.Context)

func Collaboration added in v0.4.0

func Collaboration(ctx *context.Context)

func CollaborationPost added in v0.4.0

func CollaborationPost(ctx *context.Context)

func Commits

func Commits(ctx *context.Context)

func CompareAndPullRequest added in v0.6.5

func CompareAndPullRequest(ctx *context.Context)

func CompareAndPullRequestPost added in v0.6.9

func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)

func CompareDiff added in v0.5.0

func CompareDiff(ctx *context.Context)

func Create

func Create(ctx *context.Context)

func CreatePost added in v0.3.0

func CreatePost(ctx *context.Context, form auth.CreateRepoForm)

func DeleteCollaboration added in v0.9.0

func DeleteCollaboration(ctx *context.Context)

func DeleteComment added in v0.9.60

func DeleteComment(ctx *context.Context)

func DeleteDeployKey added in v0.6.5

func DeleteDeployKey(ctx *context.Context)

func DeleteLabel added in v0.4.0

func DeleteLabel(ctx *context.Context)

func DeleteMilestone added in v0.6.5

func DeleteMilestone(ctx *context.Context)

func DeleteRelease added in v0.7.19

func DeleteRelease(ctx *context.Context)

func DeleteWebhook added in v0.6.9

func DeleteWebhook(ctx *context.Context)

func DeleteWikiPagePost added in v0.9.0

func DeleteWikiPagePost(ctx *context.Context)

func DeployKeys added in v0.6.9

func DeployKeys(ctx *context.Context)

func DeployKeysPost added in v0.6.9

func DeployKeysPost(ctx *context.Context, form auth.AddSSHKeyForm)

func Diff

func Diff(ctx *context.Context)

func Download added in v0.5.0

func Download(ctx *context.Context)

func EditMilestone added in v0.6.5

func EditMilestone(ctx *context.Context)

func EditMilestonePost added in v0.6.5

func EditMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)

func EditRelease added in v0.5.0

func EditRelease(ctx *context.Context)

func EditReleasePost added in v0.5.0

func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm)

func EditWiki added in v0.7.33

func EditWiki(ctx *context.Context)

func EditWikiPost added in v0.7.33

func EditWikiPost(ctx *context.Context, form auth.NewWikiForm)

func FileHistory added in v0.4.0

func FileHistory(ctx *context.Context)

func Fork added in v0.5.8

func Fork(ctx *context.Context)

func ForkPost added in v0.5.8

func ForkPost(ctx *context.Context, form auth.CreateRepoForm)

func Forks added in v0.7.0

func Forks(ctx *context.Context)

func GitHooks added in v0.5.5

func GitHooks(ctx *context.Context)

func GitHooksEdit added in v0.5.5

func GitHooksEdit(ctx *context.Context)

func GitHooksEditPost added in v0.5.5

func GitHooksEditPost(ctx *context.Context)

func HTTP added in v0.7.0

func HTTP(ctx *context.Context)

func HTTPBackend added in v0.6.0

func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc

func Home added in v0.5.0

func Home(ctx *context.Context)

func Issues

func Issues(ctx *context.Context)

func Labels added in v0.6.3

func Labels(ctx *context.Context)

func MergePullRequest added in v0.6.9

func MergePullRequest(ctx *context.Context)

func Migrate added in v0.3.0

func Migrate(ctx *context.Context)

func MigratePost added in v0.3.0

func MigratePost(ctx *context.Context, form auth.MigrateRepoForm)

func Milestones added in v0.4.0

func Milestones(ctx *context.Context)

func MustAllowPulls added in v0.8.43

func MustAllowPulls(ctx *context.Context)

func MustBeNotBare added in v0.8.25

func MustBeNotBare(ctx *context.Context)

func MustEnableIssues added in v0.7.33

func MustEnableIssues(ctx *context.Context)

func MustEnableWiki added in v0.7.33

func MustEnableWiki(ctx *context.Context)

func NewComment added in v0.6.5

func NewComment(ctx *context.Context, form auth.CreateCommentForm)

func NewIssue added in v0.6.5

func NewIssue(ctx *context.Context)

func NewIssuePost added in v0.6.5

func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm)

func NewLabel added in v0.4.0

func NewLabel(ctx *context.Context, form auth.CreateLabelForm)

func NewMilestone added in v0.4.0

func NewMilestone(ctx *context.Context)

func NewMilestonePost added in v0.4.0

func NewMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm)

func NewRelease added in v0.5.0

func NewRelease(ctx *context.Context)

func NewReleasePost added in v0.5.0

func NewReleasePost(ctx *context.Context, form auth.NewReleaseForm)

func NewWiki added in v0.7.33

func NewWiki(ctx *context.Context)

func NewWikiPost added in v0.7.33

func NewWikiPost(ctx *context.Context, form auth.NewWikiForm)

func ParseCompareInfo added in v0.6.9

func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, *git.Repository, *git.PullRequestInfo, string, string)

func ParseHookEvent added in v0.6.9

func ParseHookEvent(form auth.WebhookForm) *models.HookEvent

func PrepareCompareDiff added in v0.6.9

func PrepareCompareDiff(
	ctx *context.Context,
	headUser *models.User,
	headRepo *models.Repository,
	headGitRepo *git.Repository,
	prInfo *git.PullRequestInfo,
	baseBranch, headBranch string) bool

func PrepareMergedViewPullInfo added in v0.6.9

func PrepareMergedViewPullInfo(ctx *context.Context, pull *models.Issue)

func PrepareViewPullInfo added in v0.6.9

func PrepareViewPullInfo(ctx *context.Context, pull *models.Issue) *git.PullRequestInfo

func RawDiff added in v0.9.46

func RawDiff(ctx *context.Context)

func RefCommits added in v0.5.8

func RefCommits(ctx *context.Context)

func Releases added in v0.3.0

func Releases(ctx *context.Context)
func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List

func RenderUserCards added in v0.8.25

func RenderUserCards(ctx *context.Context, total int, getter func(page int) ([]*models.User, error), tpl base.TplName)

func RetrieveLabels added in v0.6.3

func RetrieveLabels(ctx *context.Context)

func RetrieveRepoMetas added in v0.6.9

func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository) []*models.Label

func RetrieveRepoMilestonesAndAssignees added in v0.6.9

func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository)

func SearchCommits added in v0.3.0

func SearchCommits(ctx *context.Context)

func ServeBlob added in v0.5.8

func ServeBlob(ctx *context.Context, blob *git.Blob) error

func ServeData added in v0.6.5

func ServeData(ctx *context.Context, name string, reader io.Reader) error

func Settings added in v0.5.0

func Settings(ctx *context.Context)

func SettingsPost added in v0.5.0

func SettingsPost(ctx *context.Context, form auth.RepoSettingForm)

func SingleDownload

func SingleDownload(ctx *context.Context)

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 Stars added in v0.7.0

func Stars(ctx *context.Context)

func TestWebhook added in v0.7.33

func TestWebhook(ctx *context.Context)

func TriggerTask added in v0.7.0

func TriggerTask(ctx *context.Context)

func UpdateCommentContent added in v0.6.9

func UpdateCommentContent(ctx *context.Context)

func UpdateIssueAssignee added in v0.6.5

func UpdateIssueAssignee(ctx *context.Context)

func UpdateIssueContent added in v0.6.9

func UpdateIssueContent(ctx *context.Context)

func UpdateIssueLabel added in v0.4.0

func UpdateIssueLabel(ctx *context.Context)

func UpdateIssueMilestone added in v0.4.0

func UpdateIssueMilestone(ctx *context.Context)

func UpdateIssueTitle added in v0.6.9

func UpdateIssueTitle(ctx *context.Context)

func UpdateLabel added in v0.4.0

func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm)

func UploadIssueAttachment added in v0.6.5

func UploadIssueAttachment(ctx *context.Context)

func ValidateRepoMetas added in v0.6.9

func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm) ([]int64, int64, int64)

func ViewIssue

func ViewIssue(ctx *context.Context)

func ViewPullCommits added in v0.6.9

func ViewPullCommits(ctx *context.Context)

func ViewPullFiles added in v0.6.9

func ViewPullFiles(ctx *context.Context)

func Watchers added in v0.7.0

func Watchers(ctx *context.Context)

func WebHooksEdit added in v0.4.0

func WebHooksEdit(ctx *context.Context)

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 Webhooks added in v0.5.0

func Webhooks(ctx *context.Context)

func WebhooksNew added in v0.6.9

func WebhooksNew(ctx *context.Context)

func Wiki added in v0.7.33

func Wiki(ctx *context.Context)

func WikiPages added in v0.7.33

func WikiPages(ctx *context.Context)

Types

type OrgRepoCtx added in v0.5.0

type OrgRepoCtx struct {
	OrgID       int64
	RepoID      int64
	Link        string
	NewTemplate base.TplName
}

type PageMeta added in v0.7.33

type PageMeta struct {
	Name    string
	URL     string
	Updated time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL