Files

23 lines
585 B
Go

package model
type Transfer struct {
ID string `json:"id"`
FileName string `json:"fileName"`
Source string `json:"source"`
Destination string `json:"destination"`
Progress int `json:"progress"`
Speed string `json:"speed"`
Type string `json:"type"` // upload | download
Status string `json:"status"` // queued | transferring | completed | error
}
type TransferStore struct {
Transfers []Transfer
}
func NewTransferStore() *TransferStore {
return &TransferStore{}
}
func (s *TransferStore) All() []Transfer { return s.Transfers }