Skip to content

Commit

Permalink
Add config registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Oct 29, 2018
1 parent c08e827 commit ac78989
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ type Middleware interface {
Response(resource string, headers map[string][]string, data []map[string]interface{}, config interface{}) ([]map[string]interface{}, *middleware.RequestResponse)
}

type Config interface {
// Create the config struct.
CreateStructure() interface{}

// Set the config.
Set(config interface{})
}

type Registry interface {
// Register a facade
RegisterFacade(name string, facade Facade) error
Expand All @@ -98,6 +106,9 @@ type Registry interface {
// Register a middleware
RegisterMiddleware(name string, filter Middleware) error

// Register a config
RegisterConfig(name string, config Config) error

// Associate a filter with a store
AssociateFilter(filter string, storage string) error
}

0 comments on commit ac78989

Please sign in to comment.