Repository: rclone/rclone
File: backend/s3/s3.go (Go)

Code before:
	LeavePartsOnError     bool                 `config:"leave_parts_on_error"`
	ListChunk             int32                `config:"list_chunk"`
	ListVersion           int                  `config:"list_version"`
	ListURLEncode         fs.Tristate          `config:"list_url_encode"`
	NoCheckBucket         bool                 `config:"no_check_bucket"`
	NoHead                bool                 `config:"no_head"`
	NoHeadObject          bool                 `config:"no_head_object"`
	Enc                   encoder.MultiEncoder `config:"encoding"`
	DisableHTTP2          bool                 `config:"disable_http2"`
	DownloadURL           string               `config:"download_url"`
	DirectoryMarkers      bool                 `config:"directory_markers"`
	UseMultipartEtag      fs.Tristate          `config:"use_multipart_etag"`
	UsePresignedRequest   bool                 `config:"use_presigned_request"`
	Versions              bool                 `config:"versions"`
	VersionAt             fs.Time              `config:"version_at"`
	VersionDeleted        bool                 `config:"version_deleted"`
	Decompress            bool                 `config:"decompress"`
	MightGzip             fs.Tristate          `config:"might_gzip"`
	UseAcceptEncodingGzip fs.Tristate          `config:"use_accept_encoding_gzip"`
	NoSystemMetadata      bool                 `config:"no_system_metadata"`
	UseAlreadyExists      fs.Tristate          `config:"use_already_exists"`
	UseMultipartUploads   fs.Tristate          `config:"use_multipart_uploads"`
	UseUnsignedPayload    fs.Tristate          `config:"use_unsigned_payload"`
	SDKLogMode            sdkLogMode           `config:"sdk_log_mode"`
	DirectoryBucket       bool                 `config:"directory_bucket"`
	APIKey                string               `config:"api_key"`
	InstanceID            string               `config:"resource_instance_id"`
}

// Fs represents a remote s3 server
type Fs struct {
	name           string          // the name of the remote
	root           string          // root of the bucket - ignore all objects above this
	opt            Options         // parsed options
	ci             *fs.ConfigInfo  // global config
	ctx            context.Context // global context for reading config
	features       *fs.Features    // optional features
	c              *s3.Client      // the connection to the s3 server
	rootBucket     string          // bucket part of root (if any)
	rootDirectory  string          // directory part of root (if any)
	cache          *bucket.Cache   // cache for bucket creation status
	pacer          *fs.Pacer       // To pace the API calls
	srv            *http.Client    // a plain http client
	srvRest        *rest.Client    // the rest connection to the server
	etagIsNotMD5   bool            // if set ETags are not MD5s
	versioningMu   sync.Mutex
	versioning     fs.Tristate // if set bucket is using versions
	warnCompressed sync.Once   // warn once about compressed files
}

// Object describes a s3 object

Review comment (suggestion):
There don't appear to be matching config definitions for `APIKey` or `InstanceID`. Which also means they have no help.

Since these are ibm specific they should probably be prefixed `ibmcos_api_key` and `ibmcos_resource_instance_id`.



Code after:
	RequesterPays         bool                 `config:"requester_pays"`
	ServerSideEncryption  string               `config:"server_side_encryption"`
	SSEKMSKeyID           string               `config:"sse_kms_key_id"`
	SSECustomerAlgorithm  string               `config:"sse_customer_algorithm"`
	SSECustomerKey        string               `config:"sse_customer_key"`
	SSECustomerKeyBase64  string               `config:"sse_customer_key_base64"`
	SSECustomerKeyMD5     string               `config:"sse_customer_key_md5"`
	StorageClass          string               `config:"storage_class"`
	UploadCutoff          fs.SizeSuffix        `config:"upload_cutoff"`
	CopyCutoff            fs.SizeSuffix        `config:"copy_cutoff"`
	ChunkSize             fs.SizeSuffix        `config:"chunk_size"`
	MaxUploadParts        int                  `config:"max_upload_parts"`
	DisableChecksum       bool                 `config:"disable_checksum"`
	SharedCredentialsFile string               `config:"shared_credentials_file"`
	Profile               string               `config:"profile"`
	SessionToken          string               `config:"session_token"`
	UploadConcurrency     int                  `config:"upload_concurrency"`
	ForcePathStyle        bool                 `config:"force_path_style"`
	V2Auth                bool                 `config:"v2_auth"`
	UseAccelerateEndpoint bool                 `config:"use_accelerate_endpoint"`
	LeavePartsOnError     bool                 `config:"leave_parts_on_error"`
	ListChunk             int32                `config:"list_chunk"`
	ListVersion           int                  `config:"list_version"`
	ListURLEncode         fs.Tristate          `config:"list_url_encode"`
	NoCheckBucket         bool                 `config:"no_check_bucket"`
	NoHead                bool                 `config:"no_head"`
	NoHeadObject          bool                 `config:"no_head_object"`
	Enc                   encoder.MultiEncoder `config:"encoding"`
	DisableHTTP2          bool                 `config:"disable_http2"`
	DownloadURL           string               `config:"download_url"`
	DirectoryMarkers      bool                 `config:"directory_markers"`
	UseMultipartEtag      fs.Tristate          `config:"use_multipart_etag"`
	UsePresignedRequest   bool                 `config:"use_presigned_request"`
	Versions              bool                 `config:"versions"`
	VersionAt             fs.Time              `config:"version_at"`
	VersionDeleted        bool                 `config:"version_deleted"`
	Decompress            bool                 `config:"decompress"`
	MightGzip             fs.Tristate          `config:"might_gzip"`
	UseAcceptEncodingGzip fs.Tristate          `config:"use_accept_encoding_gzip"`
	NoSystemMetadata      bool                 `config:"no_system_metadata"`
	UseAlreadyExists      fs.Tristate          `config:"use_already_exists"`
	UseMultipartUploads   fs.Tristate          `config:"use_multipart_uploads"`
	UseUnsignedPayload    fs.Tristate          `config:"use_unsigned_payload"`
	SDKLogMode            sdkLogMode           `config:"sdk_log_mode"`
	DirectoryBucket       bool                 `config:"directory_bucket"`
	IBMAPIKey             string               `config:"ibm_api_key"`
	IBMInstanceID         string               `config:"ibm_resource_instance_id"`
}

// Fs represents a remote s3 server
type Fs struct {