-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dl): support download file with
file_regex
param (#169)
example: curl -v "http://localhost:8000/oci-file/hub.pingcap.net/pingcap/tidb/package?tag=v8.3.0_linux_amd64& file_regex=tidb-lightning-.%2A%5B.%5Dsha256" to download the file with regex pattern `tidb-lightning-.*[.]sha256`. Signed-off-by: wuhuizuo <wuhuizuo@126.com> Signed-off-by: wuhuizuo <wuhuizuo@126.com>
- Loading branch information
Showing
15 changed files
with
198 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"swagger":"2.0","info":{"title":"Download OCI artifacts Service","description":"Service for downloading files from OCI artifact","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/healthz":{"get":{"tags":["health"],"summary":"healthz health","operationId":"health#healthz","responses":{"200":{"description":"OK response.","schema":{"type":"boolean"}}},"schemes":["http"]}},"/livez":{"get":{"tags":["health"],"summary":"livez health","operationId":"health#livez","responses":{"200":{"description":"OK response.","schema":{"type":"boolean"}}},"schemes":["http"]}},"/oci-file-sha256/{repository}":{"get":{"tags":["oci"],"summary":"download-file-sha256 oci","operationId":"oci#download-file-sha256","produces":["application/plain-text"],"parameters":[{"name":"file","in":"query","description":"file name in OCI artifact","required":true,"type":"string"},{"name":"tag","in":"query","description":"OCI artifact tag","required":true,"type":"string"},{"name":"repository","in":"path","description":"OCI artifact repository","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Disposition":{"description":"Content-Disposition header for downloading","type":"string"},"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"int64"}}}},"schemes":["http"]}},"/oci-file/{repository}":{"get":{"tags":["oci"],"summary":"download-file oci","operationId":"oci#download-file","produces":["application/octet-stream"],"parameters":[{"name":"file","in":"query","description":"file name in OCI artifact","required":true,"type":"string"},{"name":"tag","in":"query","description":"OCI artifact tag","required":true,"type":"string"},{"name":"repository","in":"path","description":"OCI artifact repository","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Disposition":{"description":"Content-Disposition header for downloading","type":"string"},"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"int64"}}}},"schemes":["http"]}},"/oci-files/{repository}":{"get":{"tags":["oci"],"summary":"list-files oci","operationId":"oci#list-files","parameters":[{"name":"tag","in":"query","description":"OCI artifact tag","required":true,"type":"string"},{"name":"repository","in":"path","description":"OCI artifact repository","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Nam quibusdam recusandae dolor voluptas."}}}},"schemes":["http"]}},"/s3-obj/{bucket}/{key}":{"get":{"tags":["ks3"],"summary":"download-object ks3","operationId":"ks3#download-object","produces":["application/octet-stream"],"parameters":[{"name":"bucket","in":"path","description":"bucket name","required":true,"type":"string"},{"name":"key","in":"path","description":"object key","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Disposition":{"description":"Content-Disposition header for downloading","type":"string"},"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"int64"}}}},"schemes":["http"]}}}} | ||
{"swagger":"2.0","info":{"title":"Download OCI artifacts Service","description":"Service for downloading files from OCI artifact","version":"0.0.1"},"host":"localhost:8000","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/healthz":{"get":{"tags":["health"],"summary":"healthz health","operationId":"health#healthz","responses":{"200":{"description":"OK response.","schema":{"type":"boolean"}}},"schemes":["http"]}},"/livez":{"get":{"tags":["health"],"summary":"livez health","operationId":"health#livez","responses":{"200":{"description":"OK response.","schema":{"type":"boolean"}}},"schemes":["http"]}},"/oci-file-sha256/{repository}":{"get":{"tags":["oci"],"summary":"download-file-sha256 oci","operationId":"oci#download-file-sha256","produces":["application/plain-text"],"parameters":[{"name":"file","in":"query","description":"file name in OCI artifact","required":true,"type":"string"},{"name":"tag","in":"query","description":"OCI artifact tag","required":true,"type":"string"},{"name":"repository","in":"path","description":"OCI artifact repository","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Disposition":{"description":"Content-Disposition header for downloading","type":"string"},"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"int64"}}}},"schemes":["http"]}},"/oci-file/{repository}":{"get":{"tags":["oci"],"summary":"download-file oci","operationId":"oci#download-file","produces":["application/octet-stream"],"parameters":[{"name":"tag","in":"query","description":"OCI artifact tag","required":true,"type":"string"},{"name":"file","in":"query","description":"file name in OCI artifact","required":false,"type":"string"},{"name":"file_regex","in":"query","description":"file name regex pattern in OCI artifact","required":false,"type":"string","format":"regexp"},{"name":"repository","in":"path","description":"OCI artifact repository","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Disposition":{"description":"Content-Disposition header for downloading","type":"string"},"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"int64"}}}},"schemes":["http"]}},"/oci-files/{repository}":{"get":{"tags":["oci"],"summary":"list-files oci","operationId":"oci#list-files","parameters":[{"name":"tag","in":"query","description":"OCI artifact tag","required":true,"type":"string"},{"name":"repository","in":"path","description":"OCI artifact repository","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Et aut labore veniam et maiores qui."}}}},"schemes":["http"]}},"/s3-obj/{bucket}/{key}":{"get":{"tags":["ks3"],"summary":"download-object ks3","operationId":"ks3#download-object","produces":["application/octet-stream"],"parameters":[{"name":"bucket","in":"path","description":"bucket name","required":true,"type":"string"},{"name":"key","in":"path","description":"object key","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","headers":{"Content-Disposition":{"description":"Content-Disposition header for downloading","type":"string"},"Content-Length":{"description":"Length is the downloaded content length in bytes.","type":"int64"}}}},"schemes":["http"]}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.