Documentation
¶
Index ¶
- Constants
- func AddSettings(ctx *gin.Context)
- func CorsHandle(ctx *gin.Context)
- func GHAuthCallback(ctx *gin.Context)
- func GHBindCallback(ctx *gin.Context)
- func GetAccessURL(ctx *gin.Context)
- func GetBindURL(ctx *gin.Context)
- func GetProject(ctx *gin.Context)
- func GetSettings(ctx *gin.Context)
- func GetStatus(ctx *gin.Context)
- func GetUser(ctx *gin.Context)
- func GinError(ctx *gin.Context, status int, err ...interface{})
- func GinH(h interface{}) gin.HandlerFunc
- func GinLogger(ctx *gin.Context)
- func GinMessage(ctx *gin.Context, status int, msg ...interface{})
- func GithubWebhooks(rw http.ResponseWriter, req *http.Request)
- func ListProjects(ctx *gin.Context)
- func Login(ctx *gin.Context)
- func Logout(ctx *gin.Context)
- func MWAuthGithubServer(rw http.ResponseWriter, req *http.Request)
- func MWLoadGithubApp(ctx *gin.Context)
- func MWRequireAdmin(ctx *gin.Context)
- func MWRequireGithubCli(ctx *gin.Context)
- func MWRequireLogin(ctx *gin.Context)
- func NewGin() *gin.Engine
- func NewProject(ctx *gin.Context)
- func NotFound(rw http.ResponseWriter, req *http.Request)
- func Registry(ctx *gin.Context)
- func RemoveProject(ctx *gin.Context)
- func Serve(listenAddr string, db *mgo.Database)
- func SetMgoDB(db *mgo.Database) gin.HandlerFunc
- func TODO(ctx *gin.Context)
- func UpdateProject(ctx *gin.Context)
- func WebhookRouter(r *gin.RouterGroup)
Constants ¶
View Source
const ( // royter prefix API_PREFIX = "/api" WEB_HOOKS = "/webhooks" // gin.Context.Set key CtxKeyMgoDB = "mgodb" CtxKeyUserAuth = "userauth" CtxKeyUser = "user" CtxKeyGithubApp = "githubapp" CtxKeyGithubCli = "githubclient" )
Variables ¶
This section is empty.
Functions ¶
func GetProject ¶
func ListProjects ¶
func MWAuthGithubServer ¶
func MWAuthGithubServer(rw http.ResponseWriter, req *http.Request)
MWAuthGithubServer webhook的来源验证
func MWRequireAdmin ¶
MWRequireAdmin 需要管理员权限,需要在使用 MWRequireLogin 之后
func MWRequireGithubCli ¶
MWRequireGithubAuth 需要 github 账号的授权认证
func NewProject ¶
func NotFound ¶
func NotFound(rw http.ResponseWriter, req *http.Request)
NotFound no router matched.
func RemoveProject ¶
func UpdateProject ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.