repo

package
v0.9.99 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2016 License: MIT Imports: 32 Imported by: 0

Documentation

Index

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 Action

func Action(ctx *context.Context)

func Branches

func Branches(ctx *context.Context)

func ChangeCollaborationAccessMode

func ChangeCollaborationAccessMode(ctx *context.Context)

func ChangeMilestonStatus

func ChangeMilestonStatus(ctx *context.Context)

func Collaboration

func Collaboration(ctx *context.Context)

func CollaborationPost

func CollaborationPost(ctx *context.Context)

func Commits

func Commits(ctx *context.Context)

func CompareAndPullRequest

func CompareAndPullRequest(ctx *context.Context)

func CompareAndPullRequestPost

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

func CompareDiff

func CompareDiff(ctx *context.Context)

func Create

func Create(ctx *context.Context)

func CreatePost

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

func DeleteCollaboration

func DeleteCollaboration(ctx *context.Context)

func DeleteComment

func DeleteComment(ctx *context.Context)

func DeleteDeployKey

func DeleteDeployKey(ctx *context.Context)

func DeleteFile

func DeleteFile(ctx *context.Context)

func DeleteFilePost

func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm)

func DeleteLabel

func DeleteLabel(ctx *context.Context)

func DeleteMilestone

func DeleteMilestone(ctx *context.Context)

func DeleteRelease

func DeleteRelease(ctx *context.Context)

func DeleteWebhook

func DeleteWebhook(ctx *context.Context)

func DeleteWikiPagePost

func DeleteWikiPagePost(ctx *context.Context)

func DeployKeys

func DeployKeys(ctx *context.Context)

func DeployKeysPost

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

func Diff

func Diff(ctx *context.Context)

func DiffPreviewPost

func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm)

func Download

func Download(ctx *context.Context)

func EditFile

func EditFile(ctx *context.Context)

func EditFilePost

func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm)

func EditMilestone

func EditMilestone(ctx *context.Context)

func EditMilestonePost

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

func EditRelease

func EditRelease(ctx *context.Context)

func EditReleasePost

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

func EditWiki

func EditWiki(ctx *context.Context)

func EditWikiPost

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

func FileHistory

func FileHistory(ctx *context.Context)

func Fork

func Fork(ctx *context.Context)

func ForkPost

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

func Forks

func Forks(ctx *context.Context)

func GitHooks

func GitHooks(ctx *context.Context)

func GitHooksEdit

func GitHooksEdit(ctx *context.Context)

func GitHooksEditPost

func GitHooksEditPost(ctx *context.Context)

func HTTP

func HTTP(ctx *context.Context)

func HTTPBackend

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

func Home

func Home(ctx *context.Context)

func InitializeLabels

func InitializeLabels(ctx *context.Context, form auth.InitializeLabelsForm)

func Issues

func Issues(ctx *context.Context)

func Labels

func Labels(ctx *context.Context)

func MergePullRequest

func MergePullRequest(ctx *context.Context)

func Migrate

func Migrate(ctx *context.Context)

func MigratePost

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

func Milestones

func Milestones(ctx *context.Context)

func MustAllowPulls

func MustAllowPulls(ctx *context.Context)

func MustBeNotBare

func MustBeNotBare(ctx *context.Context)

func MustEnableIssues

func MustEnableIssues(ctx *context.Context)

func MustEnableWiki

func MustEnableWiki(ctx *context.Context)

func NewComment

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

func NewFile

func NewFile(ctx *context.Context)

func NewFilePost

func NewFilePost(ctx *context.Context, form auth.EditRepoFileForm)

func NewIssue

func NewIssue(ctx *context.Context)

func NewIssuePost

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

func NewLabel

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

func NewMilestone

func NewMilestone(ctx *context.Context)

func NewMilestonePost

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

func NewRelease

func NewRelease(ctx *context.Context)

func NewReleasePost

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

func NewWiki

func NewWiki(ctx *context.Context)

func NewWikiPost

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

func ParseCompareInfo

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

func ParseHookEvent

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

func PrepareCompareDiff

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

func PrepareMergedViewPullInfo

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

func PrepareViewPullInfo

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

func RawDiff

func RawDiff(ctx *context.Context)

func RefCommits

func RefCommits(ctx *context.Context)

func Releases

func Releases(ctx *context.Context)

func RemoveUploadFileFromServer

func RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm)
func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List

func RenderUserCards

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

func RetrieveLabels

func RetrieveLabels(ctx *context.Context)

func RetrieveRepoMetas

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

func RetrieveRepoMilestonesAndAssignees

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

func SearchCommits

func SearchCommits(ctx *context.Context)

func ServeBlob

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

func ServeData

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

func Settings

func Settings(ctx *context.Context)

func SettingsPost

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

func SingleDownload

func SingleDownload(ctx *context.Context)

func SlackHooksEditPost

func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm)

func SlackHooksNewPost

func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm)

func Stars

func Stars(ctx *context.Context)

func TestWebhook

func TestWebhook(ctx *context.Context)

func TriggerTask

func TriggerTask(ctx *context.Context)

func UpdateCommentContent

func UpdateCommentContent(ctx *context.Context)

func UpdateIssueAssignee

func UpdateIssueAssignee(ctx *context.Context)

func UpdateIssueContent

func UpdateIssueContent(ctx *context.Context)

func UpdateIssueLabel

func UpdateIssueLabel(ctx *context.Context)

func UpdateIssueMilestone

func UpdateIssueMilestone(ctx *context.Context)

func UpdateIssueTitle

func UpdateIssueTitle(ctx *context.Context)

func UpdateLabel

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

func UploadFile

func UploadFile(ctx *context.Context)

func UploadFilePost

func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm)

func UploadFileToServer

func UploadFileToServer(ctx *context.Context)

func UploadIssueAttachment

func UploadIssueAttachment(ctx *context.Context)

func ValidateRepoMetas

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

func ViewIssue

func ViewIssue(ctx *context.Context)

func ViewPullCommits

func ViewPullCommits(ctx *context.Context)

func ViewPullFiles

func ViewPullFiles(ctx *context.Context)

func Watchers

func Watchers(ctx *context.Context)

func WebHooksEdit

func WebHooksEdit(ctx *context.Context)

func WebHooksEditPost

func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm)

func WebHooksNewPost

func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm)

func Webhooks

func Webhooks(ctx *context.Context)

func WebhooksNew

func WebhooksNew(ctx *context.Context)

func Wiki

func Wiki(ctx *context.Context)

func WikiPages

func WikiPages(ctx *context.Context)

Types

type OrgRepoCtx

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

type PageMeta

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