Plugins: Unexport PluginDir field from PluginDTO (#59190)

* unexport pluginDir from dto

* more err checks

* tidy

* fix tests

* fix dboard file tests

* fix import

* fix tests

* apply PR feedback

* combine interfaces

* fix logs and clean up test

* filepath clean

* use fs.File

* rm explicit type
This commit is contained in:
Will Browne
2022-12-02 12:46:55 +00:00
committed by GitHub
parent 6d1bcd9f40
commit 76233f9997
15 changed files with 223 additions and 286 deletions

View File

@@ -26,12 +26,11 @@ func (e NotFoundError) Error() string {
}
type DuplicateError struct {
PluginID string
ExistingPluginDir string
PluginID string
}
func (e DuplicateError) Error() string {
return fmt.Sprintf("plugin with ID '%s' already exists in '%s'", e.PluginID, e.ExistingPluginDir)
return fmt.Sprintf("plugin with ID '%s' already exists", e.PluginID)
}
func (e DuplicateError) Is(err error) bool {
@@ -195,13 +194,10 @@ func (s SignatureType) IsValid() bool {
return false
}
type PluginFiles map[string]struct{}
type Signature struct {
Status SignatureStatus
Type SignatureType
SigningOrg string
Files PluginFiles
}
type PluginMetaDTO struct {