Documentation ¶
Index ¶
- Variables
- func ValidMp3File(header *multipart.FileHeader) (err error)
- type DatabaseService
- func (a DatabaseService) AudioFilesInfo(ctx context.Context, searchType, value string, page int) (info []api.AudioFileInfo, err error)
- func (a DatabaseService) Delete(ctx context.Context, id string) (err error)
- func (a DatabaseService) Get(ctx context.Context, id string) (result db.AudioInfo, err error)
- type UploadService
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFoundErr = errors.New("audio not found")
Functions ¶
func ValidMp3File ¶
func ValidMp3File(header *multipart.FileHeader) (err error)
Types ¶
type DatabaseService ¶
type DatabaseService struct {
Database db.MongodbService
}
TODO Change service into singleton
func (DatabaseService) AudioFilesInfo ¶
func (a DatabaseService) AudioFilesInfo(ctx context.Context, searchType, value string, page int) (info []api.AudioFileInfo, err error)
type UploadService ¶
type UploadService struct {
Db db.MongodbService
}
func (UploadService) Upload ¶
func (u UploadService) Upload(ctx context.Context, files []*multipart.FileHeader) error
Click to show internal directories.
Click to hide internal directories.