From c2d1aff0773e3376600a264dd8ba559b5ce6ecb1 Mon Sep 17 00:00:00 2001 From: Dave Cunningham Date: Wed, 16 Mar 2016 18:36:45 -0400 Subject: [PATCH] Add chart representation to types.go --- pkg/common/types.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkg/common/types.go b/pkg/common/types.go index 67ef834a6..b7dbe6fc0 100644 --- a/pkg/common/types.go +++ b/pkg/common/types.go @@ -97,6 +97,28 @@ type Manifest struct { Layout *Layout `json:"layout,omitempty"` } +// Expander controls how template/ is evaluated. +type Expander struct { + // Currently just Expandybird or GoTemplate + Name string `json:"name"` + // During evaluation, which file to start from. + Entrypoint string `json:"entry_point"` +} + +// ChartFile is a file in a chart that is not chart.yaml. +type ChartFile struct { + Path string `json:"path"` // Path from the root of the chart. + Content string `json:"content"` // Base64 encoded file content. +} + +// Chart is our internal representation of the chart.yaml (in structured form) + all supporting files. +type Chart struct { + Name string `json:"name"` + Expander *Expander `json:"expander"` + Schema interface{} `json:"schema"` + Files []*ChartFile `json:"files"` +} + // Template describes a set of resources to be deployed. // Manager expands a Template into a Configuration, which // describes the set in a form that can be instantiated.