Skip to main content

Module s3_tools

Module s3_tools 

Source
Expand description

S3-compatible servers other tools already know about: the MinIO client’s aliases, MC_HOST_<alias>, and s3cmd’s config.

Anyone running MinIO has mc, and anyone using Ceph, Wasabi or DigitalOcean Spaces from a terminal often has s3cmd. Both keep an endpoint and its keys in a file datui can read, so those servers appear without being described again in datui’s config.

Structs§

ToolServer
One S3-compatible server another tool describes.

Functions§

mc_config_paths
Where mc keeps config.json: MC_CONFIG_DIR, else one in the home directory named after the binary: .mc (or .mcli, as some distributions package it), and without the dot on Windows.
mc_hosts
Every MC_HOST_<alias> in vars.
parse_mc_config
Aliases from an mc config.json (format version 10), leaving out the ones with no keys or mc’s placeholders, and the public play server mc adds by default.
parse_mc_host
An alias from MC_HOST_<alias>: https://ACCESS:SECRET@host:port, or https://ACCESS:SECRET:TOKEN@host:port, as mc reads it.
parse_s3cfg
The server in the [default] section of an s3cmd config, when it has keys.
s3cfg_path
Where s3cmd keeps its config: S3CMD_CONFIG, else %APPDATA%\s3cmd.ini on Windows and ~/.s3cfg elsewhere.