diff --git a/pkg/publicshare/manager/json/json.go b/pkg/publicshare/manager/json/json.go index 17ee926c75..ddeda09cab 100644 --- a/pkg/publicshare/manager/json/json.go +++ b/pkg/publicshare/manager/json/json.go @@ -118,6 +118,7 @@ func NewCS3(c map[string]interface{}) (publicshare.Manager, error) { return New(conf.GatewayAddr, conf.SharePasswordHashCost, conf.JanitorRunInterval, conf.EnableExpiredSharesCleanup, p) } +// New returns a new public share manager instance func New(gwAddr string, pwHashCost, janitorRunInterval int, enableCleanup bool, p persistence.Persistence) (publicshare.Manager, error) { m := &manager{ gatewayAddr: gwAddr, diff --git a/pkg/publicshare/manager/json/persistence/persistence.go b/pkg/publicshare/manager/json/persistence/persistence.go index 356fe41640..543c1e6bec 100644 --- a/pkg/publicshare/manager/json/persistence/persistence.go +++ b/pkg/publicshare/manager/json/persistence/persistence.go @@ -20,8 +20,10 @@ package persistence import "context" +// PublicShares is a map indexing publicshares by their ids type PublicShares map[string]interface{} +// Persistence defines the interface for the json publicshare manager persistence layers type Persistence interface { Init(context.Context) error Read(context.Context) (PublicShares, error)