controllers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2015 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const LoginSessionKey = "LoginSessionKey"
View Source
const OAuthSessionKey = "OAuthSessionKey"
View Source
const TokenSessionKey = "TokenSessionKey"

Variables

View Source
var (
	Dbm *gorp.DbMap
)

Functions

func GenerateApiDocument

func GenerateApiDocument()

func InitDB

func InitDB()

func LoadConfig

func LoadConfig()

func Transact

func Transact(f func(gorp.SqlExecutor) error) error

Types

type AlphaWingController

type AlphaWingController struct {
	GorpController
	LoginUserId   int
	GoogleService *models.GoogleService
	OAuthConfig   *oauth.Config
}

func (AlphaWingController) GetCallback

func (c AlphaWingController) GetCallback() revel.Result

func (AlphaWingController) GetLogin

func (c AlphaWingController) GetLogin() revel.Result

func (AlphaWingController) GetLogout

func (c AlphaWingController) GetLogout() revel.Result

func (AlphaWingController) Index

func (c AlphaWingController) Index() revel.Result

func (*AlphaWingController) InitGoogleService

func (c *AlphaWingController) InitGoogleService() revel.Result

func (*AlphaWingController) InitOAuthConfig

func (c *AlphaWingController) InitOAuthConfig() revel.Result

func (*AlphaWingController) InitRenderArgs

func (c *AlphaWingController) InitRenderArgs() revel.Result

func (*AlphaWingController) SetLoginInfo

func (c *AlphaWingController) SetLoginInfo() revel.Result

func (*AlphaWingController) UriFor

func (c *AlphaWingController) UriFor(path string) (*url.URL, error)

type ApiController

type ApiController struct {
	AlphaWingController
}

func (ApiController) GetDocument

func (c ApiController) GetDocument() revel.Result

func (ApiController) GetListBundle

func (c ApiController) GetListBundle(token string, page int) revel.Result

func (ApiController) NewJsonResponse

func (c ApiController) NewJsonResponse(stat int, mes []string) *JsonResponse

func (ApiController) NewJsonResponseDeleteBundle

func (c ApiController) NewJsonResponseDeleteBundle(stat int, mes []string) *JsonResponse

func (ApiController) NewJsonResponseListBundle

func (c ApiController) NewJsonResponseListBundle(stat int, mes []string, content *models.BundlesJsonResponse) *JsonResponseListBundle

func (ApiController) NewJsonResponseUploadBundle

func (c ApiController) NewJsonResponseUploadBundle(stat int, mes []string, content *models.BundleJsonResponse) *JsonResponseUploadBundle

func (ApiController) PostDeleteBundle

func (c ApiController) PostDeleteBundle(token string, file_id string) revel.Result

func (ApiController) PostUploadBundle

func (c ApiController) PostUploadBundle(token string, description string, file *os.File) revel.Result

type AppController

type AppController struct {
	AuthController
	App *models.App
}

func (AppController) GetCreateApp

func (c AppController) GetCreateApp() revel.Result

------------------------------------------------------ AppController

func (AppController) PostCreateApp

func (c AppController) PostCreateApp(app models.App) revel.Result

type AppControllerWithValidation

type AppControllerWithValidation struct {
	AppController
}

not found, permission check

func (*AppControllerWithValidation) CheckForbidden

func (c *AppControllerWithValidation) CheckForbidden() revel.Result

func (*AppControllerWithValidation) CheckNotFound

func (c *AppControllerWithValidation) CheckNotFound() revel.Result

func (AppControllerWithValidation) GetApp

func (c AppControllerWithValidation) GetApp(appId int) revel.Result

------------------------------------------------------ AppControllerWithValidation

func (AppControllerWithValidation) GetCreateBundle

func (c AppControllerWithValidation) GetCreateBundle(appId int) revel.Result

func (AppControllerWithValidation) GetUpdateApp

func (c AppControllerWithValidation) GetUpdateApp(appId int) revel.Result

func (AppControllerWithValidation) PostCreateAuthority

func (c AppControllerWithValidation) PostCreateAuthority(appId int, email string) revel.Result

func (AppControllerWithValidation) PostCreateBundle

