Skip to content

Commit

Permalink
feat: change output_path to optional (#250)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Jan 12, 2024
1 parent 16e69e4 commit 42fd09e
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 98 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.0.78"
version = "2.0.79"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
158 changes: 80 additions & 78 deletions pkg/apis/common/v2/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 19 additions & 15 deletions pkg/apis/common/v2/common.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ message Download {
// Task piece length.
uint32 piece_length = 10 [(validate.rules).uint32.gte = 1];
// File path to be exported.
string output_path = 11 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
optional string output_path = 11 [(validate.rules).string = {min_len: 1, ignore_empty: true}];
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// NeedBackToSource needs downloaded from source.
Expand Down
2 changes: 1 addition & 1 deletion proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ message Download {
// Task piece length.
uint64 piece_length = 10;
// File path to be exported.
string output_path = 11;
optional string output_path = 11;
// Download timeout.
optional google.protobuf.Duration timeout = 12;
// NeedBackToSource needs downloaded from source.
Expand Down
4 changes: 2 additions & 2 deletions src/common.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ pub struct Download {
#[prost(uint64, tag = "10")]
pub piece_length: u64,
/// File path to be exported.
#[prost(string, tag = "11")]
pub output_path: ::prost::alloc::string::String,
#[prost(string, optional, tag = "11")]
pub output_path: ::core::option::Option<::prost::alloc::string::String>,
/// Download timeout.
#[prost(message, optional, tag = "12")]
pub timeout: ::core::option::Option<::prost_wkt_types::Duration>,
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.

0 comments on commit 42fd09e

Please sign in to comment.