diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4736219..e2d92c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ env: CARGO_TERM_COLOR: always CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} PROTOC_VERSION: 24.4 - RUSTUP_TOOLCHAIN: stable RUSTFLAGS: "-D warnings" jobs: @@ -70,10 +69,32 @@ jobs: - name: Run Tests run: cargo test --workspace --all-targets --all-features + test-docs-sdk: + name: Docs SDK + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: -Dwarnings + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - uses: dtolnay/install@cargo-docs-rs + - run: cargo docs-rs -p dapr + + test-docs-macros: + name: Docs Macros + runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: -Dwarnings + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - uses: dtolnay/install@cargo-docs-rs + - run: cargo docs-rs -p dapr-macros + publish: name: Publish runs-on: ubuntu-latest - needs: [lint, build] + needs: [test-docs-sdk, test-docs-macros, lint, build] if: startswith(github.ref, 'refs/tags/v') steps: diff --git a/dapr/src/client.rs b/dapr/src/client.rs index 0c34249..15bd2d0 100644 --- a/dapr/src/client.rs +++ b/dapr/src/client.rs @@ -426,7 +426,7 @@ impl Client { self.0.unsubscribe_configuration(request).await } - /// Encrypt binary data using Dapr. returns Vec to be used in decrypt method + /// Encrypt binary data using Dapr. returns `Vec` to be used in decrypt method /// /// # Arguments /// @@ -467,11 +467,11 @@ impl Client { self.0.encrypt(requested_items).await } - /// Decrypt binary data using Dapr. returns Vec. + /// Decrypt binary data using Dapr. returns `Vec`. /// /// # Arguments /// - /// * `encrypted` - Encrypted data usually returned from encrypted, Vec + /// * `encrypted` - Encrypted data usually returned from encrypted, `Vec` /// * `options` - Decryption request options. pub async fn decrypt( &mut self, @@ -721,7 +721,7 @@ impl DaprInterface for dapr_v1::dapr_client::DaprClient { .into_inner()) } - /// Encrypt binary data using Dapr. returns Vec to be used in decrypt method + /// Encrypt binary data using Dapr. returns `Vec` to be used in decrypt method /// /// # Arguments /// @@ -745,11 +745,11 @@ impl DaprInterface for dapr_v1::dapr_client::DaprClient { Ok(return_data) } - /// Decrypt binary data using Dapr. returns Vec. + /// Decrypt binary data using Dapr. returns `Vec`. /// /// # Arguments /// - /// * `encrypted` - Encrypted data usually returned from encrypted, Vec + /// * `encrypted` - Encrypted data usually returned from encrypted, `Vec` /// * `options` - Decryption request options. async fn decrypt(&mut self, request: Vec) -> Result, Status> { let request = Request::new(tokio_stream::iter(request)); diff --git a/dapr/src/dapr/dapr.proto.common.v1.rs b/dapr/src/dapr/dapr.proto.common.v1.rs index 5c20ed7..ef84893 100644 --- a/dapr/src/dapr/dapr.proto.common.v1.rs +++ b/dapr/src/dapr/dapr.proto.common.v1.rs @@ -3,7 +3,7 @@ /// when Dapr runtime delivers HTTP content. /// /// For example, when callers calls http invoke api -/// POST /method/?query1=value1&query2=value2> +/// `POST /method/?query1=value1&query2=value2`> /// /// Dapr runtime will parse POST as a verb and extract querystring to quersytring map. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/dapr/src/dapr/dapr.proto.runtime.v1.rs b/dapr/src/dapr/dapr.proto.runtime.v1.rs index d56862a..527e1d5 100644 --- a/dapr/src/dapr/dapr.proto.runtime.v1.rs +++ b/dapr/src/dapr/dapr.proto.runtime.v1.rs @@ -2983,14 +2983,14 @@ pub struct Job { /// "0 15 3 * * *" - every day at 03:15 /// /// Period string expressions: - /// Entry | Description | Equivalent To - /// ----- | ----------- | ------------- - /// @every | Run every (e.g. '@every 1h30m') | N/A - /// @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 * - /// @monthly | Run once a month, midnight, first of month | 0 0 0 1 * * - /// @weekly | Run once a week, midnight on Sunday | 0 0 0 * * 0 - /// @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * - /// @hourly | Run once an hour, beginning of hour | 0 0 * * * * + /// Entry | Description | Equivalent To + /// ----- | ----------- | ------------- + /// @every `` | Run every `` (e.g. '@every 1h30m') | N/A + /// @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 * + /// @monthly | Run once a month, midnight, first of month | 0 0 0 1 * * + /// @weekly | Run once a week, midnight on Sunday | 0 0 0 * * 0 + /// @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * + /// @hourly | Run once an hour, beginning of hour | 0 0 * * * * #[prost(string, optional, tag = "2")] pub schedule: ::core::option::Option<::prost::alloc::string::String>, /// repeats is the optional number of times in which the job should be diff --git a/dapr/src/dapr/types.bin b/dapr/src/dapr/types.bin index 12b1330..ca7a444 100644 Binary files a/dapr/src/dapr/types.bin and b/dapr/src/dapr/types.bin differ diff --git a/proto/dapr/proto/common/v1/common.proto b/proto/dapr/proto/common/v1/common.proto index 1e63b88..9b4007d 100644 --- a/proto/dapr/proto/common/v1/common.proto +++ b/proto/dapr/proto/common/v1/common.proto @@ -26,7 +26,7 @@ option go_package = "github.com/dapr/dapr/pkg/proto/common/v1;common"; // when Dapr runtime delivers HTTP content. // // For example, when callers calls http invoke api -// POST http://localhost:3500/v1.0/invoke//method/?query1=value1&query2=value2 +// `POST http://localhost:3500/v1.0/invoke//method/?query1=value1&query2=value2` // // Dapr runtime will parse POST as a verb and extract querystring to quersytring map. message HTTPExtension { @@ -157,4 +157,4 @@ message ConfigurationItem { // the metadata which will be passed to/from configuration store component. map metadata = 3; -} +} \ No newline at end of file diff --git a/proto/dapr/proto/runtime/v1/dapr.proto b/proto/dapr/proto/runtime/v1/dapr.proto index 86f2b5f..8061643 100644 --- a/proto/dapr/proto/runtime/v1/dapr.proto +++ b/proto/dapr/proto/runtime/v1/dapr.proto @@ -1063,7 +1063,7 @@ message EncryptRequestOptions { // If true, the encrypted document does not contain a key reference. // In that case, calls to the Decrypt method must provide a key reference (name or name/version). // Defaults to false. - bool omit_decryption_key_name = 11 [json_name = "omitDecryptionKeyName"]; + bool omit_decryption_key_name = 11 [json_name="omitDecryptionKeyName"]; // Key reference to embed in the encrypted document (name or name/version). // This is helpful if the reference of the key used to decrypt the document is different from the one used to encrypt it. // If unset, uses the reference of the key used to encrypt the document (this is the default behavior). @@ -1212,14 +1212,14 @@ message Job { // "0 15 3 * * *" - every day at 03:15 // // Period string expressions: - // Entry | Description | Equivalent To - // ----- | ----------- | ------------- - // @every | Run every (e.g. '@every 1h30m') | N/A - // @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 * - // @monthly | Run once a month, midnight, first of month | 0 0 0 1 * * - // @weekly | Run once a week, midnight on Sunday | 0 0 0 * * 0 - // @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * - // @hourly | Run once an hour, beginning of hour | 0 0 * * * * + // Entry | Description | Equivalent To + // ----- | ----------- | ------------- + // @every `` | Run every `` (e.g. '@every 1h30m') | N/A + // @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 * + // @monthly | Run once a month, midnight, first of month | 0 0 0 1 * * + // @weekly | Run once a week, midnight on Sunday | 0 0 0 * * 0 + // @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * + // @hourly | Run once an hour, beginning of hour | 0 0 * * * * optional string schedule = 2 [json_name = "schedule"]; // repeats is the optional number of times in which the job should be