file_scanner.go 453 B

123456789101112131415161718192021222324
  1. package packager
  2. import (
  3. "os"
  4. "path"
  5. "github.com/langgenius/dify-plugin-daemon/internal/types/entities/plugin_entities"
  6. )
  7. func (p *Packager) ScanProvider() error {
  8. return nil
  9. }
  10. func (p *Packager) fetchManifest() (*plugin_entities.PluginDeclaration, error) {
  11. file_path := path.Join(p.wp, p.manifest)
  12. file, err := os.ReadFile(file_path)
  13. if err != nil {
  14. return nil, err
  15. }
  16. return plugin_entities.UnmarshalPluginDeclarationFromYaml(file)
  17. }