Skip to content
Permalink
Browse files
clean
  • Loading branch information
PhilYue committed Dec 5, 2021
1 parent bf71bda commit 947e94426012bccd75d082f3b0bcdf4c82b5f656
Showing 1 changed file with 17 additions and 17 deletions.
@@ -70,26 +70,12 @@ func init() {
}

const (
NONE DescriptorSourceStrategy = iota // dss enum 0
NONE DescriptorSourceStrategy = iota // dss enum 0
AUTO
LOCAL
REMOTE
)

func (c DescriptorSourceStrategy) String() string {
switch c {
case NONE:
return "NONE"
case AUTO:
return "AUTO"
case LOCAL:
return "LOCAL"
case REMOTE:
return "REMOTE"
}
return "N/A"
}

type (
DescriptorSourceStrategy int

@@ -111,8 +97,8 @@ type (
// Config describe the config of AccessFilter
Config struct {
DescriptorSourceStrategy DescriptorSourceStrategy `yaml:"descriptor_source_strategy" json:"descriptor_source_strategy"`
Path string `yaml:"path" json:"path"`
Rules []*Rule `yaml:"rules" json:"rules"` //nolint
Path string `yaml:"path" json:"path"`
Rules []*Rule `yaml:"rules" json:"rules"` //nolint
}

Rule struct {
@@ -125,6 +111,20 @@ type (
}
)

func (c DescriptorSourceStrategy) String() string {
switch c {
case NONE:
return "NONE"
case AUTO:
return "AUTO"
case LOCAL:
return "LOCAL"
case REMOTE:
return "REMOTE"
}
return "N/A"
}

func (p *Plugin) Kind() string {
return Kind
}

0 comments on commit 947e944

Please sign in to comment.