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) -> Response:param bucket: Name of the S3 bucket
:param key: Key (path) of the object within the bucket
:param expires_seconds: Time in seconds for the URL to remain valid
(default 1 hour, maximum 7 days)
:return: Presigned URL as a string:param bucket: Name of the S3 bucket
:param key: Key (path) where the object will be stored
:param expires_seconds: Time in seconds the URL remains valid
(default 1 hour, maximum 7 days)
:param content_type: Optional — if set, the client MUST send this exact
Content-Type header when uploading, or S3 will reject it
:return: Presigned URL as a stringasync 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) -> ListObjectsV2Resultfn Config::Config(region : String, credentials : Credentials, endpoint? : String, endpoint_style? : EndpointStyle) -> Configimpl Debug for Credentialsfn Credentials::Credentials(access_key_id : String, secret_access_key : String, session_token? : String) -> Credentialspub struct ListObjectsV2Result {
is_truncated : Bool
next_continuation_token : String?
contents : Array[ListedObject]
common_prefixes : Array[String]
} derive(Eq, Debug)fn RequestOptions::RequestOptions(headers? : Map[String, String], query? : Map[String, String], timestamp? : String, payload_hash? : String) -> RequestOptionsInstall
Download zipDependencies