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:
1 parent
361d568550
commit
71cba858e3
8 files changed
+144
-111
No files matched your search
@@ -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"`
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user