mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-09 21:48:50 -06:00
Rename List to ListAll
This commit is contained in:
@@ -52,7 +52,7 @@ func (g Service) ListSettingsBundles(c context.Context, req *proto.ListSettingsB
|
||||
|
||||
func listSettingsBundles(g Service, extension string) ([]*proto.SettingsBundle, error) {
|
||||
if len(extension) == 0 {
|
||||
return g.manager.List()
|
||||
return g.manager.ListAll()
|
||||
} else {
|
||||
return g.manager.ListByExtension(extension)
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ type RegisterFunc func(*config.Config) Manager
|
||||
type Manager interface {
|
||||
Read(extension string, key string) (*proto.SettingsBundle, error)
|
||||
Write(bundle *proto.SettingsBundle) (*proto.SettingsBundle, error)
|
||||
List() ([]*proto.SettingsBundle, error)
|
||||
ListAll() ([]*proto.SettingsBundle, error)
|
||||
ListByExtension(extension string) ([]*proto.SettingsBundle, error)
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ func New(cfg *config.Config) settings.Manager {
|
||||
return &s
|
||||
}
|
||||
|
||||
// List returns all the bundles in the mountPath folder
|
||||
func (s Store) List() ([]*proto.SettingsBundle, error) {
|
||||
// ListAll returns all the bundles in the mountPath folder
|
||||
func (s Store) ListAll() ([]*proto.SettingsBundle, error) {
|
||||
records := []*proto.SettingsBundle{}
|
||||
bundles, err := ioutil.ReadDir(s.mountPath)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user