mirror of https://github.com/dapr/rust-sdk.git
ci(docs): add docs job (#220)
* ci(docs): add docs checking workflow Signed-off-by: mikeee <hey@mike.ee> * fix(ci): remove override toolchain Signed-off-by: mikeee <hey@mike.ee> * docs: fix warnings and regen protos Signed-off-by: mikeee <hey@mike.ee> --------- Signed-off-by: mikeee <hey@mike.ee>
This commit is contained in:
parent
60c0bbed71
commit
ece8714f29
|
@ -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:
|
||||
|
|
|
@ -426,7 +426,7 @@ impl<T: DaprInterface> Client<T> {
|
|||
self.0.unsubscribe_configuration(request).await
|
||||
}
|
||||
|
||||
/// Encrypt binary data using Dapr. returns Vec<StreamPayload> to be used in decrypt method
|
||||
/// Encrypt binary data using Dapr. returns `Vec<StreamPayload>` to be used in decrypt method
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
|
@ -467,11 +467,11 @@ impl<T: DaprInterface> Client<T> {
|
|||
self.0.encrypt(requested_items).await
|
||||
}
|
||||
|
||||
/// Decrypt binary data using Dapr. returns Vec<u8>.
|
||||
/// Decrypt binary data using Dapr. returns `Vec<u8>`.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `encrypted` - Encrypted data usually returned from encrypted, Vec<StreamPayload>
|
||||
/// * `encrypted` - Encrypted data usually returned from encrypted, `Vec<StreamPayload>`
|
||||
/// * `options` - Decryption request options.
|
||||
pub async fn decrypt(
|
||||
&mut self,
|
||||
|
@ -721,7 +721,7 @@ impl DaprInterface for dapr_v1::dapr_client::DaprClient<TonicChannel> {
|
|||
.into_inner())
|
||||
}
|
||||
|
||||
/// Encrypt binary data using Dapr. returns Vec<StreamPayload> to be used in decrypt method
|
||||
/// Encrypt binary data using Dapr. returns `Vec<StreamPayload>` to be used in decrypt method
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
|
@ -745,11 +745,11 @@ impl DaprInterface for dapr_v1::dapr_client::DaprClient<TonicChannel> {
|
|||
Ok(return_data)
|
||||
}
|
||||
|
||||
/// Decrypt binary data using Dapr. returns Vec<u8>.
|
||||
/// Decrypt binary data using Dapr. returns `Vec<u8>`.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `encrypted` - Encrypted data usually returned from encrypted, Vec<StreamPayload>
|
||||
/// * `encrypted` - Encrypted data usually returned from encrypted, `Vec<StreamPayload>`
|
||||
/// * `options` - Decryption request options.
|
||||
async fn decrypt(&mut self, request: Vec<DecryptRequest>) -> Result<Vec<u8>, Status> {
|
||||
let request = Request::new(tokio_stream::iter(request));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/// when Dapr runtime delivers HTTP content.
|
||||
///
|
||||
/// For example, when callers calls http invoke api
|
||||
/// POST <http://localhost:3500/v1.0/invoke/<app_id>/method/<method>?query1=value1&query2=value2>
|
||||
/// `POST <http://localhost:3500/v1.0/invoke/<app_id>/method/<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)]
|
||||
|
|
|
@ -2983,14 +2983,14 @@ pub struct Job {
|
|||
/// "0 15 3 * * *" - every day at 03:15
|
||||
///
|
||||
/// Period string expressions:
|
||||
/// Entry | Description | Equivalent To
|
||||
/// ----- | ----------- | -------------
|
||||
/// @every <duration> | Run every <duration> (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 `<duration>` | Run every `<duration>` (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
|
||||
|
|
Binary file not shown.
|
@ -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/<app_id>/method/<method>?query1=value1&query2=value2
|
||||
// `POST http://localhost:3500/v1.0/invoke/<app_id>/method/<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<string,string> metadata = 3;
|
||||
}
|
||||
}
|
|
@ -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 <duration> | Run every <duration> (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 `<duration>` | Run every `<duration>` (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
|
||||
|
|
Loading…
Reference in New Issue