Skip to content

Commit 09ba79d

Browse files
committed
Add generic resource fetcher
1 parent ce4648f commit 09ba79d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

resource/types.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
package resource
22

3-
import "github.com/StratoAPI/Interface/plugins"
3+
import (
4+
"github.com/StratoAPI/Interface/filter"
5+
"github.com/StratoAPI/Interface/plugins"
6+
)
47

58
type Processor interface {
69
// Get the store of a resource
710
GetStore(resource string) *plugins.Storage
811

912
// Get a list of all resources
10-
GetResources() []string
13+
GetResourceList() []string
14+
15+
// Retrieve resources.
16+
GetResources(resource string, filters []filter.ProcessedFilter) ([]map[string]interface{}, error)
1117
}

0 commit comments

Comments
 (0)