Minio implementation of the S34k API.
Adding to project:
implementation("org.veupathdb.lib.s3:s34k-minio:0.7.1+s34k-0.11.0")
For a full API reference, see the S34K API docs.
This implementation, like all implementations, of the S34K API is loaded
automatically at runtime and is indirectly accessible through the S34K
S3Api.newClient
method. Direct access of the classes and functions defined
in this package is unnecessary and strongly discouraged.
Basic Example
fun main() {
// Get a client
val client = S3Api.newClient(S3Config(
url = "my-s3-host",
accessKey = System.getenv("S3_ACCESS_KEY"),
secretKey = System.getenv("S3_SECRET_KEY"),
))
// Get or create a bucket.
val bucket = client.createBucketIfNotExists("my-bucket")
// Put an object into the bucket via InputStream over contents.
bucket.putObject("my/object/key", "hello".toByteArray().inputStream())
// Delete object from bucket
bucket.deleteObject("my/object/key")
}
This project includes automated end-to-end testing executed via
docker-compose
.