Plugins: Replace CDN class with FS CDN type (#113968)
replace cdn class with fs type
This commit is contained in:
@@ -433,6 +433,7 @@ func (f *FakeActionSetRegistry) RegisterActionSets(_ context.Context, _ string,
|
||||
type FakePluginFS struct {
|
||||
OpenFunc func(name string) (fs.File, error)
|
||||
RemoveFunc func() error
|
||||
TypeFunc func() plugins.FSType
|
||||
RelFunc func(string) (string, error)
|
||||
|
||||
base string
|
||||
@@ -444,10 +445,6 @@ func NewFakePluginFS(base string) *FakePluginFS {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *FakePluginFS) Type() string {
|
||||
return "fake"
|
||||
}
|
||||
|
||||
func (f *FakePluginFS) Open(name string) (fs.File, error) {
|
||||
if f.OpenFunc != nil {
|
||||
return f.OpenFunc(name)
|
||||
@@ -462,6 +459,13 @@ func (f *FakePluginFS) Rel(_ string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (f *FakePluginFS) Type() plugins.FSType {
|
||||
if f.TypeFunc != nil {
|
||||
return f.TypeFunc()
|
||||
}
|
||||
return "fake"
|
||||
}
|
||||
|
||||
func (f *FakePluginFS) Base() string {
|
||||
return f.base
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user