Documentation ¶
Index ¶
- func Open(dir string) (*storm.DB, error)
- type ApplicationStorage
- func (s ApplicationStorage) Application(ctx context.Context, id string) (*baas.Application, error)
- func (s ApplicationStorage) Applications(ctx context.Context, sinceID string, limit int) ([]*baas.Application, error)
- func (s ApplicationStorage) Delete(ctx context.Context, id string) error
- func (s ApplicationStorage) Store(ctx context.Context, n *baas.NewApplication) (*baas.Application, error)
- func (s ApplicationStorage) Update(ctx context.Context, u *baas.UpdateApplication) (*baas.Application, error)
- type BlockStorage
- func (s BlockStorage) ApplicationUsers(ctx context.Context, id string, page, limit int) ([]*baas.BAASUser, error)
- func (s *BlockStorage) DeleteKey(ctx context.Context, id, password string) error
- func (s *BlockStorage) GetAddress(ctx context.Context, id, password string) (string, error)
- func (s *BlockStorage) GetAddressByService(ctx context.Context, id, password string) (string, string, string, string, string, error)
- func (s *BlockStorage) GetApplicationId(ctx context.Context, id string) (string, error)
- func (s *BlockStorage) GetKey(ctx context.Context, id, password string) (string, string, string, string, error)
- func (s *BlockStorage) Store(ctx context.Context, n *baas.NewBAASUser) (*baas.BAASUser, error)
- func (s *BlockStorage) Update(ctx context.Context, u *baas.UpdateBAASUser) (*baas.BAASUser, error)
- func (s *BlockStorage) UpdatePassword(ctx context.Context, id, old, newpass string) error
- type FileStorage
- func (s FileStorage) ApplicationFiles(ctx context.Context, applicationID, sinceID string, limit int) ([]*baas.File, error)
- func (s *FileStorage) Delete(ctx context.Context, id string) error
- func (s *FileStorage) File(ctx context.Context, id string) (*baas.File, error)
- func (s *FileStorage) FileByFileBlobID(ctx context.Context, fileBlobID string) (*baas.File, error)
- func (s *FileStorage) Store(ctx context.Context, n *baas.NewFile) (*baas.File, error)
- type TransformStorage
- type UsageStorage
- func (s *UsageStorage) ApplicationUsages(ctx context.Context, applicationID string, startDate, endDate time.Time) ([]*baas.Usage, error)
- func (s *UsageStorage) Store(ctx context.Context, n *baas.NewUsage) (*baas.Usage, error)
- func (s *UsageStorage) Update(ctx context.Context, u *baas.UpdateUsage) (*baas.Usage, error)
- func (s *UsageStorage) Usage(ctx context.Context, applicationID string, startDate, endDate time.Time) (*baas.Usage, error)
- func (s *UsageStorage) Usages(ctx context.Context, startDate, endDate time.Time) ([]*baas.TotalUsage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplicationStorage ¶
type ApplicationStorage struct {
DB *storm.DB
}
func (ApplicationStorage) Application ¶
func (s ApplicationStorage) Application(ctx context.Context, id string) (*baas.Application, error)
func (ApplicationStorage) Applications ¶
func (s ApplicationStorage) Applications(ctx context.Context, sinceID string, limit int) ([]*baas.Application, error)
func (ApplicationStorage) Delete ¶
func (s ApplicationStorage) Delete(ctx context.Context, id string) error
func (ApplicationStorage) Store ¶
func (s ApplicationStorage) Store(ctx context.Context, n *baas.NewApplication) (*baas.Application, error)
func (ApplicationStorage) Update ¶
func (s ApplicationStorage) Update(ctx context.Context, u *baas.UpdateApplication) (*baas.Application, error)
type BlockStorage ¶
type BlockStorage struct {
DB *storm.DB
}
func (BlockStorage) ApplicationUsers ¶
func (*BlockStorage) DeleteKey ¶
func (s *BlockStorage) DeleteKey(ctx context.Context, id, password string) error
func (*BlockStorage) GetAddress ¶
func (*BlockStorage) GetAddressByService ¶
func (s *BlockStorage) GetAddressByService(ctx context.Context, id, password string) (string, string, string, string, string, error)
called by internal
func (*BlockStorage) GetApplicationId ¶
return application id based on userId/email
func (*BlockStorage) GetKey ¶
func (s *BlockStorage) GetKey(ctx context.Context, id, password string) (string, string, string, string, error)
get private via email
func (*BlockStorage) Store ¶
func (s *BlockStorage) Store(ctx context.Context, n *baas.NewBAASUser) (*baas.BAASUser, error)
func (*BlockStorage) Update ¶
func (s *BlockStorage) Update(ctx context.Context, u *baas.UpdateBAASUser) (*baas.BAASUser, error)
user can update username and password, other like applicationid ,private key can't be changed
func (*BlockStorage) UpdatePassword ¶
func (s *BlockStorage) UpdatePassword(ctx context.Context, id, old, newpass string) error
type FileStorage ¶
type FileStorage struct {
DB *storm.DB
}
func (FileStorage) ApplicationFiles ¶
func (*FileStorage) FileByFileBlobID ¶
type TransformStorage ¶
type TransformStorage struct {
DB *storm.DB
}
func (*TransformStorage) Store ¶
func (s *TransformStorage) Store(ctx context.Context, n *baas.NewTransformation) (*baas.Transformation, error)
type UsageStorage ¶
type UsageStorage struct {
DB *storm.DB
}
func (*UsageStorage) ApplicationUsages ¶
func (*UsageStorage) Update ¶
func (s *UsageStorage) Update(ctx context.Context, u *baas.UpdateUsage) (*baas.Usage, error)
func (*UsageStorage) Usages ¶
func (s *UsageStorage) Usages(ctx context.Context, startDate, endDate time.Time) ([]*baas.TotalUsage, error)
Click to show internal directories.
Click to hide internal directories.