b7fadd9676
This doesn't completely fix #116, but it makes setting up a cron job to do cleanup much more pleasant.
24 lines
387 B
Go
24 lines
387 B
Go
package backends
|
|
|
|
import (
|
|
"errors"
|
|
"time"
|
|
)
|
|
|
|
type MetaBackend interface {
|
|
Get(key string) (Metadata, error)
|
|
Put(key string, metadata *Metadata) error
|
|
}
|
|
|
|
type Metadata struct {
|
|
DeleteKey string
|
|
Sha256sum string
|
|
Mimetype string
|
|
Size int64
|
|
Expiry time.Time
|
|
ArchiveFiles []string
|
|
ShortURL string
|
|
}
|
|
|
|
var BadMetadata = errors.New("Corrupted metadata.")
|