mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-26 15:02:52 -05:00
23 lines
603 B
Go
23 lines
603 B
Go
package settings
|
|
|
|
import (
|
|
"github.com/owncloud/ocis-settings/pkg/config"
|
|
"github.com/owncloud/ocis-settings/pkg/proto/v0"
|
|
)
|
|
|
|
var (
|
|
// Registry uses the strategy pattern as a registry
|
|
Registry = map[string]RegisterFunc{}
|
|
)
|
|
|
|
// RegisterFunc stores store constructors
|
|
type RegisterFunc func(*config.Config) Manager
|
|
|
|
// Manager
|
|
type Manager interface {
|
|
Read(extension string, key string) (*proto.SettingsBundle, error)
|
|
Write(bundle *proto.SettingsBundle) (*proto.SettingsBundle, error)
|
|
ListAll() ([]*proto.SettingsBundle, error)
|
|
ListByExtension(extension string) ([]*proto.SettingsBundle, error)
|
|
}
|