gpaste/filestore.go
Torjus Håkestad de279c6fe3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add test for delete
2022-01-15 21:31:32 +01:00

22 lines
268 B
Go

package gpaste
import (
"io"
"time"
)
type File struct {
ID 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)
}