(operatorConfig OperatorConfig, endpoint string, zipInput *archive.Input, fileName string, qParams ...map[string]string)
| 140 | } |
| 141 | |
| 142 | func HTTPUploadZip(operatorConfig OperatorConfig, endpoint string, zipInput *archive.Input, fileName string, qParams ...map[string]string) ([]byte, error) { |
| 143 | zipBytes, _, err := archive.ZipToMem(zipInput) |
| 144 | if err != nil { |
| 145 | return nil, errors.Wrap(err, "failed to zip configuration file") |
| 146 | } |
| 147 | |
| 148 | uploadInput := &HTTPUploadInput{ |
| 149 | Bytes: map[string][]byte{ |
| 150 | fileName: zipBytes, |
| 151 | }, |
| 152 | } |
| 153 | return HTTPUpload(operatorConfig, endpoint, uploadInput, qParams...) |
| 154 | } |
| 155 | |
| 156 | func operatorRequest(operatorConfig OperatorConfig, method string, endpoint string, body io.Reader, qParams ...map[string]string) (*http.Request, error) { |
| 157 | req, err := http.NewRequest(method, operatorConfig.OperatorEndpoint+endpoint, body) |
nothing calls this directly
no test coverage detected