Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from mark4z/master
Browse files Browse the repository at this point in the history
pre & post filters
  • Loading branch information
mark4z authored Feb 6, 2021
2 parents c63f4eb + 49707be commit 31cbbdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 0 additions & 6 deletions pkg/api/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ package api

type ApiType int32

const (
REST_VALUE = "REST"
GRPC_VALUE = "GRPC"
DUBBO_VALUE = "DUBBO"
)

// Status is the components status
type Status int32

Expand Down
8 changes: 7 additions & 1 deletion pkg/api/config/api_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ type PluginsGroup struct {
Plugins []Plugin `json:"plugins" yaml:"plugins"`
}

//PluginsConfig defines the pre & post plugins
type PluginsConfig struct {
PrePlugins []*PluginsInUse `json:"pre" yaml:"pre"`
PostPlugins []*PluginsInUse `json:"post" yaml:"post"`
}

type PluginsInUse struct {
GroupNames []string `json:"groupNames" yaml:"groupNames"`
PluginNames []string `json:"pluginNames" yaml:"pluginNames"`
Expand All @@ -88,7 +94,7 @@ type Resource struct {
Timeout time.Duration `json:"timeout" yaml:"timeout"`
Description string `json:"description" yaml:"description"`
Filters []string `json:"filters" yaml:"filters"`
Plugins PluginsInUse `json:"plugins" yaml:"plugins"`
Plugins PluginsConfig `json:"plugins" yaml:"plugins"`
Methods []Method `json:"methods" yaml:"methods"`
Resources []Resource `json:"resources,omitempty" yaml:"resources,omitempty"`
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
Expand Down

0 comments on commit 31cbbdd

Please sign in to comment.