migrate to WebSocket for frontend and backend communication
This commit is contained in:
@ -14,7 +14,7 @@ type File struct {
|
||||
ID uuid.UUID `gorm:"primaryKey;not null;unique"`
|
||||
OwnerID uuid.UUID `gorm:"not null"`
|
||||
Name string `gorm:"not null"`
|
||||
Size int64 `gorm:"not null"`
|
||||
TotalChunk int64 `gorm:"not null"`
|
||||
Downloaded int64 `gorm:"not null;default=0"`
|
||||
Size uint64 `gorm:"not null"`
|
||||
TotalChunk uint64 `gorm:"not null"`
|
||||
Downloaded uint64 `gorm:"not null;default=0"`
|
||||
}
|
||||
|
@ -22,23 +22,23 @@ type User struct {
|
||||
|
||||
type FileInfo struct {
|
||||
Name string `json:"name"`
|
||||
Size int64 `json:"size"`
|
||||
Chunk int64 `json:"chunk"`
|
||||
Size uint64 `json:"size"`
|
||||
Chunk uint64 `json:"chunk"`
|
||||
}
|
||||
|
||||
type FileData struct {
|
||||
ID string
|
||||
Name string
|
||||
Size string
|
||||
Downloaded int64
|
||||
Downloaded uint64
|
||||
}
|
||||
|
||||
type FileWithDetail struct {
|
||||
ID uuid.UUID
|
||||
OwnerID uuid.UUID
|
||||
Name string
|
||||
Size int64
|
||||
Downloaded int64
|
||||
Size uint64
|
||||
Downloaded uint64
|
||||
Chunk map[string]bool
|
||||
Done bool
|
||||
}
|
||||
|
Reference in New Issue
Block a user