pub struct CloudflareClient { /* private fields */ }Implementations§
Source§impl CloudflareClient
impl CloudflareClient
pub fn new( api_token: impl Into<String>, account_id: impl Into<String>, ) -> Result<Self, String>
pub async fn search_domains( &self, query: &str, extension: &[String], ) -> Result<Vec<DomainAvailability>, String>
pub async fn check_domains( &self, domains: &[String], ) -> Result<Vec<DomainAvailability>, String>
pub async fn list_registered_domains( &self, ) -> Result<(Vec<RegisteredDomain>, Option<PaginationInfo>), String>
pub async fn list_stores( &self, ) -> Result<(Vec<SecretsStore>, Option<PaginationInfo>), String>
pub async fn get_store(&self, store_id: &str) -> Result<SecretsStore, String>
pub async fn create_store( &self, request: &CloudflareStoreCreateRequest, ) -> Result<SecretsStore, String>
pub async fn delete_store(&self, store_id: &str) -> Result<(), String>
pub async fn list_secrets( &self, store_id: &str, ) -> Result<(Vec<SecretRecord>, Option<PaginationInfo>), String>
pub async fn get_secret( &self, store_id: &str, secret_id: &str, ) -> Result<SecretRecord, String>
pub async fn create_secret( &self, store_id: &str, request: &CloudflareSecretCreateRequest, ) -> Result<SecretRecord, String>
pub async fn edit_secret( &self, store_id: &str, secret_id: &str, request: &CloudflareSecretEditRequest, ) -> Result<SecretRecord, String>
pub async fn delete_secret( &self, store_id: &str, secret_id: &str, ) -> Result<(), String>
pub async fn bulk_delete_secrets( &self, store_id: &str, request: &CloudflareBulkDeleteRequest, ) -> Result<(), String>
pub async fn duplicate_secret( &self, store_id: &str, secret_id: &str, request: &CloudflareSecretDuplicateRequest, ) -> Result<SecretRecord, String>
pub async fn get_quota(&self) -> Result<SecretsQuota, String>
pub async fn list_worker_secrets( &self, script_name: &str, ) -> Result<Vec<CloudflareWorkerSecret>, String>
pub async fn get_worker_secret( &self, script_name: &str, secret_name: &str, ) -> Result<CloudflareWorkerSecret, String>
pub async fn put_worker_secret( &self, script_name: &str, secret_name: &str, secret_value: &str, ) -> Result<CloudflareWorkerSecret, String>
pub async fn delete_worker_secret( &self, script_name: &str, secret_name: &str, ) -> Result<(), String>
pub async fn patch_worker_secrets_bulk( &self, script_name: &str, patch: &Value, ) -> Result<Value, String>
pub async fn get_worker_settings( &self, script_name: &str, ) -> Result<Option<CloudflareWorkerSettings>, String>
pub async fn list_zones( &self, filters: &CloudflareZoneFilters, ) -> Result<(Vec<CloudflareZone>, Option<PaginationInfo>), String>
pub async fn get_zone(&self, zone_id: &str) -> Result<CloudflareZone, String>
pub async fn create_zone( &self, request: &CloudflareZoneCreateRequest, ) -> Result<CloudflareZone, String>
pub async fn edit_zone( &self, zone_id: &str, request: &CloudflareZoneEditRequest, ) -> Result<CloudflareZone, String>
pub async fn delete_zone(&self, zone_id: &str) -> Result<(), String>
pub async fn list_records( &self, zone_id: &str, filters: &CloudflareDnsRecordListFilters, ) -> Result<(Vec<CloudflareDnsRecord>, Option<PaginationInfo>), String>
pub async fn get_record( &self, zone_id: &str, record_id: &str, ) -> Result<CloudflareDnsRecord, String>
pub async fn create_record( &self, zone_id: &str, request: &CloudflareDnsRecordWrite, ) -> Result<CloudflareDnsRecord, String>
pub async fn replace_record( &self, zone_id: &str, record_id: &str, request: &CloudflareDnsRecordWrite, ) -> Result<CloudflareDnsRecord, String>
pub async fn edit_record( &self, zone_id: &str, record_id: &str, request: &CloudflareDnsRecordWrite, ) -> Result<CloudflareDnsRecord, String>
pub async fn delete_record( &self, zone_id: &str, record_id: &str, ) -> Result<(), String>
pub async fn batch_records( &self, zone_id: &str, request: &CloudflareDnsRecordBatch, ) -> Result<Value, String>
pub async fn export_records( &self, zone_id: &str, ) -> Result<ResponseBytes, String>
pub async fn import_records( &self, zone_id: &str, bytes: Vec<u8>, ) -> Result<Value, String>
pub async fn get_dnssec( &self, zone_id: &str, ) -> Result<CloudflareDnssec, String>
pub async fn edit_dnssec( &self, zone_id: &str, request: &CloudflareDnssecEdit, ) -> Result<CloudflareDnssec, String>
pub async fn get_dns_settings( &self, zone_id: &str, ) -> Result<CloudflareDnsSettings, String>
pub async fn edit_dns_settings( &self, zone_id: &str, request: &CloudflareDnsSettings, ) -> Result<CloudflareDnsSettings, String>
Trait Implementations§
Source§impl Clone for CloudflareClient
impl Clone for CloudflareClient
Source§fn clone(&self) -> CloudflareClient
fn clone(&self) -> CloudflareClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for CloudflareClient
impl !RefUnwindSafe for CloudflareClient
impl !UnwindSafe for CloudflareClient
impl Send for CloudflareClient
impl Sync for CloudflareClient
impl Unpin for CloudflareClient
impl UnsafeUnpin for CloudflareClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.