Add secrets to host catalogs API struct (#1512)

This also changes the address from a plugin from a scalar value to other
fields, starting with an IP address array.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-09-08 12:41:57 -04:00
1 parent 361d568550
commit 71cba858e3
8 files changed
+144 -111

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ type HostCatalog struct {
Version uint32 `json:"version,omitempty"`
Type string `json:"type,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
Secrets map[string]interface{} `json:"secrets,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
AuthorizedCollectionActions map[string][]string `json:"authorized_collection_actions,omitempty"`
+6
View File
@@ -122,3 +122,9 @@ func DefaultName() Option {
o.postMap["name"] = nil
}
}
func WithSecrets(inSecrets map[string]interface{}) Option {
return func(o *options) {
o.postMap["secrets"] = inSecrets
}
}