gpaste/filestore.go
Torjus Håkestad 786ae6ad94
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Handle multipart form files
2022-01-16 21:29:42 +01:00

23 lines
317 B
Go

package gpaste
import (
"io"
"time"
)
type File struct {
ID string
OriginalFilename string
Body io.ReadCloser
MaxViews uint
ExpiresOn time.Time
}
type FileStore interface {
Store(f *File) error
Get(id string) (*File, error)
Delete(id string) error
List() ([]string, error)
}