Skip to content

Commit

Permalink
Add generic resource fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Oct 21, 2018
1 parent ce4648f commit 09ba79d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions resource/types.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
package resource

import "github.com/StratoAPI/Interface/plugins"
import (
"github.com/StratoAPI/Interface/filter"
"github.com/StratoAPI/Interface/plugins"
)

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

// Get a list of all resources
GetResources() []string
GetResourceList() []string

// Retrieve resources.
GetResources(resource string, filters []filter.ProcessedFilter) ([]map[string]interface{}, error)
}

0 comments on commit 09ba79d

Please sign in to comment.