pub trait PactPlugin: Send + Sync + 'static {
    fn init_plugin<'life0, 'async_trait>(
        &'life0 self,
        request: Request<InitPluginRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<InitPluginResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn update_catalogue<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Catalogue>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn compare_contents<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CompareContentsRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<CompareContentsResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn configure_interaction<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ConfigureInteractionRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ConfigureInteractionResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn generate_content<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GenerateContentRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<GenerateContentResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn start_mock_server<'life0, 'async_trait>(
        &'life0 self,
        request: Request<StartMockServerRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<StartMockServerResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn shutdown_mock_server<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ShutdownMockServerRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ShutdownMockServerResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn get_mock_server_results<'life0, 'async_trait>(
        &'life0 self,
        request: Request<MockServerRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<MockServerResults>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn prepare_interaction_for_verification<'life0, 'async_trait>(
        &'life0 self,
        request: Request<VerificationPreparationRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<VerificationPreparationResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn verify_interaction<'life0, 'async_trait>(
        &'life0 self,
        request: Request<VerifyInteractionRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<VerifyInteractionResponse>, Status>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; }
Expand description

Generated trait containing gRPC methods that should be implemented for use with PactPluginServer.

Required Methods§

Check that the plugin loaded OK. Returns the catalogue entries describing what the plugin provides

Updated catalogue. This will be sent when the core catalogue has been updated (probably by a plugin loading).

Request to perform a comparison of some contents (matching request)

Request to configure/setup the interaction for later verification. Data returned will be persisted in the pact file.

Request to generate the content using any defined generators

Start a mock server

Shutdown a running mock server TODO: Replace the message types with MockServerRequest and MockServerResults in the next major version

Get the matching results from a running mock server

Prepare an interaction for verification. This should return any data required to construct any request so that it can be amended before the verification is run

Execute the verification for the interaction.

Implementors§