PLT-7622 Improvements to server handling of webapp plugins (#7445)
* Improvements to server handling of webapp plugins * Fix newline * Update manifest function names
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2a6cd44f23
Коммит
2628022275
@@ -12,8 +12,9 @@ import (
|
||||
|
||||
type Manifest struct {
|
||||
Id string `json:"id" yaml:"id"`
|
||||
Name string `json:"name" yaml:"name"`
|
||||
Description string `json:"description" yaml:"description"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||
Version string `json:"version" yaml:"version"`
|
||||
Backend *ManifestBackend `json:"backend,omitempty" yaml:"backend,omitempty"`
|
||||
Webapp *ManifestWebapp `json:"webapp,omitempty" yaml:"webapp,omitempty"`
|
||||
}
|
||||
@@ -66,6 +67,19 @@ func ManifestListFromJson(data io.Reader) []*Manifest {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Manifest) HasClient() bool {
|
||||
return m.Webapp != nil
|
||||
}
|
||||
|
||||
func (m *Manifest) ClientManifest() *Manifest {
|
||||
cm := new(Manifest)
|
||||
*cm = *m
|
||||
cm.Name = ""
|
||||
cm.Description = ""
|
||||
cm.Backend = nil
|
||||
return cm
|
||||
}
|
||||
|
||||
// FindManifest will find and parse the manifest in a given directory.
|
||||
//
|
||||
// In all cases other than a does-not-exist error, path is set to the path of the manifest file that was
|
||||
|
||||
Ссылка в новой задаче
Block a user