-
Notifications
You must be signed in to change notification settings - Fork 0
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
add V1ClusterProfilesUIDSpcDownload API #149
base: main
Are you sure you want to change the base?
Conversation
ccc2952
to
524cc9b
Compare
4a07b42
to
e497d7f
Compare
e497d7f
to
88c8830
Compare
88c8830
to
c1a99f3
Compare
c1a99f3
to
68494d6
Compare
params := clientv1.NewV1ClusterProfilesUIDSpcDownloadParamsWithContext(h.ctx). | ||
WithUID(profileUID) | ||
|
||
resp, err := h.Client.V1ClusterProfilesUIDSpcDownload(params, w) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method returns an io.ReadCloser
we need to actually read from it into a buffer and save the resulting data somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my plan is to consume it like this
![image](https://private-user-images.githubusercontent.com/7551036/413502139-25dd6911-0297-4e15-9f6e-9fe199bf190b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDI0NTcsIm5iZiI6MTczOTcwMjE1NywicGF0aCI6Ii83NTUxMDM2LzQxMzUwMjEzOS0yNWRkNjkxMS0wMjk3LTRlMTUtOWY2ZS05ZmUxOTliZjE5MGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTZUMTAzNTU3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjI3MjhjYjQ2NzcwMWFjZmM2ZGZiN2Y0YzBiNzQ2NzU4NmQwYTYwZGJlNzcyZGJmYzVlMTFlYzIyYzU4NjE1ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.16KAeo_qgbbx4LYRaaCy8ADk8fKl5tOVZLH_de-PO_w)
kind of like this in the stylus repo
https://github.com/spectrocloud/stylus/blob/7b29a7e908627516135c003e17ac988e7cd45750/pkg/services/spectro-cli/cmd/spectro-cli-build.go#L319
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. ExportClusterProfile
returns a bytes.Buffer
and DownloadLogs
returns an io.Writer
. It would be good to standardize these.
No description provided.