Versions in this module Expand all Collapse all v0 v0.1.0 Sep 28, 2015 Changes in this version + const ActionCreate + const ActionDelete + const ActionDownload + const AssetKind + const DefaultMetadataBundleIdentifier + const MetadataKind + const PlistFileName + const ResourceApp + const ResourceAuthority + const ResourceBundle + const SignatureExpireDuration + const SignaturePermittedHttpMethod + func CreateApp(txn gorp.SqlExecutor, s *GoogleService, app *App) error + func CreateAudit(txn gorp.SqlExecutor, audit *Audit) error + func CreateBundle(txn gorp.SqlExecutor, bundle *Bundle) error + func CreateOAuthConfig(config *WebApplicationConfig, tokenCache oauth.Cache) *oauth.Config + func CreateUser(txn gorp.SqlExecutor, user *User) error + func GenerateApiDocumentHtml(srcPath string) (string, error) + func GetServiceAccountToken(config *ServiceAccountConfig) (*oauth.Token, error) + func IsExistAuthorityForEmail(txn gorp.SqlExecutor, email string) (bool, error) + func NewToken() string + func ParseGoogleApiError(apiErr error) (int, string, error) + func RenderMarkdown(md string) (string, error) + func Transact(dbm *gorp.DbMap, f func(gorp.SqlExecutor) error) error + type App struct + ApiToken string + CreatedAt time.Time + Description string + FileId string + Id int + Title string + UpdatedAt time.Time + func GetApp(txn gorp.SqlExecutor, id int) (*App, error) + func GetAppByApiToken(txn gorp.SqlExecutor, apiToken string) (*App, error) + func GetApps(txn gorp.SqlExecutor, fileIds []string) ([]*App, error) + func (app *App) Authorities(txn gorp.SqlExecutor) ([]*Authority, error) + func (app *App) Bundles(txn gorp.SqlExecutor) ([]*Bundle, error) + func (app *App) BundlesByPlatformType(txn gorp.SqlExecutor, platformType BundlePlatformType) ([]*Bundle, error) + func (app *App) BundlesWithPager(txn gorp.SqlExecutor, page, limit int) (Bundles, int, error) + func (app *App) CreateAuthority(txn gorp.SqlExecutor, s *GoogleService, authority *Authority) error + func (app *App) CreateBundle(dbm *gorp.DbMap, s *GoogleService, bundle *Bundle) error + func (app *App) Delete(txn gorp.SqlExecutor, s *GoogleService) error + func (app *App) DeleteAuthorities(txn gorp.SqlExecutor) error + func (app *App) DeleteAuthority(txn gorp.SqlExecutor, s *GoogleService, authority *Authority) error + func (app *App) DeleteBundles(txn gorp.SqlExecutor) error + func (app *App) DeleteFromDB(txn gorp.SqlExecutor) error + func (app *App) DeleteFromGoogleDrive(s *GoogleService) error + func (app *App) GetMaxRevisionByBundleVersion(txn gorp.SqlExecutor, bundleVersion string) (int, error) + func (app *App) HasAuthorityForEmail(txn gorp.SqlExecutor, email string) (bool, error) + func (app *App) ParentReference() *drive.ParentReference + func (app *App) PreInsert(s gorp.SqlExecutor) error + func (app *App) PreUpdate(s gorp.SqlExecutor) error + func (app *App) RefreshToken(txn gorp.SqlExecutor) error + func (app *App) Save(txn gorp.SqlExecutor) error + func (app *App) Update(txn gorp.SqlExecutor) error + type Asset struct + Kind string + Url string + type Audit struct + Action int + CreatedAt time.Time + Id int + Resource int + ResourceId int + UpdatedAt time.Time + UserId int + func GetAudit(txn gorp.SqlExecutor, id int) (*Audit, error) + func (audit *Audit) Delete(txn gorp.SqlExecutor) error + func (audit *Audit) PreInsert(s gorp.SqlExecutor) error + func (audit *Audit) PreUpdate(s gorp.SqlExecutor) error + func (audit *Audit) Save(txn gorp.SqlExecutor) error + func (audit *Audit) Update(txn gorp.SqlExecutor) error + func (audit *Audit) Validate(v *revel.Validation) + type Authority struct + AppId int + CreatedAt time.Time + Email string + Id int + PermissionId string + UpdatedAt time.Time + func GetAuthority(txn gorp.SqlExecutor, id int) (*Authority, error) + func (authority *Authority) DeleteFromDB(txn gorp.SqlExecutor) error + func (authority *Authority) PreInsert(s gorp.SqlExecutor) error + func (authority *Authority) PreUpdate(s gorp.SqlExecutor) error + func (authority *Authority) Save(txn gorp.SqlExecutor) error + type Bundle struct + AppId int + BundleIdentifier string + BundleInfo *BundleInfo + BundleVersion string + CreatedAt time.Time + Description string + File *os.File + FileId string + FileName string + Id int + PlatformType BundlePlatformType + Revision int + UpdatedAt time.Time + func GetBundle(txn gorp.SqlExecutor, id int) (*Bundle, error) + func GetBundleByFileId(txn gorp.SqlExecutor, fileId string) (*Bundle, error) + func (bundle *Bundle) App(txn gorp.SqlExecutor) (*App, error) + func (bundle *Bundle) BuildFileName() string + func (bundle *Bundle) Delete(txn gorp.SqlExecutor, s *GoogleService) error + func (bundle *Bundle) DeleteFromDB(txn gorp.SqlExecutor) error + func (bundle *Bundle) DeleteFromGoogleDrive(s *GoogleService) error + func (bundle *Bundle) IsApk() bool + func (bundle *Bundle) IsIpa() bool + func (bundle *Bundle) JsonResponse(ub UriBuilder) (*BundleJsonResponse, error) + func (bundle *Bundle) Plist(txn gorp.SqlExecutor, ipaUrl *url.URL) (*Plist, error) + func (bundle *Bundle) PlistReader(txn gorp.SqlExecutor, ipaUrl *url.URL) (io.Reader, error) + func (bundle *Bundle) PreInsert(s gorp.SqlExecutor) error + func (bundle *Bundle) PreUpdate(s gorp.SqlExecutor) error + func (bundle *Bundle) Save(txn gorp.SqlExecutor) error + func (bundle *Bundle) Update(txn gorp.SqlExecutor) error + type BundleFileExtension string + const BundleFileExtensionAndroid + const BundleFileExtensionIOS + func (ext BundleFileExtension) IsValid() bool + func (ext BundleFileExtension) PlatformType() BundlePlatformType + type BundleInfo struct + Identifier string + PlatformType BundlePlatformType + Version string + func NewBundleInfo(file *os.File, platformType BundlePlatformType) (*BundleInfo, error) + type BundleJsonResponse struct + CreatedAt string + FileId string + InstallUrl string + PlatformType string + QrCodeUrl string + Revision int + UpdatedAt string + Version string + type BundleParseError struct + Offset int64 + func (e *BundleParseError) Error() string + type BundlePlatformType int + const BundlePlatformTypeAndroid + const BundlePlatformTypeIOS + func (platformType BundlePlatformType) Extention() BundleFileExtension + func (platformType BundlePlatformType) String() string + type Bundles []*Bundle + func (bundles Bundles) JsonResponse(ub UriBuilder) ([]*BundleJsonResponse, error) + type BundlesJsonResponse struct + Bundles []*BundleJsonResponse + Limit int + Page int + TotalCount int + type CapacityInfo struct + PercentageRemained string + Total string + Used string + type GoogleService struct + AboutService *drive.AboutService + AccessToken string + Client *http.Client + DriveService *drive.Service + FilesService *drive.FilesService + OAuth2Service *oauth2.Service + PermissionsService *drive.PermissionsService + func NewGoogleService(token *oauth.Token) (*GoogleService, error) + func (s *GoogleService) CreateFolder(folderName string) (*drive.File, error) + func (s *GoogleService) CreateUserPermission(email string, role string) *drive.Permission + func (s *GoogleService) DeleteAllFiles() error + func (s *GoogleService) DeleteFile(fileId string) error + func (s *GoogleService) DeletePermission(fileId string, permissionId string) error + func (s *GoogleService) DownloadFile(fileId string) (*http.Response, *drive.File, error) + func (s *GoogleService) GetAbout() (*drive.About, error) + func (s *GoogleService) GetCapacityInfo() (*CapacityInfo, error) + func (s *GoogleService) GetFile(fileId string) (*drive.File, error) + func (s *GoogleService) GetFileList() (*drive.FileList, error) + func (s *GoogleService) GetPermissionList(fileId string) (*drive.PermissionList, error) + func (s *GoogleService) GetSharedFileList(ownerEmail string) (*drive.FileList, error) + func (s *GoogleService) GetTokenInfo() (*oauth2.Tokeninfo, error) + func (s *GoogleService) GetUserInfo() (*oauth2.Userinfoplus, error) + func (s *GoogleService) InsertFile(file *os.File, filename string, parent *drive.ParentReference) (*drive.File, error) + func (s *GoogleService) InsertPermission(fileId string, permission *drive.Permission) (*drive.Permission, error) + func (s *GoogleService) UpdateFileTitle(fileId string, title string) error + func (sa *GoogleService) UpdatePermission(fileId string, permissionId string, permission *drive.Permission) (*drive.Permission, error) + type Item struct + Assets []*Asset + Metadata *Metadata + type LimitedTimeSignatureInfo struct + ParamToSign *ParamToSign + Signature string + func NewLimitedTimeSignatureInfo(host, path string) *LimitedTimeSignatureInfo + func (signatureInfo *LimitedTimeSignatureInfo) IsExpired() (bool, error) + func (signatureInfo *LimitedTimeSignatureInfo) IsValid(key string) (bool, error) + func (signatureInfo *LimitedTimeSignatureInfo) RefreshSignature(key string) + func (signatureInfo *LimitedTimeSignatureInfo) UrlValues() *url.Values + type Metadata struct + BundleIdentifier string + BundleVersion string + Kind string + Title string + type ParamToSign struct + Host string + Limit string + Method string + Path string + Token string + func (param *ParamToSign) String() string + type Plist struct + Items []*Item + func NewPlist(title, version, identifier, ipaUrl string) *Plist + func (p *Plist) Marshall() ([]byte, error) + func (p *Plist) Reader() (io.Reader, error) + type ServiceAccountConfig struct + ClientEmail string + PrivateKey string + Scope []string + type UriBuilder interface + UriFor func(string) (*url.URL, error) + type User struct + CreatedAt time.Time + Email string + Id int + UpdatedAt time.Time + func FindOrCreateUser(txn gorp.SqlExecutor, email string) (*User, error) + func GetUser(txn gorp.SqlExecutor, id int) (*User, error) + func GetUserFromEmail(txn gorp.SqlExecutor, email string) (*User, error) + func (user *User) Delete(txn gorp.SqlExecutor) error + func (user *User) PreInsert(s gorp.SqlExecutor) error + func (user *User) PreUpdate(s gorp.SqlExecutor) error + func (user *User) Save(txn gorp.SqlExecutor) error + func (user *User) Update(txn gorp.SqlExecutor) error + func (user *User) Validate(v *revel.Validation) + type WebApplicationConfig struct + CallbackUrl string + ClientId string + ClientSecret string + Scope []string