Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of YangSen-qn:qiniu/qshell
Browse files Browse the repository at this point in the history
YangSen-qn committed Jun 20, 2024
2 parents 95f9382 + 5bb70c3 commit 41cd2f2
Showing 37 changed files with 428 additions and 133 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.14.0
## 新增
1. 支持归档直读


# 2.13.0
## 更新
1. batchstat 和 batchsign 支持结果输出到文件
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -19,15 +19,15 @@ qshell 是利用 [七牛文档上公开的 API](http://developer.qiniu.com) 实
| 支持平台 | 链接 |
| ----------------------- | -------------------------------------------------------------------------------------------------- |
| Windows X86 | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-windows-386.zip) |
| Windows amd64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-windows-amd64.zip) |
| Windows arm | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-windows-arm.zip) |
| Linux X86 | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-linux-386.tar.gz) |
| Linux amd64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-linux-amd64.tar.gz) |
| Linux arm | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-linux-arm.tar.gz) |
| Linux arm64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-linux-arm64.tar.gz) |
| Mac OS(10.12以上) amd64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-darwin-amd64.tar.gz) |
| Mac OS arm64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.12.0/qshell-v2.12.0-darwin-arm64.tar.gz) |
| Windows X86 | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-windows-386.zip) |
| Windows amd64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-windows-amd64.zip) |
| Windows arm | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-windows-arm.zip) |
| Linux X86 | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-linux-386.tar.gz) |
| Linux amd64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-linux-amd64.tar.gz) |
| Linux arm | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-linux-arm.tar.gz) |
| Linux arm64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-linux-arm64.tar.gz) |
| Mac OS(10.12以上) amd64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-darwin-amd64.tar.gz) |
| Mac OS arm64 | [下载](https://github.com/qiniu/qshell/releases/download/v2.13.0/qshell-v2.13.0-darwin-arm64.tar.gz) |


## 安装
5 changes: 3 additions & 2 deletions cmd/asyncfetch.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cmd

import (
"github.com/spf13/cobra"

"github.com/qiniu/qshell/v2/docs"
"github.com/qiniu/qshell/v2/iqshell"
"github.com/qiniu/qshell/v2/iqshell/storage/object/operations"
"github.com/spf13/cobra"
)

func asyncFetchCmdBuilder(cfg *iqshell.Config) *cobra.Command {
@@ -32,7 +33,7 @@ func asyncFetchCmdBuilder(cfg *iqshell.Config) *cobra.Command {
cmd.Flags().StringVarP(&info.CallbackBody, "callback-body", "b", "", "callback body")
cmd.Flags().StringVarP(&info.CallbackHost, "callback-host", "T", "", "callback HOST")

cmd.Flags().IntVarP(&info.FileType, "file-type", "", 0, "storage type, 0:STANDARD storage, 1:IA storage, 2:ARCHIVE storage, 3:DEEP_ARCHIVE storage")
cmd.Flags().IntVarP(&info.FileType, "file-type", "", 0, "storage type, 0:STANDARD storage, 1:IA storage, 2:ARCHIVE storage, 3:DEEP_ARCHIVE storage, 4:ARCHIVE_IR storage")
cmd.Flags().IntVarP(&info.FileType, "storage-type", "g", 0, "storage type, same to --file-type")
_ = cmd.Flags().MarkDeprecated("storage-type", "use --file-type instead") // 废弃 storage-type

5 changes: 3 additions & 2 deletions cmd/bucket.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package cmd

import (
"github.com/spf13/cobra"

"github.com/qiniu/qshell/v2/docs"
"github.com/qiniu/qshell/v2/iqshell"
"github.com/qiniu/qshell/v2/iqshell/common/data"
"github.com/qiniu/qshell/v2/iqshell/storage/bucket/operations"
"github.com/spf13/cobra"
)

var domainsCmdBuilder = func(cfg *iqshell.Config) *cobra.Command {
@@ -136,7 +137,7 @@ var listBucketCmd2Builder = func(cfg *iqshell.Config) *cobra.Command {
cmd.Flags().StringVarP(&info.StartDate, "start", "s", "", "start date with format yyyy-mm-dd-hh-MM-ss, all files will be listed according to the prefix and then filtered.")
cmd.Flags().StringVarP(&info.EndDate, "end", "e", "", "end date with format yyyy-mm-dd-hh-MM-ss, all files will be listed according to the prefix and then filtered.")

cmd.Flags().StringVarP(&info.FileTypes, "file-types", "", "", "Specify storage type, separated by comma, all files will be listed according to the prefix and then filtered. 0:STANDARD storage, 1:IA storage, 2 means ARCHIVE storage. 3:DEEP_ARCHIVE storage")
cmd.Flags().StringVarP(&info.FileTypes, "file-types", "", "", "Specify storage type, separated by comma, all files will be listed according to the prefix and then filtered. 0:STANDARD storage, 1:IA storage, 2:ARCHIVE storage, 3:DEEP_ARCHIVE storage 4:ARCHIVE_IR storage")
cmd.Flags().StringVarP(&info.FileTypes, "storages", "", "", "Specify storage type, same to --file-types")
_ = cmd.Flags().MarkDeprecated("storages", "use --file-types instead") // 废弃 storages

11 changes: 7 additions & 4 deletions cmd/rs.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cmd

import (
"github.com/spf13/cobra"

"github.com/qiniu/qshell/v2/docs"
"github.com/qiniu/qshell/v2/iqshell"
"github.com/qiniu/qshell/v2/iqshell/storage/object/operations"
"github.com/spf13/cobra"
)

var statCmdBuilder = func(cfg *iqshell.Config) *cobra.Command {
@@ -88,8 +89,9 @@ var changeLifecycleCmdBuilder = func(cfg *iqshell.Config) *cobra.Command {
},
}
cmd.Flags().IntVarP(&info.ToIAAfterDays, "to-ia-after-days", "", 0, "to IA storage after some days. the range is -1 or bigger than 0. -1 means cancel to IA storage")
cmd.Flags().IntVarP(&info.ToArchiveAfterDays, "to-archive-after-days", "", 0, "to archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to archive storage")
cmd.Flags().IntVarP(&info.ToDeepArchiveAfterDays, "to-deep-archive-after-days", "", 0, "to deep archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to deep archive storage")
cmd.Flags().IntVarP(&info.ToArchiveIRAfterDays, "to-archive-ir-after-days", "", 0, "to ARCHIVE_IR storage after some days. the range is -1 or bigger than 0. -1 means cancel to ARCHIVE_IR storage")
cmd.Flags().IntVarP(&info.ToArchiveAfterDays, "to-archive-after-days", "", 0, "to ARCHIVE storage after some days. the range is -1 or bigger than 0. -1 means cancel to ARCHIVE storage")
cmd.Flags().IntVarP(&info.ToDeepArchiveAfterDays, "to-deep-archive-after-days", "", 0, "to DEEP_ARCHIVE storage after some days. the range is -1 or bigger than 0. -1 means cancel to DEEP_ARCHIVE storage")
cmd.Flags().IntVarP(&info.DeleteAfterDays, "delete-after-days", "", 0, "delete after some days. the range is -1 or bigger than 0. -1 means cancel to delete")
return cmd
}
@@ -242,7 +244,8 @@ var changeTypeCmdBuilder = func(cfg *iqshell.Config) *cobra.Command {
And 0 means STANDARD storage,
while 1 means IA storage,
while 2 means ARCHIVE storage.
while 3 means DEEP_ARCHIVE storage.`,
while 3 means DEEP_ARCHIVE storage.
while 4 means ARCHIVE_IR storage.`,
Example: `change storage type of A.png(bucket:bucketA key:A.png) to ARCHIVE storage
qshell chtype bucketA A.png 2
and you can check result by command:
5 changes: 3 additions & 2 deletions cmd/rsbatch.go
Original file line number Diff line number Diff line change
@@ -176,8 +176,9 @@ Lifecycle value must great than or equal to -1, unit: day.
},
}
cmd.Flags().IntVarP(&info.ToIAAfterDays, "to-ia-after-days", "", 0, "to IA storage after some days. the range is -1 or bigger than 0. -1 means cancel to IA storage")
cmd.Flags().IntVarP(&info.ToArchiveAfterDays, "to-archive-after-days", "", 0, "to archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to archive storage")
cmd.Flags().IntVarP(&info.ToDeepArchiveAfterDays, "to-deep-archive-after-days", "", 0, "to deep archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to deep archive storage")
cmd.Flags().IntVarP(&info.ToArchiveIRAfterDays, "to-archive-ir-after-days", "", 0, "to ARCHIVE_IR storage after some days. the range is -1 or bigger than 0. -1 means cancel to ARCHIVE_IR storage")
cmd.Flags().IntVarP(&info.ToArchiveAfterDays, "to-archive-after-days", "", 0, "to ARCHIVE storage after some days. the range is -1 or bigger than 0. -1 means cancel to ARCHIVE storage")
cmd.Flags().IntVarP(&info.ToDeepArchiveAfterDays, "to-deep-archive-after-days", "", 0, "to DEEP_ARCHIVE storage after some days. the range is -1 or bigger than 0. -1 means cancel to DEEP_ARCHIVE storage")
cmd.Flags().IntVarP(&info.DeleteAfterDays, "delete-after-days", "", 0, "delete after some days. the range is -1 or bigger than 0. -1 means cancel to delete")
setBatchCmdDefaultFlags(cmd, &info.BatchInfo)
return cmd
Loading

0 comments on commit 41cd2f2

Please sign in to comment.