gapi: Bring back puppet and langpuppet

This reverts commit e767655ede.

In addition, it applies required changes to function with the new CLI backend.
This commit is contained in:
Felix Frank
2024-03-08 11:42:10 +00:00
committed by James Shubin
parent 22873b3c3f
commit 29ec867ac7
17 changed files with 1465 additions and 14 deletions

View File

@@ -60,7 +60,10 @@ it is not specified, but others cannot, and some might poorly infer if the
struct name is ambiguous.
If you'd like your resource to be accessible by the `YAML` graph API (GAPI),
then you'll need to include the appropriate YAML fields as shown below.
then you'll need to include the appropriate YAML fields as shown below. This is
used by the `puppet` compiler as well, so make sure you include these struct
tags if you want existing `puppet` code to be able to run using the `mgmt`
engine.
#### Example
@@ -620,7 +623,7 @@ func init() { // special golang method that runs once
To support YAML unmarshalling for your resource, you must implement an
additional method. It is recommended if you want to use your resource with the
`yaml` compiler.
`puppet` compiler.
```golang
UnmarshalYAML(unmarshal func(interface{}) error) error // optional