package provided import ( "github.com/caos/orbos/pkg/tree" "github.com/pkg/errors" ) type DesiredV0 struct { Common *tree.Common `yaml:",inline"` Spec Spec } type Spec struct { Verbose bool Namespace string URL string Port string Users []string } func parseDesiredV0(desiredTree *tree.Tree) (*DesiredV0, error) { desiredKind := &DesiredV0{ Common: desiredTree.Common, Spec: Spec{}, } if err := desiredTree.Original.Decode(desiredKind); err != nil { return nil, errors.Wrap(err, "parsing desired state failed") } return desiredKind, nil }