Skip to content

Commit

Permalink
Release unftp-sbe-gcs v0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesdejager committed May 16, 2024
1 parent 3355360 commit 8e2a026
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 26 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Changelog

### unftp-auth-gcs v0.2.6

- Compiled against libunftp v0.20.0
- Fix listing when root path is set (#509)
- Upgraded dependencies

### libunftp 0.20.0

_tag: libunftp-0.10.0_

- Compile against Rust 1.78.0
- Added support for Capsicum on FreeBSD (#481)
- Fixed proxy protocol issue #494 when removing stale data channel
Expand Down
2 changes: 1 addition & 1 deletion crates/unftp-sbe-gcs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "unftp-sbe-gcs"
description = "A storage back-end for libunftp, storing files in Google Cloud Storage (GCS)"
version = "0.2.5"
version = "0.2.6"
authors = [
"Agoston Horvath <[email protected]>",
"Dávid Kosztka <[email protected]>",
Expand Down
50 changes: 25 additions & 25 deletions crates/unftp-sbe-gcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,45 @@ Add the needed dependencies to Cargo.toml:

```toml
[dependencies]
libunftp = "0.20.0"
unftp-sbe-gcs = "0.2.5"
tokio = { version = "1", features = ["full"] }
libunftp = "0.20.0"
unftp-sbe-gcs = "0.2.6"
tokio = { version = "1", features = ["full"] }
```

And add to src/main.rs:

```rust
use libunftp::Server;
use unftp_sbe_gcs::{ServerExt, options::AuthMethod};
use std::path::PathBuf;
use unftp_sbe_gcs::{ServerExt, options::AuthMethod};
use std::path::PathBuf;

#[tokio::main]
pub async fn main() {
let server = Server::with_gcs("my-bucket", PathBuf::from("/unftp"), AuthMethod::WorkloadIdentity(None))
.greeting("Welcome to my FTP server")
.passive_ports(50000..65535);
#[tokio::main]
pub async fn main() {
let server = Server::with_gcs("my-bucket", PathBuf::from("/unftp"), AuthMethod::WorkloadIdentity(None))
.greeting("Welcome to my FTP server")
.passive_ports(50000..65535);

server.listen("127.0.0.1:2121").await;
}
server.listen("127.0.0.1:2121").await;
}
```

The above example uses the `ServerExt` extension trait. You can also call one of the other constructors of `Server` e.g.

```rust
use libunftp::Server;
use unftp_sbe_gcs::{CloudStorage, options::AuthMethod};
use std::path::PathBuf;

#[tokio::main]
pub async fn main() {
let server = libunftp::Server::new(
Box::new(move || CloudStorage::with_bucket_root("my-bucket", PathBuf::from("/ftp-root"), AuthMethod::WorkloadIdentity(None)))
)
.greeting("Welcome to my FTP server")
.passive_ports(50000..65535);

server.listen("127.0.0.1:2121").await;
}
use unftp_sbe_gcs::{CloudStorage, options::AuthMethod};
use std::path::PathBuf;

#[tokio::main]
pub async fn main() {
let server = libunftp::Server::new(
Box::new(move || CloudStorage::with_bucket_root("my-bucket", PathBuf::from("/ftp-root"), AuthMethod::WorkloadIdentity(None)))
)
.greeting("Welcome to my FTP server")
.passive_ports(50000..65535);

server.listen("127.0.0.1:2121").await;
}
```

For more usage information see the `examples` directory and
Expand Down

0 comments on commit 8e2a026

Please sign in to comment.