func (c AppControllerWithValidation) PostCreateBundle(appId int, bundle models.Bundle, file *os.File) revel.Result

func (AppControllerWithValidation) PostDeleteApp

func (c AppControllerWithValidation) PostDeleteApp(appId int) revel.Result

func (AppControllerWithValidation) PostDeleteAuthority

func (c AppControllerWithValidation) PostDeleteAuthority(appId, authorityId int) revel.Result

func (AppControllerWithValidation) PostRefreshToken

func (c AppControllerWithValidation) PostRefreshToken(appId int, app models.App) revel.Result

func (AppControllerWithValidation) PostUpdateApp

func (c AppControllerWithValidation) PostUpdateApp(appId int, app models.App) revel.Result

type AuthController

type AuthController struct {
	AlphaWingController
}

func (*AuthController) CheckLogin

func (c *AuthController) CheckLogin() revel.Result

type BundleController

type BundleController struct {
	AuthController
	Bundle *models.Bundle
}

type BundleControllerWithValidation

type BundleControllerWithValidation struct {
	BundleController
}

not found, permission check

func (*BundleControllerWithValidation) CheckForbidden

func (c *BundleControllerWithValidation) CheckForbidden() revel.Result

func (*BundleControllerWithValidation) CheckNotFound

func (c *BundleControllerWithValidation) CheckNotFound() revel.Result

func (BundleControllerWithValidation) GetBundle

func (c BundleControllerWithValidation) GetBundle(bundleId int) revel.Result

------------------------------------------------------ BundleControllerWithValidation

func (BundleControllerWithValidation) GetDownloadApk

func (c BundleControllerWithValidation) GetDownloadApk(bundleId int) revel.Result

func (BundleControllerWithValidation) GetDownloadBundle

func (c BundleControllerWithValidation) GetDownloadBundle(bundleId int) revel.Result

func (BundleControllerWithValidation) GetUpdateBundle

func (c BundleControllerWithValidation) GetUpdateBundle(bundleId int) revel.Result

func (BundleControllerWithValidation) PostDeleteBundle

func (c BundleControllerWithValidation) PostDeleteBundle(bundleId int) revel.Result

func (BundleControllerWithValidation) PostUpdateBundle

func (c BundleControllerWithValidation) PostUpdateBundle(bundleId int, bundle models.Bundle) revel.Result

type Config

type Config struct {
	Secret                     string
	PermittedDomains           []string
	OrganizationName           string
	WebApplicationClientId     string
	WebApplicationClientSecret string
	WebApplicationCallbackUrl  string
	ServiceAccountClientEmail  string
	ServiceAccountPrivateKey   string
	PagerDefaultLimit          int
}
var (
	Conf *Config
)

type GorpController

type GorpController struct {
	*revel.Controller
}

type JsonResponse

type JsonResponse struct {
	Status  int      `json:"status"`
	Message []string `json:"message"`
}

type JsonResponseListBundle

type JsonResponseListBundle struct {
	*JsonResponse
	Content *models.BundlesJsonResponse `json:"content"`
}

type JsonResponseUploadBundle

type JsonResponseUploadBundle struct {
	*JsonResponse
	Content *models.BundleJsonResponse `json:"content"`
}

type LimitedTimeController

type LimitedTimeController struct {
	AlphaWingController
	Bundle *models.Bundle
}

func (*LimitedTimeController) CheckNotFound

func (c *LimitedTimeController) CheckNotFound() revel.Result

func (*LimitedTimeController) CheckValidLimitedTimeToken

func (c *LimitedTimeController) CheckValidLimitedTimeToken() revel.Result

func (*LimitedTimeController) GetDownloadIpa

func (c *LimitedTimeController) GetDownloadIpa(bundleId int) revel.Result

func (*LimitedTimeController) GetDownloadPlist

func (c *LimitedTimeController) GetDownloadPlist(bundleId int) revel.Result

type TokenSession

type TokenSession struct {
	Session revel.Session
}

---------------------------------------------------------------------- TokenSession

func (*TokenSession) PutToken

func (ts *TokenSession) PutToken(token *oauth.Token) error

Jump to

Keyboard shortcuts

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