portal/interfaces/file.go

22 lines
350 B
Go
Raw Normal View History

2024-01-25 21:30:35 +00:00
package interfaces
import (
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
"git.lumeweb.com/LumeWeb/portal/db/models"
"io"
"time"
)
type File interface {
Record() (*models.Upload, error)
Hash() []byte
HashString() string
Name() string
Modtime() time.Time
2024-01-26 00:17:48 +00:00
Mime() string
2024-01-25 21:30:35 +00:00
Size() uint64
CID() *encoding.CID
2024-01-25 21:32:37 +00:00
Exists() bool
2024-01-25 21:30:35 +00:00
io.ReadSeekCloser
}