diff options
author | Unknwon <u@gogs.io> | 2015-08-27 00:30:06 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-27 00:30:06 +0800 |
commit | 4217c2333cf9ac29af611df9826cc4b5198241fe (patch) | |
tree | d388e0ede4707c902a499937a31b67faa4c784c6 /modules/middleware/context.go | |
parent | 28814564212b7c64136cc3eda3774af56983557e (diff) | |
download | gitea-4217c2333cf9ac29af611df9826cc4b5198241fe.tar.gz gitea-4217c2333cf9ac29af611df9826cc4b5198241fe.zip |
new create webhook UI
Diffstat (limited to 'modules/middleware/context.go')
-rw-r--r-- | modules/middleware/context.go | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go index 8a8867da4d..b25674f60f 100644 --- a/modules/middleware/context.go +++ b/modules/middleware/context.go @@ -26,6 +26,27 @@ import ( "github.com/gogits/gogs/modules/setting" ) +type RepoContext struct { + AccessMode models.AccessMode + IsWatching bool + IsBranch bool + IsTag bool + IsCommit bool + Repository *models.Repository + Owner *models.User + Commit *git.Commit + Tag *git.Tag + GitRepo *git.Repository + BranchName string + TagName string + TreeName string + CommitId string + RepoLink string + CloneLink models.CloneLink + CommitsCount int + Mirror *models.Mirror +} + // Context represents context of a request. type Context struct { *macaron.Context @@ -51,27 +72,6 @@ type Context struct { } } -type RepoContext struct { - AccessMode models.AccessMode - IsWatching bool - IsBranch bool - IsTag bool - IsCommit bool - Repository *models.Repository - Owner *models.User - Commit *git.Commit - Tag *git.Tag - GitRepo *git.Repository - BranchName string - TagName string - TreeName string - CommitId string - RepoLink string - CloneLink models.CloneLink - CommitsCount int - Mirror *models.Mirror -} - // IsOwner returns true if current user is the owner of repository. func (r RepoContext) IsOwner() bool { return r.AccessMode >= models.ACCESS_MODE_OWNER |