pub struct ResourceAttributes {
pub namespace: Option<String>,
pub verb: Option<String>,
pub group: Option<String>,
pub version: Option<String>,
pub resource: Option<String>,
pub subresource: Option<String>,
pub name: Option<String>,
pub field_selector: Option<FieldSelectorAttributes>,
pub label_selector: Option<LabelSelectorAttributes>,
}Expand description
ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
Fields§
§namespace: Option<String>Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces “” (empty) is defaulted for LocalSubjectAccessReviews “” (empty) is empty for cluster-scoped resources “” (empty) means “all” for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview +optional
verb: Option<String>Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. “*” means all. +optional
group: Option<String>Group is the API Group of the Resource. “*” means all. +optional
version: Option<String>Version is the API Version of the Resource. “*” means all. +optional
resource: Option<String>Resource is one of the existing resource types. “*” means all. +optional
subresource: Option<String>Subresource is one of the existing resource types. “” means none. +optional
name: Option<String>Name is the name of the resource being requested for a “get” or deleted for a “delete”. “” (empty) means all. +optional
field_selector: Option<FieldSelectorAttributes>fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it. +optional
label_selector: Option<LabelSelectorAttributes>labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it. +optional
Implementations§
Source§impl ResourceAttributes
impl ResourceAttributes
Sourcepub fn namespace(&self) -> &str
pub fn namespace(&self) -> &str
Returns the value of namespace, or the default value if namespace is unset.
Sourcepub fn group(&self) -> &str
pub fn group(&self) -> &str
Returns the value of group, or the default value if group is unset.
Sourcepub fn version(&self) -> &str
pub fn version(&self) -> &str
Returns the value of version, or the default value if version is unset.
Sourcepub fn resource(&self) -> &str
pub fn resource(&self) -> &str
Returns the value of resource, or the default value if resource is unset.
Sourcepub fn subresource(&self) -> &str
pub fn subresource(&self) -> &str
Returns the value of subresource, or the default value if subresource is unset.
Trait Implementations§
Source§impl Clone for ResourceAttributes
impl Clone for ResourceAttributes
Source§fn clone(&self) -> ResourceAttributes
fn clone(&self) -> ResourceAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourceAttributes
impl Debug for ResourceAttributes
Source§impl Default for ResourceAttributes
impl Default for ResourceAttributes
Source§impl Message for ResourceAttributes
impl Message for ResourceAttributes
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.