gpaste/filestore.go

23 lines
317 B
Go
Raw Normal View History

2022-01-15 18:07:33 +00:00
package gpaste
import (
"io"
"time"
)
type File struct {
2022-01-16 20:29:42 +00:00
ID string
OriginalFilename string
Body io.ReadCloser
2022-01-15 18:07:33 +00:00
MaxViews uint
ExpiresOn time.Time
}
type FileStore interface {
Store(f *File) error
Get(id string) (*File, error)
Delete(id string) error
List() ([]string, error)
}