(host *Host, provider string, auth *coreauth.Auth, req coreexecutor.Request, opts coreexecutor.Options)
| 2044 | } |
| 2045 | |
| 2046 | func buildExecutorRequest(host *Host, provider string, auth *coreauth.Auth, req coreexecutor.Request, opts coreexecutor.Options) pluginapi.ExecutorRequest { |
| 2047 | return pluginapi.ExecutorRequest{ |
| 2048 | AuthID: authID(auth), |
| 2049 | AuthProvider: authProvider(auth), |
| 2050 | Model: req.Model, |
| 2051 | Format: req.Format.String(), |
| 2052 | Stream: opts.Stream, |
| 2053 | Alt: opts.Alt, |
| 2054 | Headers: cloneHeader(opts.Headers), |
| 2055 | Query: cloneValues(opts.Query), |
| 2056 | OriginalRequest: bytes.Clone(opts.OriginalRequest), |
| 2057 | SourceFormat: opts.SourceFormat.String(), |
| 2058 | Payload: bytes.Clone(req.Payload), |
| 2059 | Metadata: mergeExecutorMetadata(req.Metadata, opts.Metadata), |
| 2060 | StorageJSON: storageJSONFromAuth(auth), |
| 2061 | AuthMetadata: cloneAnyMap(authMetadata(auth)), |
| 2062 | AuthAttributes: authAttributes(auth), |
| 2063 | HTTPClient: host.newHTTPClient(auth, provider), |
| 2064 | } |
| 2065 | } |
| 2066 | |
| 2067 | func storageJSONFromAuth(auth *coreauth.Auth) []byte { |
| 2068 | if auth == nil { |
no test coverage detected