|
|
|
@ -16,56 +16,56 @@ package apistruct
|
|
|
|
|
|
|
|
|
|
type PictureBaseInfo struct {
|
|
|
|
|
UUID string `mapstructure:"uuid"`
|
|
|
|
|
Type string `mapstructure:"type"`
|
|
|
|
|
Type string `mapstructure:"type" validate:"required"`
|
|
|
|
|
Size int64 `mapstructure:"size"`
|
|
|
|
|
Width int32 `mapstructure:"width"`
|
|
|
|
|
Height int32 `mapstructure:"height"`
|
|
|
|
|
Url string `mapstructure:"url"`
|
|
|
|
|
Width int32 `mapstructure:"width" validate:"required"`
|
|
|
|
|
Height int32 `mapstructure:"height" validate:"required"`
|
|
|
|
|
Url string `mapstructure:"url" validate:"required"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type PictureElem struct {
|
|
|
|
|
SourcePath string `mapstructure:"sourcePath"`
|
|
|
|
|
SourcePicture PictureBaseInfo `mapstructure:"sourcePicture"`
|
|
|
|
|
BigPicture PictureBaseInfo `mapstructure:"bigPicture"`
|
|
|
|
|
SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"`
|
|
|
|
|
SourcePicture PictureBaseInfo `mapstructure:"sourcePicture" validate:"required"`
|
|
|
|
|
BigPicture PictureBaseInfo `mapstructure:"bigPicture" validate:"required"`
|
|
|
|
|
SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture" validate:"required"`
|
|
|
|
|
}
|
|
|
|
|
type SoundElem struct {
|
|
|
|
|
UUID string `mapstructure:"uuid"`
|
|
|
|
|
SoundPath string `mapstructure:"soundPath"`
|
|
|
|
|
SourceURL string `mapstructure:"sourceUrl"`
|
|
|
|
|
SourceURL string `mapstructure:"sourceUrl" validate:"required"`
|
|
|
|
|
DataSize int64 `mapstructure:"dataSize"`
|
|
|
|
|
Duration int64 `mapstructure:"duration"`
|
|
|
|
|
Duration int64 `mapstructure:"duration" validate:"required,min=1"`
|
|
|
|
|
}
|
|
|
|
|
type VideoElem struct {
|
|
|
|
|
VideoPath string `mapstructure:"videoPath"`
|
|
|
|
|
VideoPath string `mapstructure:"videoPath" `
|
|
|
|
|
VideoUUID string `mapstructure:"videoUUID"`
|
|
|
|
|
VideoURL string `mapstructure:"videoUrl"`
|
|
|
|
|
VideoType string `mapstructure:"videoType"`
|
|
|
|
|
VideoSize int64 `mapstructure:"videoSize"`
|
|
|
|
|
Duration int64 `mapstructure:"duration"`
|
|
|
|
|
VideoURL string `mapstructure:"videoUrl" validate:"required"`
|
|
|
|
|
VideoType string `mapstructure:"videoType" validate:"required"`
|
|
|
|
|
VideoSize int64 `mapstructure:"videoSize" validate:"required"`
|
|
|
|
|
Duration int64 `mapstructure:"duration" validate:"required"`
|
|
|
|
|
SnapshotPath string `mapstructure:"snapshotPath"`
|
|
|
|
|
SnapshotUUID string `mapstructure:"snapshotUUID"`
|
|
|
|
|
SnapshotSize int64 `mapstructure:"snapshotSize"`
|
|
|
|
|
SnapshotURL string `mapstructure:"snapshotUrl"`
|
|
|
|
|
SnapshotWidth int32 `mapstructure:"snapshotWidth"`
|
|
|
|
|
SnapshotHeight int32 `mapstructure:"snapshotHeight"`
|
|
|
|
|
SnapshotURL string `mapstructure:"snapshotUrl" validate:"required"`
|
|
|
|
|
SnapshotWidth int32 `mapstructure:"snapshotWidth" validate:"required"`
|
|
|
|
|
SnapshotHeight int32 `mapstructure:"snapshotHeight"validate:"required"`
|
|
|
|
|
}
|
|
|
|
|
type FileElem struct {
|
|
|
|
|
FilePath string `mapstructure:"filePath"`
|
|
|
|
|
FilePath string `mapstructure:"filePath" `
|
|
|
|
|
UUID string `mapstructure:"uuid"`
|
|
|
|
|
SourceURL string `mapstructure:"sourceUrl"`
|
|
|
|
|
FileName string `mapstructure:"fileName"`
|
|
|
|
|
FileSize int64 `mapstructure:"fileSize"`
|
|
|
|
|
SourceURL string `mapstructure:"sourceUrl" validate:"required"`
|
|
|
|
|
FileName string `mapstructure:"fileName" validate:"required"`
|
|
|
|
|
FileSize int64 `mapstructure:"fileSize" validate:"required"`
|
|
|
|
|
}
|
|
|
|
|
type AtElem struct {
|
|
|
|
|
Text string `mapstructure:"text"`
|
|
|
|
|
AtUserList []string `mapstructure:"atUserList"`
|
|
|
|
|
AtUserList []string `mapstructure:"atUserList" validate:"required,max=1000"`
|
|
|
|
|
IsAtSelf bool `mapstructure:"isAtSelf"`
|
|
|
|
|
}
|
|
|
|
|
type LocationElem struct {
|
|
|
|
|
Description string `mapstructure:"description"`
|
|
|
|
|
Longitude float64 `mapstructure:"longitude"`
|
|
|
|
|
Latitude float64 `mapstructure:"latitude"`
|
|
|
|
|
Description string `mapstructure:"description" `
|
|
|
|
|
Longitude float64 `mapstructure:"longitude" validate:"required"`
|
|
|
|
|
Latitude float64 `mapstructure:"latitude" validate:"required"`
|
|
|
|
|
}
|
|
|
|
|
type CustomElem struct {
|
|
|
|
|
Data string `mapstructure:"data" validate:"required"`
|
|
|
|
|