gpaste/files/filestore.go
Torjus Håkestad e7b0c5fa33
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add aggressive linting
2022-01-24 20:25:52 +01:00

25 lines
439 B
Go

package files
import (
"io"
"time"
)
type File struct {
ID string `json:"id"`
OriginalFilename string `json:"originalFilename"`
MaxViews uint `json:"maxViews"`
ExpiresOn time.Time `json:"expiresOn"`
Body io.ReadCloser
FileSize int64 `json:"fileSize"`
}
type FileStore interface {
Store(f *File) error
Get(id string) (*File, error)
Delete(id string) error
List() ([]string, error)
}