diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-09-15 08:51:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 08:51:46 -0400 |
commit | 2628022275ef64fde95545abe4634b4bd7177844 (patch) | |
tree | 25d451b81d720f44aa09b20389be7fbb75b7864e /model/manifest.go | |
parent | 2a6cd44f23e1b3207debaa73801f0c63a2c81126 (diff) | |
download | chat-2628022275ef64fde95545abe4634b4bd7177844.tar.gz chat-2628022275ef64fde95545abe4634b4bd7177844.tar.bz2 chat-2628022275ef64fde95545abe4634b4bd7177844.zip |
PLT-7622 Improvements to server handling of webapp plugins (#7445)
* Improvements to server handling of webapp plugins
* Fix newline
* Update manifest function names
Diffstat (limited to 'model/manifest.go')
-rw-r--r-- | model/manifest.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/model/manifest.go b/model/manifest.go index e61ccc8ad..b466660af 100644 --- a/model/manifest.go +++ b/model/manifest.go @@ -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 |