(prefix string, f *flag.FlagSet)
| 77 | } |
| 78 | |
| 79 | func (cfg *Config) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet) { |
| 80 | f.StringVar(&cfg.Bucket, util.PrefixConfig(prefix, "s3.bucket"), "", "s3 bucket to store blocks in.") |
| 81 | f.StringVar(&cfg.Prefix, util.PrefixConfig(prefix, "s3.prefix"), "", "s3 root directory to store blocks in.") |
| 82 | f.StringVar(&cfg.Endpoint, util.PrefixConfig(prefix, "s3.endpoint"), "", "s3 endpoint to push blocks to.") |
| 83 | f.StringVar(&cfg.AccessKey, util.PrefixConfig(prefix, "s3.access_key"), "", "s3 access key.") |
| 84 | f.StringVar(&cfg.MinVersion, util.PrefixConfig(prefix, "s3.tls_min_version"), "VersionTLS12", "minimum version of TLS to use when connecting to s3.") |
| 85 | f.Var(&cfg.SecretKey, util.PrefixConfig(prefix, "s3.secret_key"), "s3 secret key.") |
| 86 | f.Var(&cfg.SessionToken, util.PrefixConfig(prefix, "s3.session_token"), "s3 session token.") |
| 87 | f.IntVar(&cfg.ListBlocksConcurrency, util.PrefixConfig(prefix, "s3.list_blocks_concurrency"), 3, "number of concurrent list calls to make to backend") |
| 88 | |
| 89 | f.StringVar(&cfg.SSE.Type, util.PrefixConfig(prefix, "s3.sse.type"), "", fmt.Sprintf("Enable AWS Server Side Encryption. Supported values: %s.", strings.Join(supportedSSETypes, ", "))) |
| 90 | f.StringVar(&cfg.SSE.KMSKeyID, util.PrefixConfig(prefix, "s3.sse.kms-key-id"), "", "KMS Key ID used to encrypt objects in S3") |
| 91 | f.StringVar(&cfg.SSE.KMSEncryptionContext, util.PrefixConfig(prefix, "s3.sse.kms-encryption-context"), "", "KMS Encryption Context used for object encryption. It expects JSON formatted string.") |
| 92 | f.Var(&cfg.SSE.CustomerEncryptionKey, util.PrefixConfig(prefix, "s3.sse.encryption-key"), "SSE-C Encryption Key used for object encryption.") |
| 93 | cfg.HedgeRequestsUpTo = 2 |
| 94 | cfg.RetryMaxAttempts = minio.MaxRetry |
| 95 | cfg.RetryBackoffInitial = minio.DefaultRetryUnit |
| 96 | cfg.RetryBackoffMax = minio.DefaultRetryCap |
| 97 | } |
| 98 | |
| 99 | func (cfg *Config) PathMatches(other *Config) bool { |
| 100 | // S3 bucket names are globally unique |
nothing calls this directly
no test coverage detected