From 2af8e16ef914a6f27ee0ab12fa50b453c092587c Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" <4903+rboyer@users.noreply.github.com> Date: Fri, 17 Sep 2021 11:53:03 -0500 Subject: [PATCH] api: add partition field to acl structs (#11080) --- .changelog/11080.txt | 3 +++ api/acl.go | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .changelog/11080.txt diff --git a/.changelog/11080.txt b/.changelog/11080.txt new file mode 100644 index 0000000000..253b132eef --- /dev/null +++ b/.changelog/11080.txt @@ -0,0 +1,3 @@ +```release-note:improvement +api: add partition field to acl structs +``` diff --git a/api/acl.go b/api/acl.go index 0535d6ca7c..81735bdb07 100644 --- a/api/acl.go +++ b/api/acl.go @@ -53,6 +53,10 @@ type ACLToken struct { // Namespaces are a Consul Enterprise feature. Namespace string `json:",omitempty"` + // Partition is the partition the ACLToken is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` + // AuthMethodNamespace is the namespace the token's AuthMethod is associated with. // Namespacing is a Consul Enterprise feature. AuthMethodNamespace string `json:",omitempty"` @@ -79,6 +83,10 @@ type ACLTokenListEntry struct { // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + // Partition is the partition the ACLTokenListEntry is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` + // AuthMethodNamespace is the namespace the token's AuthMethod is associated with. // Namespacing is a Consul Enterprise feature. AuthMethodNamespace string `json:",omitempty"` @@ -138,6 +146,10 @@ type ACLPolicy struct { // Namespace is the namespace the ACLPolicy is associated with. // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + + // Partition is the partition the ACLPolicy is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` } type ACLPolicyListEntry struct { @@ -152,6 +164,10 @@ type ACLPolicyListEntry struct { // Namespace is the namespace the ACLPolicyListEntry is associated with. // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + + // Partition is the partition the ACLPolicyListEntry is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` } type ACLRolePolicyLink = ACLLink @@ -171,6 +187,10 @@ type ACLRole struct { // Namespace is the namespace the ACLRole is associated with. // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + + // Partition is the partition the ACLRole is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` } // BindingRuleBindType is the type of binding rule mechanism used. @@ -198,6 +218,10 @@ type ACLBindingRule struct { // Namespace is the namespace the ACLBindingRule is associated with. // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + + // Partition is the partition the ACLBindingRule is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` } type ACLAuthMethod struct { @@ -226,6 +250,10 @@ type ACLAuthMethod struct { // Namespace is the namespace the ACLAuthMethod is associated with. // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + + // Partition is the partition the ACLAuthMethod is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` } func (m *ACLAuthMethod) MarshalJSON() ([]byte, error) { @@ -293,6 +321,10 @@ type ACLAuthMethodListEntry struct { // Namespace is the namespace the ACLAuthMethodListEntry is associated with. // Namespacing is a Consul Enterprise feature. Namespace string `json:",omitempty"` + + // Partition is the partition the ACLAuthMethodListEntry is associated with. + // Partitions are a Consul Enterprise feature. + Partition string `json:",omitempty"` } // This is nearly identical to the ACLAuthMethod MarshalJSON