gpaste/filestore.go
Torjus Håkestad 1cb169318c
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add fs filestore
2022-01-19 01:03:24 +01:00

23 lines
408 B
Go

package gpaste
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)
}