-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement policy v2 resource using gRPC
- Loading branch information
1 parent
1bab53a
commit 673e8d9
Showing
7 changed files
with
196 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
package policyv2 | ||
|
||
const ( | ||
resourceName = "cyral_policy_v2" | ||
dataSourceName = resourceName | ||
apiPathLocal = "v2/policies/local" | ||
apiPathGlobal = "v2/policies/global" | ||
apiPathApproval = "v2/policies/approval" | ||
resourceName = "cyral_policy_v2" | ||
dataSourceName = resourceName | ||
) | ||
|
||
func getAPIPath(policyType string) string { | ||
switch policyType { | ||
case "POLICY_TYPE_LOCAL", "local": | ||
return apiPathLocal | ||
case "POLICY_TYPE_GLOBAL", "global": | ||
return apiPathGlobal | ||
case "POLICY_TYPE_APPROVAL", "approval": | ||
return apiPathApproval | ||
default: | ||
return "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.