Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDS download #3976

Merged
merged 5 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 117 additions & 25 deletions api/external/cds/cds.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions api/external/cds/cds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ option go_package = "github.com/chef/automate/api/external/cds";

import "api/external/cds/request/root.proto";
import "api/external/cds/response/root.proto";
import "api/external/common/response.proto";

import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
Expand Down Expand Up @@ -49,4 +50,25 @@ service Cds {
option (chef.automate.api.iam.policy).action = "content:items:install";
};

/*
DownloadContentItem

Download a content item from its ID

grpc gateway is not able to handle streaming; https://github.com/grpc-ecosystem/grpc-gateway/issues/435
so we do not auto-generate the route for download; we instead custom handle with mux

Authorization Action:
```
content:items:download
```
*/
rpc DownloadContentItem(cds.request.DownloadContentItem) returns (stream chef.automate.api.common.ExportData) { }
// option (google.api.http) = {
// post: "/api/beta/content/download"
// body: "*"
// };
// option (chef.automate.api.iam.policy).resource = "content:items";
// option (chef.automate.api.iam.policy).action = "content:items:download";
// };
}
67 changes: 67 additions & 0 deletions api/external/cds/cds.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading