Skip to content

Commit 5a9fd3f

Browse files
authored
fleetpkg.go - add policy_templates_behavior to manifest (#20)
Support policy_templates_behavior found in package manifest.yml files. Relates elastic/package-spec PR 825
1 parent a12c69b commit 5a9fd3f

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

fleetpkg.go

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -103,26 +103,27 @@ func (f FieldsFile) Path() string {
103103
}
104104

105105
type Manifest struct {
106-
Name string `json:"name,omitempty" yaml:"name,omitempty"`
107-
Title string `json:"title,omitempty" yaml:"title,omitempty"`
108-
Version string `json:"version,omitempty" yaml:"version,omitempty"`
109-
Release string `json:"release,omitempty" yaml:"release,omitempty"`
110-
Description string `json:"description,omitempty" yaml:"description,omitempty"`
111-
Type string `json:"type,omitempty" yaml:"type,omitempty"`
112-
Icons []Icons `json:"icons,omitempty" yaml:"icons,omitempty"`
113-
FormatVersion string `json:"format_version,omitempty" yaml:"format_version,omitempty"`
114-
License string `json:"license,omitempty" yaml:"license,omitempty"`
115-
Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"`
116-
Conditions Conditions `json:"conditions,omitempty" yaml:"conditions,omitempty"`
117-
Screenshots []Screenshots `json:"screenshots,omitempty" yaml:"screenshots,omitempty"`
118-
Source Source `json:"source,omitempty" yaml:"source,omitempty"`
119-
Vars []Var `json:"vars,omitempty" yaml:"vars,omitempty"`
120-
PolicyTemplates []PolicyTemplate `json:"policy_templates,omitempty" yaml:"policy_templates,omitempty"`
121-
Owner Owner `json:"owner,omitempty" yaml:"owner,omitempty"`
122-
Elasticsearch *ElasticsearchRequirements `json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"`
123-
Agent *AgentRequirements `json:"agent,omitempty" yaml:"agent,omitempty"`
124-
DeploymentModes *DeploymentModes `json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"`
125-
Discovery *Discovery `json:"discovery,omitempty" yaml:"discovery,omitempty"`
106+
Name string `json:"name,omitempty" yaml:"name,omitempty"`
107+
Title string `json:"title,omitempty" yaml:"title,omitempty"`
108+
Version string `json:"version,omitempty" yaml:"version,omitempty"`
109+
Release string `json:"release,omitempty" yaml:"release,omitempty"`
110+
Description string `json:"description,omitempty" yaml:"description,omitempty"`
111+
Type string `json:"type,omitempty" yaml:"type,omitempty"`
112+
Icons []Icons `json:"icons,omitempty" yaml:"icons,omitempty"`
113+
FormatVersion string `json:"format_version,omitempty" yaml:"format_version,omitempty"`
114+
License string `json:"license,omitempty" yaml:"license,omitempty"`
115+
Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"`
116+
Conditions Conditions `json:"conditions,omitempty" yaml:"conditions,omitempty"`
117+
Screenshots []Screenshots `json:"screenshots,omitempty" yaml:"screenshots,omitempty"`
118+
Source Source `json:"source,omitempty" yaml:"source,omitempty"`
119+
Vars []Var `json:"vars,omitempty" yaml:"vars,omitempty"`
120+
PolicyTemplates []PolicyTemplate `json:"policy_templates,omitempty" yaml:"policy_templates,omitempty"`
121+
PolicyTemplatesBehavior string `json:"policy_templates_behavior,omitempty" yaml:"policy_templates_behavior,omitempty"` // Expected behavior when there are more than one policy template defined.
122+
Owner Owner `json:"owner,omitempty" yaml:"owner,omitempty"`
123+
Elasticsearch *ElasticsearchRequirements `json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"`
124+
Agent *AgentRequirements `json:"agent,omitempty" yaml:"agent,omitempty"`
125+
DeploymentModes *DeploymentModes `json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"`
126+
Discovery *Discovery `json:"discovery,omitempty" yaml:"discovery,omitempty"`
126127

127128
sourceFile string
128129
}

0 commit comments

Comments
 (0)