CosService class

Constructors

CosService.new(String serviceKey)

Properties

cosApi CosServiceApi
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceKey String
getter/setter pair

Methods

cancelAll() Future<void>
deleteBucket(String bucket, {String? region}) Future<void>
deleteObject(String bucket, String cosPath, {String? region, String? versionId}) Future<void>
doesBucketExist(String bucket) Future<bool>
doesObjectExist(String bucket, String cosPath) Future<bool>
getBucket(String bucket, {String? region, String? prefix, String? delimiter, String? encodingType, String? marker, int? maxKeys}) Future<BucketContents>
getBucketAccelerate(String bucket, {String? region}) Future<bool>
getBucketLocation(String bucket, {String? region}) Future<String>
getBucketVersioning(String bucket, {String? region}) Future<bool>
getObjectUrl(String bucket, String region, String cosPath) Future<String>
获取get请求未签名链接 bucket 存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket region 地域 cosPath 对象键,是对象在 COS 上的完整路径,如果带目录的话,格式为 "video/xxx/movie.mp4"
getPresignedUrl(String bucket, String cosPath, {int? signValidTime, bool? signHost, Map<String?, String?>? parameters, String? region}) Future<String>
获取get请求预签名链接 bucket 存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket cosPath 对象键,是对象在 COS 上的完整路径,如果带目录的话,格式为 "video/xxx/movie.mp4" signValidTime 设置签名有效期(单位为秒),注意这里是签名有效期,您需要自行保证密钥有效期 signHost 是否签入Header Host,不签可能导致请求失败或安全漏洞 parameters http请求参数,传入的请求参数需与实际请求相同,能够防止用户篡改此HTTP请求的参数
getService() Future<ListAllMyBuckets>
headBucket(String bucket, {String? region}) Future<Map<String?, String?>>
headObject(String bucket, String cosPath, {String? region, String? versionId}) Future<Map<String?, String?>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preBuildConnection(String bucket) Future<void>
putBucket(String bucket, {String? region, bool? enableMAZ, String? cosacl, String? readAccount, String? writeAccount, String? readWriteAccount}) Future<void>
putBucketAccelerate(String bucket, bool enable, {String? region}) Future<void>
putBucketVersioning(String bucket, bool enable, {String? region}) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited