fix: do not require remoteOrgID for remote connection creation (#451)

This commit is contained in:
Dane Strandboge
2022-10-28 11:16:53 -05:00
committed by GitHub
parent 121864a550
commit 3285a03e9e
52 changed files with 2942 additions and 587 deletions

View File

@ -15,7 +15,7 @@ import (
"fmt"
)
// ResourceEnumCloud the model 'ResourceEnumCloud'
// ResourceEnumCloud The type of resource. In a `permission`, applies the permission to all resources of this type.
type ResourceEnumCloud string
// List of ResourceEnumCloud
@ -36,13 +36,14 @@ const (
RESOURCEENUMCLOUD_NOTIFICATION_ENDPOINTS ResourceEnumCloud = "notificationEndpoints"
RESOURCEENUMCLOUD_CHECKS ResourceEnumCloud = "checks"
RESOURCEENUMCLOUD_DBRP ResourceEnumCloud = "dbrp"
RESOURCEENUMCLOUD_FLOWS ResourceEnumCloud = "flows"
RESOURCEENUMCLOUD_ANNOTATIONS ResourceEnumCloud = "annotations"
RESOURCEENUMCLOUD_FLOWS ResourceEnumCloud = "flows"
RESOURCEENUMCLOUD_FUNCTIONS ResourceEnumCloud = "functions"
RESOURCEENUMCLOUD_SUBSCRIPTIONS ResourceEnumCloud = "subscriptions"
)
func ResourceEnumCloudValues() []ResourceEnumCloud {
return []ResourceEnumCloud{"authorizations", "buckets", "dashboards", "orgs", "tasks", "telegrafs", "users", "variables", "secrets", "labels", "views", "documents", "notificationRules", "notificationEndpoints", "checks", "dbrp", "flows", "annotations", "functions"}
return []ResourceEnumCloud{"authorizations", "buckets", "dashboards", "orgs", "tasks", "telegrafs", "users", "variables", "secrets", "labels", "views", "documents", "notificationRules", "notificationEndpoints", "checks", "dbrp", "annotations", "flows", "functions", "subscriptions"}
}
func (v *ResourceEnumCloud) UnmarshalJSON(src []byte) error {
@ -52,7 +53,7 @@ func (v *ResourceEnumCloud) UnmarshalJSON(src []byte) error {
return err
}
enumTypeValue := ResourceEnumCloud(value)
for _, existing := range []ResourceEnumCloud{"authorizations", "buckets", "dashboards", "orgs", "tasks", "telegrafs", "users", "variables", "secrets", "labels", "views", "documents", "notificationRules", "notificationEndpoints", "checks", "dbrp", "flows", "annotations", "functions"} {
for _, existing := range []ResourceEnumCloud{"authorizations", "buckets", "dashboards", "orgs", "tasks", "telegrafs", "users", "variables", "secrets", "labels", "views", "documents", "notificationRules", "notificationEndpoints", "checks", "dbrp", "annotations", "flows", "functions", "subscriptions"} {
if existing == enumTypeValue {
*v = enumTypeValue
return nil