pub struct SchemaClient { /* private fields */ }Expand description
Client for managing schema definitions.
Implementations§
Source§impl SchemaClient
impl SchemaClient
Sourcepub async fn register_schema(&self, schema: &SchemaDef) -> Result<()>
pub async fn register_schema(&self, schema: &SchemaDef) -> Result<()>
Register a new schema.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn get_schema(
&self,
schema_name: &str,
version: i32,
) -> Result<SchemaDef>
pub async fn get_schema( &self, schema_name: &str, version: i32, ) -> Result<SchemaDef>
Get a schema by name and version.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_schemas(&self) -> Result<Vec<SchemaDef>>
pub async fn get_all_schemas(&self) -> Result<Vec<SchemaDef>>
Get all schemas.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn delete_schema(&self, schema_name: &str, version: i32) -> Result<()>
pub async fn delete_schema(&self, schema_name: &str, version: i32) -> Result<()>
Delete a schema by name and version.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_schema_by_name(&self, schema_name: &str) -> Result<()>
pub async fn delete_schema_by_name(&self, schema_name: &str) -> Result<()>
Delete all versions of a schema by name.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.