feat(app): update

This commit is contained in:
Yangtao
2025-11-19 14:24:13 +08:00
parent 1eac66d7fd
commit 0c34585649
329 changed files with 10760 additions and 281 deletions

View File

@ -0,0 +1,49 @@
package request
import (
"errors"
)
// 上传音乐
type UploadMusicRequest struct {
AccessToken string
MusicName string // 音乐名称
Singer string // 演唱者
Size string //
Long string //
TypeCode string //1=原唱 2=伴奏
MusicUrl string // 音乐Key audio/+uuid
PersistId string
AvInfo string
}
// 参数合法性检验
func (request *UploadMusicRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.MusicName) == 0 {
err = errors.New("MusicName不能为空")
return
}
if len(request.Singer) == 0 {
err = errors.New("Singer不能为空")
return
}
if len(request.TypeCode) == 0 {
err = errors.New("TypeCode不能为空")
return
}
if len(request.MusicUrl) == 0 {
err = errors.New("MusicUrl不能为空")
return
}
return
}