controllers

package
v0.0.0-...-0fc0a1a Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2016 License: GPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *gorm.DB
View Source
var SlashRegexp *regexp.Regexp

Functions

func CheckAutorization

func CheckAutorization(db *gorm.DB, repoDir, username, operation, refName string) (bool, bool, error)

func CleanSlashes

func CleanSlashes(in string) string

func ErrorResp

func ErrorResp(resp response.IBasicResponse, respError response.Error, err error)

func FinishEvent

func FinishEvent(db *gorm.DB, eventId uint) error

func InitDB

func InitDB()

func Login

func Login(db *gorm.DB, username, password string) (*models.User, error)

func StartEvent

func StartEvent(db *gorm.DB, repoPath, eventType, username, reference, description string, level misc.EventLevel, finished bool) (uint, error)

Types

type AdminController

type AdminController struct {
	JWTController
}

func (*AdminController) CheckPermission

func (ctrl *AdminController) CheckPermission() revel.Result

type App

type App struct {
	*revel.Controller
}

func (App) Index

func (c App) Index() revel.Result

type AuthorizationCtrl

type AuthorizationCtrl struct {
	GormController
}

func (AuthorizationCtrl) CheckAuthorization

func (c AuthorizationCtrl) CheckAuthorization() revel.Result

func (*AuthorizationCtrl) FinishEvent

func (ctrl *AuthorizationCtrl) FinishEvent(eventId uint) revel.Result

func (*AuthorizationCtrl) Login

func (ctrl *AuthorizationCtrl) Login() revel.Result

func (*AuthorizationCtrl) StartEvent

func (ctrl *AuthorizationCtrl) StartEvent(finished bool) revel.Result

type BasicController

type BasicController struct {
	*revel.Controller
}

func (*BasicController) GetJSONBody

func (c *BasicController) GetJSONBody(out interface{}) error

type FolderAdminController

type FolderAdminController struct {
	JWTController
	Folder models.Folder
}

func (*FolderAdminController) CheckPermission

func (ctrl *FolderAdminController) CheckPermission() revel.Result

type GitCtrl

type GitCtrl struct {
	GormController
}

func (*GitCtrl) Repo

func (ctrl *GitCtrl) Repo() revel.Result

type GitRaw

type GitRaw struct {
	*cgi.Handler
}

func (GitRaw) Apply

func (r GitRaw) Apply(req *revel.Request, resp *revel.Response)

type GormController

type GormController struct {
	BasicController
	Tx *gorm.DB
}

func (*GormController) Begin

func (c *GormController) Begin() revel.Result

func (*GormController) Commit

func (c *GormController) Commit() revel.Result

func (*GormController) CommitTransaction

func (c *GormController) CommitTransaction(tx *gorm.DB)

func (*GormController) NewTransaction

func (c *GormController) NewTransaction() *gorm.DB

func (*GormController) Rollback

func (c *GormController) Rollback() revel.Result

func (*GormController) RollbackTransaction

func (c *GormController) RollbackTransaction(tx *gorm.DB)

type JWTController

type JWTController struct {
	GormController
	User misc.JWTUser
}

func (*JWTController) ParseToken

func (ctrl *JWTController) ParseToken() revel.Result

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

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