aws相关的工具脚本
输出包含name为tony的记录
const (
token = ""
region = "us-west-2"
appId = "123456789"
secret = "123456789"
bucket = "tony_bucket"
prefix = "year=2020/month=01"
querySQL = "select * from S3Object where S3Object.name='tony'"
)
util := BuildS3Util(S3Config{
token: token,
appId: appId,
secret: secret,
region: region,
})
util.Records(bucket, prefix, querySQL)
统计包含name为tony的数量
const (
token = ""
region = "us-west-2"
appId = "123456789"
secret = "123456789"
bucket = "tony_bucket"
prefix = "year=2020/month=01"
querySQL = "select * from S3Object where S3Object.name='tony'"
)
util := BuildS3Util(S3Config{
token: token,
appId: appId,
secret: secret,
region: region,
})
util.Count(bucket, prefix, querySQL)
删除包含name为tony的文件
const (
token = ""
region = "us-west-2"
appId = "123456789"
secret = "123456789"
bucket = "tony_bucket"
prefix = "year=2020/month=01"
querySQL = "select * from S3Object where S3Object.name='tony'"
)
util := BuildS3Util(S3Config{
token: token,
appId: appId,
secret: secret,
region: region,
})
util.Remove(bucket, prefix, querySQL)
新增 s3 关于统计条数功能
改良 s3 关于统计条数功能为并发统计
修复 s3 数据获取不全问题