gpaste/files/filestore.go
Torjus Håkestad faa3cc102f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Create files package
2022-01-20 03:40:32 +01:00

23 lines
407 B
Go

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