Skip to main content

Authorization

Struct Authorization 

Source
pub struct Authorization { /* private fields */ }
Expand description

Client for the gestalt.provider.v1.Authorization service.

Implementations§

Source§

impl Authorization

Source

pub fn new(channel: Channel) -> Self

Creates a client over an established channel.

Source

pub fn with_timeout(self, timeout: Duration) -> Self

Sets a deadline applied to every unary call; calls that run past it fail with DEADLINE_EXCEEDED. Streaming calls are unaffected.

Source

pub async fn connect() -> Result<Self, GestaltError>

Connects to the authorization host service described by the environment.

Source

pub async fn connect_named(name: &str) -> Result<Self, GestaltError>

Connects to the named authorization host-service binding.

Source

pub async fn check_access( &mut self, action: Option<Action>, resource: Option<Resource>, ) -> Result<CheckAccessResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.CheckAccess.

Source

pub async fn check_access_raw( &mut self, request: CheckAccessRequest, ) -> Result<CheckAccessResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.CheckAccess with the full request and response messages.

Source

pub async fn check_access_many( &mut self, requests: Vec<CheckAccessRequest>, ) -> Result<CheckAccessManyResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.CheckAccessMany.

Source

pub async fn check_access_many_raw( &mut self, request: CheckAccessManyRequest, ) -> Result<CheckAccessManyResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.CheckAccessMany with the full request and response messages.

Source

pub async fn list_relationships( &mut self, page_size: i32, page_token: String, filter: Option<RelationshipFilter>, ) -> Result<ListRelationshipsResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.ListRelationships.

Source

pub async fn list_relationships_raw( &mut self, request: ListRelationshipsRequest, ) -> Result<ListRelationshipsResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.ListRelationships with the full request and response messages.

Source

pub async fn add_relationship( &mut self, relationship: Option<Relationship>, ) -> Result<Option<Relationship>, GestaltError>

Calls gestalt.provider.v1.Authorization.AddRelationship.

Source

pub async fn add_relationship_raw( &mut self, request: AddRelationshipRequest, ) -> Result<AddRelationshipResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.AddRelationship with the full request and response messages.

Source

pub async fn delete_relationship( &mut self, relationship_tuple: Option<RelationshipTuple>, ) -> Result<DeleteRelationshipResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.DeleteRelationship.

Source

pub async fn delete_relationship_raw( &mut self, request: DeleteRelationshipRequest, ) -> Result<DeleteRelationshipResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.DeleteRelationship with the full request and response messages.

Source

pub async fn set_authorization_state( &mut self, relationships: Vec<Relationship>, model: Option<AuthorizationModel>, ) -> Result<Option<AuthorizationModelRef>, GestaltError>

Calls gestalt.provider.v1.Authorization.SetAuthorizationState.

Source

pub async fn set_authorization_state_raw( &mut self, request: SetAuthorizationStateRequest, ) -> Result<SetAuthorizationStateResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.SetAuthorizationState with the full request and response messages.

Source

pub async fn get_active_model_ref( &mut self, ) -> Result<Option<AuthorizationModelRef>, GestaltError>

Calls gestalt.provider.v1.Authorization.GetActiveModelRef.

Source

pub async fn get_active_model_ref_raw( &mut self, ) -> Result<GetActiveModelRefResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.GetActiveModelRef with the full request and response messages.

Source

pub async fn set_active_model( &mut self, model: Option<AuthorizationModel>, ) -> Result<Option<AuthorizationModelRef>, GestaltError>

Calls gestalt.provider.v1.Authorization.SetActiveModel.

Source

pub async fn set_active_model_raw( &mut self, request: SetActiveModelRequest, ) -> Result<SetActiveModelResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.SetActiveModel with the full request and response messages.

Source

pub async fn list_active_model_resource_types( &mut self, page_size: i32, page_token: String, filter: Option<AuthorizationModelResourceTypeFilter>, ) -> Result<ListActiveModelResourceTypesResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.ListActiveModelResourceTypes.

Source

pub async fn list_active_model_resource_types_raw( &mut self, request: ListActiveModelResourceTypesRequest, ) -> Result<ListActiveModelResourceTypesResponse, GestaltError>

Calls gestalt.provider.v1.Authorization.ListActiveModelResourceTypes with the full request and response messages.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more