Add object metadata

- support for max downloads
- support for expiring downloads
This commit is contained in:
Remco
2017-03-28 16:12:31 +02:00
parent 45bafbe48f
commit 989debecb5
3 changed files with 163 additions and 10 deletions

View File

@ -35,6 +35,7 @@ import (
"os"
"os/signal"
"strings"
"sync"
"syscall"
"time"
@ -177,6 +178,8 @@ type Server struct {
profilerEnabled bool
locks map[string]*sync.Mutex
storage Storage
forceHTTPs bool
@ -198,7 +201,9 @@ type Server struct {
}
func New(options ...OptionFn) (*Server, error) {
s := &Server{}
s := &Server{
locks: map[string]*sync.Mutex{},
}
for _, optionFn := range options {
optionFn(s)