Dependencies
///|
async fn example {
let client = @s3.Client(
@s3.Config("us-east-1", @s3.Credentials("AKIA...", "secret...")),
)
let object = client.get_object("my-bucket", "path/to/object.txt")
let body = object.body.read_all().text()
object.body.close()
println(body)
}///|
let client = @s3.Client(
@s3.Config(
"us-east-1",
@s3.Credentials("minioadmin", "minioadmin"),
endpoint="http://127.0.0.1:9000",
endpoint_style=@s3.Path,
),
)async fn Client::delete_object(self : Client, bucket : String, key : String, options? : RequestOptions) -> Responseasync fn Client::get_object(self : Client, bucket : String, key : String, options? : RequestOptions) -> ObjectResultasync fn Client::head_object(self : Client, bucket : String, key : String, options? : RequestOptions) -> Responseasync fn Client::list_objects_v2(self : Client, bucket : String, prefix? : String, delimiter? : String, continuation_token? : String, max_keys? : Int, options? : RequestOptions) -> ListObjectsV2Resultpub struct Config {
// private fields
} derive(Eq, Debug)
fn Config::Config(region : String, credentials : Credentials, endpoint? : String, endpoint_style? : EndpointStyle) -> Configpub struct Credentials {
// private fields
} derive(Eq)
fn Credentials::Credentials(access_key_id : String, secret_access_key : String, session_token? : String) -> Credentialsimpl Debug for Credentialspub struct ListObjectsV2Result {
is_truncated : Bool
next_continuation_token : String?
contents : Array[ListedObject]
common_prefixes : Array[String]
} derive(Eq, Debug)pub struct RequestOptions {
// private fields
} derive(Debug)
fn RequestOptions::RequestOptions(headers? : Map[String, String], query? : Map[String, String], timestamp? : String, payload_hash? : String) -> RequestOptionsInstall
Download zipDependencies