engine: resources: Add missing struct tags

These are needed for send/recv.
This commit is contained in:
James Shubin
2019-03-09 16:01:25 -05:00
parent 7cb79bec49
commit 4badeafb98
4 changed files with 17 additions and 17 deletions

View File

@@ -595,11 +595,11 @@ func (obj *ExecRes) UIDs() []engine.ResUID {
// ExecSends is the struct of data which is sent after a successful Apply.
type ExecSends struct {
// Output is the combined stdout and stderr of the command.
Output *string
Output *string `lang:"output"`
// Stdout is the stdout of the command.
Stdout *string
Stdout *string `lang:"stdout"`
// Stderr is the stderr of the command.
Stderr *string
Stderr *string `lang:"stderr"`
}
// Sends represents the default struct of values we can send using Send/Recv.

View File

@@ -57,26 +57,26 @@ type FileRes struct {
// Path, which defaults to the name if not specified, represents the
// destination path for the file or directory being managed. It must be
// an absolute path, and as a result must start with a slash.
Path string `yaml:"path"`
Dirname string `yaml:"dirname"` // override the path dirname
Basename string `yaml:"basename"` // override the path basename
Path string `lang:"path" yaml:"path"`
Dirname string `lang:"dirname" yaml:"dirname"` // override the path dirname
Basename string `lang:"basename" yaml:"basename"` // override the path basename
// Content specifies the file contents to use. If this is nil, they are
// left undefined. It cannot be combined with Source.
Content *string `yaml:"content"`
Content *string `lang:"content" yaml:"content"`
// Source specifies the source contents for the file resource. It cannot
// be combined with the Content parameter.
Source string `yaml:"source"`
Source string `lang:"source" yaml:"source"`
// State specifies the desired state of the file. It can be either
// `exists` or `absent`. If you do not specify this, it will be
// undefined, and determined based on the other parameters.
State string `yaml:"state"`
State string `lang:"state" yaml:"state"`
Owner string `yaml:"owner"`
Group string `yaml:"group"`
Mode string `yaml:"mode"`
Recurse bool `yaml:"recurse"`
Force bool `yaml:"force"`
Owner string `lang:"owner" yaml:"owner"`
Group string `lang:"group" yaml:"group"`
Mode string `lang:"mode" yaml:"mode"`
Recurse bool `lang:"recurse" yaml:"recurse"`
Force bool `lang:"force" yaml:"force"`
sha256sum string
recWatcher *recwatch.RecWatcher

View File

@@ -344,7 +344,7 @@ func (obj *PasswordRes) UIDs() []engine.ResUID {
// PasswordSends is the struct of data which is sent after a successful Apply.
type PasswordSends struct {
// Password is the generated password being sent.
Password *string
Password *string `lang:"password"`
// Hashing is the algorithm used for this password. Empty is plain text.
Hashing string // TODO: implement me
}

View File

@@ -401,8 +401,8 @@ func (obj *TestRes) GroupCmp(r engine.GroupableRes) error {
// TestSends is the struct of data which is sent after a successful Apply.
type TestSends struct {
// Hello is some value being sent.
Hello *string
Answer int // some other value being sent
Hello *string `lang:"hello"`
Answer int `lang:"answer"` // some other value being sent
}
// Sends represents the default struct of values we can send using Send/Recv.