S3Storage constructor
S3Storage({})
Initializes a new client object.
Implementation
S3Storage({
required this.endPoint,
required this.accessKey,
required this.secretKey,
this.signingType = SigningType.V2,
int? port,
this.useSSL = true,
this.userAgent = 's3-storage-dart',
this.sessionToken,
this.region,
this.enableTrace = false,
}) : port = port ?? implyPort(useSSL) {
if (!isValidEndpoint(endPoint)) {
throw StorageInvalidEndpointError(
'End point $endPoint is not a valid domain or ip address',
);
}
if (!isValidPort(this.port)) {
throw StorageInvalidPortError(
'Invalid port number ${this.port}',
);
}
_client = StorageClient(this, signingType);
}